diff --git a/README.md b/README.md
index f6658b4ea..3dc09b563 100644
--- a/README.md
+++ b/README.md
@@ -15,28 +15,26 @@ The QuickBlox JavaScript SDK provides a JavaScript library making it even easier
For the library to work, you need to include either [jQuery](http://jquery.com/) or [Zepto](http://zeptojs.com/) in your html before `quickblox.min.js`, like so:
-For correct work of JS SDK you must include the library in your html before `quickblox.min.js`, like so:
-
```html
```
-Begin with version 2.5.0 no dependencies for work correctly is not needed.
+Beginning with version 2.5.0, no dependencies are need for the QuickBlox SDK to work correctly.
## Bower and RequireJS
-If you use bower package manager for your project, you can install JS SDK through bower:
+If you use the bower package manager for your project, you can install the JS SDK through bower:
```
bower install quickblox --save
```
-When you use **RequireJS**, you are able to use quickblox as AMD module. SDK supports [UMD (Universal Module Definition)](https://github.com/umdjs/umd) pattern for JavaScript modules. So it is possible to use SDK everywhere (as browser global variable, with AMD module loader like RequireJS or as CommonJS module for Node.js environment).
+When you use **RequireJS**, you are able to use QuickBlox as an AMD compliant module. The SDK supports the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) pattern for JavaScript modules, so it is possible to use the SDK everywhere (as a global variable in the browser via an AMD module loader like RequireJS or as a CommonJS module in a Node.js environment).
## Node.js and NPM integration
-Also you can use QuickBlox JavaScript SDK with server-side applications on NodeJS through the native node package. Just install the package in your application project like that:
+Also you can use QuickBlox JavaScript SDK with server-side applications on NodeJS through the native node package. Just install the package in your application project like this:
```
npm install quickblox --save
diff --git a/quickblox.min.js b/quickblox.min.js
index ded9db4d6..3821bbf23 100644
--- a/quickblox.min.js
+++ b/quickblox.min.js
@@ -1,47 +1,47 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.QB=e()}}(function(){var define,module,exports;return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r||e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o|@/g)},t.exports.escape=function(e){return null===e?null:e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/"/g,"\\22").replace(/&/g,"\\26").replace(/'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(//g,"\\3e").replace(/@/g,"\\40").replace(/\3a/g,"c3a")},t.exports.unescape=function(e){return null===e?null:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")}},{}],4:[function(e,t,r){"use strict";var n=e("./JID");t.exports=function(){for(var e=arguments[0],t=Array.prototype.slice.call(arguments,1),r="",i=0;i");if(t>=0&&r>=0&&tthis.bytesParsedOnStanzaBegin+this.maxStanzaSize)return void this.error("policy-violation","Maximum stanza size exceeded");this.bytesParsed+=e.length,this.parser.write(e)}},n.prototype.end=function(e){e&&this.write(e),delete this.parser,this.emit("end")},n.prototype.error=function(e,t){var r=new Error(t);r.condition=e,this.emit("error",r)},t.exports=n},{"@xmpp/xml":6,events:173,inherits:217,"ltx/lib/parsers/ltx":387}],6:[function(e,t,r){"use strict";var n=e("ltx"),i=e("./lib/tag");r=t.exports=function(){return i.apply(null,arguments)},Object.assign(r,n),r.IQ=e("./lib/IQ"),r.Message=e("./lib/Message"),r.Presence=e("./lib/Presence"),r.Stanza=e("./lib/Stanza"),r.createStanza=e("./lib/createStanza"),r.parse=e("./lib/parse"),r.Parser=e("./lib/Parser"),r.tag=e("./lib/tag"),r.ltx=n},{"./lib/IQ":7,"./lib/Message":8,"./lib/Parser":9,"./lib/Presence":10,"./lib/Stanza":11,"./lib/createStanza":12,"./lib/parse":13,"./lib/tag":14,ltx:378}],7:[function(e,t,r){"use strict";function n(e){i.call(this,"iq",e)}var i=e("./Stanza");e("inherits")(n,i),t.exports=n},{"./Stanza":11,inherits:217}],8:[function(e,t,r){"use strict";function n(e){i.call(this,"message",e)}var i=e("./Stanza");e("inherits")(n,i),t.exports=n},{"./Stanza":11,inherits:217}],9:[function(e,t,r){"use strict";function n(e){o.call(this,e)}var i=e("inherits"),a=e("./createStanza"),o=e("ltx").Parser;i(n,o),n.prototype.DefaultElement=a,t.exports=n},{"./createStanza":12,inherits:217,ltx:378}],10:[function(e,t,r){"use strict";function n(e){i.call(this,"presence",e)}var i=e("./Stanza");e("inherits")(n,i),t.exports=n},{"./Stanza":11,inherits:217}],11:[function(e,t,r){"use strict";function n(e,t){a.call(this,e,t)}var i=e("inherits"),a=e("ltx").Element;i(n,a),Object.defineProperty(n.prototype,"from",{get:function(){return this.attrs.from},set:function(e){this.attrs.from=e}}),Object.defineProperty(n.prototype,"to",{get:function(){return this.attrs.to},set:function(e){this.attrs.to=e}}),Object.defineProperty(n.prototype,"id",{get:function(){return this.attrs.id},set:function(e){this.attrs.id=e}}),Object.defineProperty(n.prototype,"type",{get:function(){return this.attrs.type},set:function(e){this.attrs.type=e}}),t.exports=n},{inherits:217,ltx:378}],12:[function(e,t,r){"use strict";var n=e("./Stanza"),i=e("ltx").Element;t.exports=function(e,t){var r;switch(e){case"presence":case"message":case"iq":r=new n(e,t);break;default:r=new i(e,t)}return Array.prototype.slice.call(arguments,2).forEach(function(e){r.cnode(e)}),r}},{"./Stanza":11,ltx:378}],13:[function(e,t,r){"use strict";var n=e("./Parser"),i=e("ltx").parse;t.exports=function(e){return i(e,n)}},{"./Parser":9,ltx:378}],14:[function(e,t,r){"use strict";var n=e("ltx").tagString,i=e("./parse");t.exports=function(){return i(n.apply(null,arguments))}},{"./parse":13,ltx:378}],15:[function(e,t,r){"use strict";function n(e){return b.test(e)}function i(t){function r(e,t){var r;if("string"==typeof e){if(!(r=j(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=T(e);r=n.validate||I(n)}var i=r(t);return!0===r.$async?"*"==q._opts.async?m(i):i:(q.errors=r.errors,i)}function g(e,t){var r=T(e,void 0,t);return r.validate||I(r)}function w(e,t,r,n){if(Array.isArray(e))for(var i=0;i=1&&r<=12&&n>=1&&n<=m[r]}function a(e,t){var r=e.match(g);if(!r)return!1;var n=r[1],i=r[2],a=r[3],o=r[5];return n<=23&&i<=59&&a<=59&&(!t||o)}function o(e){var t=e.split(k);return 2==t.length&&i(t[0])&&a(t[1],!0)}function s(e){return e.length<=255&&v.test(e)}function c(e){return _.test(e)&&b.test(e)}function u(e){try{return new RegExp(e),!0}catch(e){return!1}}function l(e,t){if(e&&t)return e>t?1:et?1:e=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function o(e,t,r){var n=s.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function s(e,t,r){for(var n=0;n=55296&&t<=56319&&i=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,u=i.split("/"),l=0;l",j="result"+i,S=e.opts.v5&&o&&o.$data;if(S?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",b="schema"+i):b=o,k){var E=e.util.getData(x.$data,a,e.dataPathArr),C="exclusive"+i,A="op"+i,T="' + "+A+" + '";n+=" var schemaExcl"+i+" = "+E+"; ",E="schemaExcl"+i,n+=" if (typeof "+E+" != 'boolean' && "+E+" !== undefined) { "+p+" = false; ";var r=w,I=I||[];I.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(r||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: '"+w+" should be boolean' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var P=n;n=I.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+P+"]); ":n+=" validate.errors = ["+P+"]; return false; ":n+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(d+="}",n+=" else { "),S&&(n+=" if ("+b+" === undefined) "+p+" = true; else if (typeof "+b+" != 'string') "+p+" = false; else { ",d+="}"),f&&(n+=" if (!"+v+") "+p+" = true; else { ",d+="}"),n+=" var "+j+" = "+v+"("+l+", ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" ); if ("+j+" === undefined) "+p+" = false; var "+C+" = "+E+" === true; if ("+p+" === undefined) { "+p+" = "+C+" ? "+j+" "+_+" 0 : "+j+" "+_+"= 0; } if (!"+p+") var op"+i+" = "+C+" ? '"+_+"' : '"+_+"=';"}else{var C=!0===x,T=_;C||(T+="=");var A="'"+T+"'";S&&(n+=" if ("+b+" === undefined) "+p+" = true; else if (typeof "+b+" != 'string') "+p+" = false; else { ",d+="}"),f&&(n+=" if (!"+v+") "+p+" = true; else { ",d+="}"),n+=" var "+j+" = "+v+"("+l+", ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" ); if ("+j+" === undefined) "+p+" = false; if ("+p+" === undefined) "+p+" = "+j+" "+_,C||(n+="="),n+=" 0;"}n+=d+"if (!"+p+") { ";var r=t,I=I||[];I.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(r||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+A+", limit: ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" , exclusive: "+C+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be "+T+' "',n+=S?"' + "+b+" + '":""+e.util.escapeQuotes(o),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=S?"validate.schema"+s:""+e.util.toQuotedString(o),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var P=n;return n=I.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+P+"]); ":n+=" validate.errors = ["+P+"]; return false; ":n+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="}"}},{}],29:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maximum"==t,d=f?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.v5&&m&&m.$data,v=f?"<":">",b=f?">":"<";if(g){var y=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,x="op"+a,k="' + "+x+" + '";i+=" var schemaExcl"+a+" = "+y+"; ",y="schemaExcl"+a,i+=" var exclusive"+a+"; if (typeof "+y+" != 'boolean' && typeof "+y+" != 'undefined') { ";var r=d,_=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var j=i;i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ((exclusive"+a+" = "+y+" === true) ? "+p+" "+b+"= "+n+" : "+p+" "+b+" "+n+") || "+p+" !== "+p+") { var op"+a+" = exclusive"+a+" ? '"+v+"' : '"+v+"=';"}else{var w=!0===m,k=v;w||(k+="=");var x="'"+k+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+" "+b,w&&(i+="="),i+=" "+n+" || "+p+" !== "+p+") {"}var r=t,_=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+x+", limit: "+n+", exclusive: "+w+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+k+" ",i+=h?"' + "+n:s+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var j=i;return i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i}},{}],30:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maxItems"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+".length "+f+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],31:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+p+".length ":i+=" ucs2length("+p+") ",i+=" "+f+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],32:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maxProperties"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+p+").length "+f+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],33:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.schema[t],i=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,o=!e.opts.allErrors,s=e.util.copy(e),c="";s.level++;var u="valid"+s.level,l=s.baseId,p=!0,h=n;if(h)for(var f,d=-1,m=h.length-1;d "+S+") { ";var C=u+"["+S+"]";h.schema=j,h.schemaPath=o+"["+S+"]",h.errSchemaPath=s+"/"+S,h.errorPath=e.util.getPathExpr(e.errorPath,S,e.opts.jsonPointers,!0),h.dataPathArr[g]=S;var A=e.validate(h);h.baseId=b,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,C)+" ":r+=" var "+v+" = "+C+"; "+A+" ",r+=" } ",c&&(r+=" if ("+d+") { ",f+="}")}if("object"==typeof y&&e.util.schemaHasRules(y,e.RULES.all)){h.schema=y,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+d+" = true; if ("+u+".length > "+a.length+") { for (var "+m+" = "+a.length+"; "+m+" < "+u+".length; "+m+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var C=u+"["+m+"]";h.dataPathArr[g]=m;var A=e.validate(h);h.baseId=b,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,C)+" ":r+=" var "+v+" = "+C+"; "+A+" ",c&&(r+=" if (!"+d+") break; "),r+=" } } ",c&&(r+=" if ("+d+") { ",f+="}")}}else if(e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=o,h.errSchemaPath=s,
-r+=" for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var C=u+"["+m+"]";h.dataPathArr[g]=m;var A=e.validate(h);h.baseId=b,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,C)+" ":r+=" var "+v+" = "+C+"; "+A+" ",c&&(r+=" if (!"+d+") break; "),r+=" } ",c&&(r+=" if ("+d+") { ",f+="}")}return c&&(r+=" "+f+" if ("+p+" == errors) {"),r=e.util.cleanUpCode(r)}},{}],41:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),p=e.opts.v5&&o&&o.$data;p?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",r="schema"+i):r=o,n+="var division"+i+";if (",p&&(n+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),n+=" (division"+i+" = "+l+" / "+r+", ",e.opts.multipleOfPrecision?n+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":n+=" division"+i+" !== parseInt(division"+i+") ",n+=" ) ",p&&(n+=" ) "),n+=" ) { ";var h=h||[];h.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be multiple of ",n+=p?"' + "+r:o+"'"),e.opts.verbose&&(n+=" , schema: ",n+=p?"validate.schema"+s:""+o,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var f=n;return n=h.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},{}],42:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.level,i=e.dataLevel,a=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(i||""),l="errs__"+n,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.util.schemaHasRules(a,e.RULES.all)){p.schema=a,p.schemaPath=o,p.errSchemaPath=s,r+=" var "+l+" = errors; ";var f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1;var d;p.opts.allErrors&&(d=p.opts.allErrors,p.opts.allErrors=!1),r+=" "+e.validate(p)+" ",p.createErrors=!0,d&&(p.opts.allErrors=d),e.compositeRule=p.compositeRule=f,r+=" if ("+h+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var g=r;r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+l+"; if (vErrors !== null) { if ("+l+") vErrors.length = "+l+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}},{}],43:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.level,i=e.dataLevel,a=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(i||""),l="valid"+n,p="errs__"+n,h=e.util.copy(e),f="";h.level++;var d="valid"+h.level;r+="var "+p+" = errors;var prevValid"+n+" = false;var "+l+" = false;";var m=h.baseId,g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var v=a;if(v)for(var b,y=-1,w=v.length-1;y5)r+=" || validate.schema"+o+"["+m+"] ";else{var D=b;if(D)for(var q,M=-1,R=D.length-1;M= "+de+"; ",s=e.errSchemaPath+"/patternGroups/minimum",r+=" if (!"+l+") { ";var G=G||[];G.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: { reason: '"+ve+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(U)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have "+be+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(U)+"\"' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var X=r;r=G.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+X+"]); ":r+=" validate.errors = ["+X+"]; return false; ":r+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",void 0!==me&&(r+=" else ")}if(void 0!==me){var ge=me,ve="maximum",be="more";r+=" "+l+" = pgPropCount"+n+" <= "+me+"; ",s=e.errSchemaPath+"/patternGroups/maximum",r+=" if (!"+l+") { ";var G=G||[];G.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: { reason: '"+ve+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(U)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have "+be+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(U)+"\"' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var X=r;r=G.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+X+"]); ":r+=" validate.errors = ["+X+"]; return false; ":r+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } "}s=V,c&&(r+=" if ("+l+") { ",f+="}")}}}}return c&&(r+=" "+f+" if ("+p+" == errors) {"),r=e.util.cleanUpCode(r)}},{}],47:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),p="valid"+a;if("#"==s||"#/"==s)e.isRoot?(r=e.async,n="validate"):(r=!0===e.root.schema.$async,n="root.refVal[0]");else{var h=e.resolveRef(e.baseId,s,e.isRoot);if(void 0===h){var f="can't resolve reference "+s+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(f);var d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(s)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(s)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(s)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var m=i;i=d.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var g=new Error(f);throw g.missingRef=e.resolve.url(e.baseId,s),g.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(g.missingRef)),g}console.log(f),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var b="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=s;var y=e.validate(v).replace(/validate\.schema/g,h.code);i+=" "+y+" ",u&&(i+=" if ("+b+") { ")}else r=!0===h.$async,n=h.code}if(n){var d=d||[];d.push(i),i="",e.opts.passContext?i+=" "+n+".call(this, ":i+=" "+n+"( ",i+=" "+l+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);i+=" , "+(o?"data"+(o-1||""):"parentData")+" , "+(o?e.dataPathArr[o]:"parentDataProperty")+", rootData) ";var w=i;if(i=d.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");i+=" try { ",u&&(i+="var "+p+" ="),i+=" "+e.yieldAwait+" "+w+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+w+") { if (vErrors === null) vErrors = "+n+".errors; else vErrors = vErrors.concat("+n+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.level,i=e.dataLevel,a=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(i||""),l="valid"+n,p=e.opts.v5&&a&&a.$data;p&&(r+=" var schema"+n+" = "+e.util.getData(a.$data,i,e.dataPathArr)+"; ");var h="schema"+n;if(!p)if(a.length=e.opts.loopRequired;if(c)if(r+=" var missing"+n+"; ",w){p||(r+=" var "+h+" = validate.schema"+o+"; ");var x="i"+n,k="schema"+n+"["+x+"]",_="' + "+k+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,k,e.opts.jsonPointers)),r+=" var "+l+" = true; ",p&&(r+=" if (schema"+n+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+n+")) "+l+" = false; else {"),r+=" for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { "+l+" = "+u+"["+h+"["+x+"]] !== undefined; if (!"+l+") break; } ",p&&(r+=" } "),r+=" if (!"+l+") { ";var j=j||[];j.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+_+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var S=r;r=j.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+S+"]); ":r+=" validate.errors = ["+S+"]; return false; ":r+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var E=f;if(E)for(var C,x=-1,A=E.length-1;x 1) { var i = "+l+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+l+"[i], "+l+"[j])) { "+p+" = false; break outer; } } } } ",h&&(n+=" } "),n+=" if (!"+p+") { ";var f=f||[];f.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+o,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;n=f.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n}},{}],51:[function(e,t,r){"use strict";t.exports=function(e,t){function r(t){return void 0!==e.schema[t.keyword]||"properties"==t.keyword&&(!1===e.schema.additionalProperties||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}var n="",i=!0===e.schema.$async;if(e.isTop){var a=e.isTop,o=e.level=0,s=e.dataLevel=0,c="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,i){e.async=!0;var u="es7"==e.opts.async;e.yieldAwait=u?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],n+=" var validate = ",i?u?n+=" (async function ":("co*"==e.opts.async&&(n+="co.wrap"),n+="(function* "):n+=" (function ",n+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data;"}else{var o=e.level,s=e.dataLevel,c="data"+(s||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+o+" = errors;"}var l="valid"+o,p=!e.opts.allErrors,h="",f="",d=e.schema.type,m=Array.isArray(d);if(d&&e.opts.coerceTypes){var g=e.util.coerceToTypes(e.opts.coerceTypes,d);if(g){var v=e.schemaPath+".type",b=e.errSchemaPath+"/type",y=m?"checkDataTypes":"checkDataType";n+=" if ("+e.util[y](d,c,!0)+") { ";var w="dataType"+o,x="coerced"+o;n+=" var "+w+" = typeof "+c+"; ","array"==e.opts.coerceTypes&&(n+=" if ("+w+" == 'object' && Array.isArray("+c+")) "+w+" = 'array'; "),n+=" var "+x+" = undefined; ";var k="",_=g;if(_)for(var j,S=-1,E=_.length-1;S>6],i=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:p.tag[r]}}function o(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a|@/g)},t.exports.escape=function(e){return null===e?null:e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/"/g,"\\22").replace(/&/g,"\\26").replace(/'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(//g,"\\3e").replace(/@/g,"\\40").replace(/\3a/g,"c3a")},t.exports.unescape=function(e){return null===e?null:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")}},{}],4:[function(e,t,r){"use strict";var n=e("./JID");t.exports=function(){for(var e=arguments[0],t=Array.prototype.slice.call(arguments,1),r="",i=0;i");if(t>=0&&r>=0&&tthis.bytesParsedOnStanzaBegin+this.maxStanzaSize)return void this.error("policy-violation","Maximum stanza size exceeded");this.bytesParsed+=e.length,this.parser.write(e)}},n.prototype.end=function(e){e&&this.write(e),delete this.parser,this.emit("end")},n.prototype.error=function(e,t){var r=new Error(t);r.condition=e,this.emit("error",r)},t.exports=n},{"@xmpp/xml":6,events:173,inherits:217,"ltx/lib/parsers/ltx":387}],6:[function(e,t,r){"use strict";var n=e("ltx"),i=e("./lib/tag");r=t.exports=function(){return i.apply(null,arguments)},Object.assign(r,n),r.IQ=e("./lib/IQ"),r.Message=e("./lib/Message"),r.Presence=e("./lib/Presence"),r.Stanza=e("./lib/Stanza"),r.createStanza=e("./lib/createStanza"),r.parse=e("./lib/parse"),r.Parser=e("./lib/Parser"),r.tag=e("./lib/tag"),r.ltx=n},{"./lib/IQ":7,"./lib/Message":8,"./lib/Parser":9,"./lib/Presence":10,"./lib/Stanza":11,"./lib/createStanza":12,"./lib/parse":13,"./lib/tag":14,ltx:378}],7:[function(e,t,r){"use strict";function n(e){i.call(this,"iq",e)}var i=e("./Stanza");e("inherits")(n,i),t.exports=n},{"./Stanza":11,inherits:217}],8:[function(e,t,r){"use strict";function n(e){i.call(this,"message",e)}var i=e("./Stanza");e("inherits")(n,i),t.exports=n},{"./Stanza":11,inherits:217}],9:[function(e,t,r){"use strict";function n(e){o.call(this,e)}var i=e("inherits"),a=e("./createStanza"),o=e("ltx").Parser;i(n,o),n.prototype.DefaultElement=a,t.exports=n},{"./createStanza":12,inherits:217,ltx:378}],10:[function(e,t,r){"use strict";function n(e){i.call(this,"presence",e)}var i=e("./Stanza");e("inherits")(n,i),t.exports=n},{"./Stanza":11,inherits:217}],11:[function(e,t,r){"use strict";function n(e,t){a.call(this,e,t)}var i=e("inherits"),a=e("ltx").Element;i(n,a),Object.defineProperty(n.prototype,"from",{get:function(){return this.attrs.from},set:function(e){this.attrs.from=e}}),Object.defineProperty(n.prototype,"to",{get:function(){return this.attrs.to},set:function(e){this.attrs.to=e}}),Object.defineProperty(n.prototype,"id",{get:function(){return this.attrs.id},set:function(e){this.attrs.id=e}}),Object.defineProperty(n.prototype,"type",{get:function(){return this.attrs.type},set:function(e){this.attrs.type=e}}),t.exports=n},{inherits:217,ltx:378}],12:[function(e,t,r){"use strict";var n=e("./Stanza"),i=e("ltx").Element;t.exports=function(e,t){var r;switch(e){case"presence":case"message":case"iq":r=new n(e,t);break;default:r=new i(e,t)}return Array.prototype.slice.call(arguments,2).forEach(function(e){r.cnode(e)}),r}},{"./Stanza":11,ltx:378}],13:[function(e,t,r){"use strict";var n=e("./Parser"),i=e("ltx").parse;t.exports=function(e){return i(e,n)}},{"./Parser":9,ltx:378}],14:[function(e,t,r){"use strict";var n=e("ltx").tagString,i=e("./parse");t.exports=function(){return i(n.apply(null,arguments))}},{"./parse":13,ltx:378}],15:[function(e,t,r){"use strict";function n(e){return b.test(e)}function i(t){function r(e,t){var r;if("string"==typeof e){if(!(r=j(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=T(e);r=n.validate||I(n)}var i=r(t);return!0===r.$async?"*"==q._opts.async?m(i):i:(q.errors=r.errors,i)}function g(e,t){var r=T(e,void 0,t);return r.validate||I(r)}function w(e,t,r,n){if(Array.isArray(e))for(var i=0;i=1&&r<=12&&n>=1&&n<=m[r]}function a(e,t){var r=e.match(g);if(!r)return!1;var n=r[1],i=r[2],a=r[3],o=r[5];return n<=23&&i<=59&&a<=59&&(!t||o)}function o(e){var t=e.split(k);return 2==t.length&&i(t[0])&&a(t[1],!0)}function s(e){return e.length<=255&&v.test(e)}function c(e){return _.test(e)&&b.test(e)}function u(e){try{return new RegExp(e),!0}catch(e){return!1}}function l(e,t){if(e&&t)return e>t?1:et?1:e=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function o(e,t,r){var n=s.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function s(e,t,r){for(var n=0;n=55296&&t<=56319&&i=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,u=i.split("/"),l=0;l",j="result"+i,S=e.opts.v5&&o&&o.$data;if(S?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",b="schema"+i):b=o,k){var E=e.util.getData(x.$data,a,e.dataPathArr),C="exclusive"+i,A="op"+i,T="' + "+A+" + '";n+=" var schemaExcl"+i+" = "+E+"; ",E="schemaExcl"+i,n+=" if (typeof "+E+" != 'boolean' && "+E+" !== undefined) { "+p+" = false; ";var r=w,I=I||[];I.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(r||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: '"+w+" should be boolean' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var P=n;n=I.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+P+"]); ":n+=" validate.errors = ["+P+"]; return false; ":n+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(d+="}",n+=" else { "),S&&(n+=" if ("+b+" === undefined) "+p+" = true; else if (typeof "+b+" != 'string') "+p+" = false; else { ",d+="}"),f&&(n+=" if (!"+v+") "+p+" = true; else { ",d+="}"),n+=" var "+j+" = "+v+"("+l+", ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" ); if ("+j+" === undefined) "+p+" = false; var "+C+" = "+E+" === true; if ("+p+" === undefined) { "+p+" = "+C+" ? "+j+" "+_+" 0 : "+j+" "+_+"= 0; } if (!"+p+") var op"+i+" = "+C+" ? '"+_+"' : '"+_+"=';"}else{var C=!0===x,T=_;C||(T+="=");var A="'"+T+"'";S&&(n+=" if ("+b+" === undefined) "+p+" = true; else if (typeof "+b+" != 'string') "+p+" = false; else { ",d+="}"),f&&(n+=" if (!"+v+") "+p+" = true; else { ",d+="}"),n+=" var "+j+" = "+v+"("+l+", ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" ); if ("+j+" === undefined) "+p+" = false; if ("+p+" === undefined) "+p+" = "+j+" "+_,C||(n+="="),n+=" 0;"}n+=d+"if (!"+p+") { ";var r=t,I=I||[];I.push(n),n="",!1!==e.createErrors?(n+=" { keyword: '"+(r||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+A+", limit: ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" , exclusive: "+C+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be "+T+' "',n+=S?"' + "+b+" + '":""+e.util.escapeQuotes(o),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=S?"validate.schema"+s:""+e.util.toQuotedString(o),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var P=n;return n=I.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+P+"]); ":n+=" validate.errors = ["+P+"]; return false; ":n+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="}"}},{}],29:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maximum"==t,d=f?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.v5&&m&&m.$data,v=f?"<":">",b=f?">":"<";if(g){var y=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,x="op"+a,k="' + "+x+" + '";i+=" var schemaExcl"+a+" = "+y+"; ",y="schemaExcl"+a,i+=" var exclusive"+a+"; if (typeof "+y+" != 'boolean' && typeof "+y+" != 'undefined') { ";var r=d,_=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var j=i;i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ((exclusive"+a+" = "+y+" === true) ? "+p+" "+b+"= "+n+" : "+p+" "+b+" "+n+") || "+p+" !== "+p+") { var op"+a+" = exclusive"+a+" ? '"+v+"' : '"+v+"=';"}else{var w=!0===m,k=v;w||(k+="=");var x="'"+k+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+" "+b,w&&(i+="="),i+=" "+n+" || "+p+" !== "+p+") {"}var r=t,_=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+x+", limit: "+n+", exclusive: "+w+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+k+" ",i+=h?"' + "+n:s+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var j=i;return i=_.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i}},{}],30:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maxItems"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+".length "+f+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],31:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+p+".length ":i+=" ucs2length("+p+") ",i+=" "+f+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],32:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var f="maxProperties"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+p+").length "+f+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(r||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],33:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.schema[t],i=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,o=!e.opts.allErrors,s=e.util.copy(e),c="";s.level++;var u="valid"+s.level,l=s.baseId,p=!0,h=n;if(h)for(var f,d=-1,m=h.length-1;d "+S+") { ";var C=u+"["+S+"]";h.schema=j,h.schemaPath=o+"["+S+"]",h.errSchemaPath=s+"/"+S,h.errorPath=e.util.getPathExpr(e.errorPath,S,e.opts.jsonPointers,!0),h.dataPathArr[g]=S;var A=e.validate(h);h.baseId=b,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,C)+" ":r+=" var "+v+" = "+C+"; "+A+" ",r+=" } ",c&&(r+=" if ("+d+") { ",f+="}")}if("object"==typeof y&&e.util.schemaHasRules(y,e.RULES.all)){h.schema=y,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+d+" = true; if ("+u+".length > "+a.length+") { for (var "+m+" = "+a.length+"; "+m+" < "+u+".length; "+m+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var C=u+"["+m+"]";h.dataPathArr[g]=m;var A=e.validate(h);h.baseId=b,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,C)+" ":r+=" var "+v+" = "+C+"; "+A+" ",c&&(r+=" if (!"+d+") break; "),r+=" } } ",c&&(r+=" if ("+d+") { ",f+="}")}}else if(e.util.schemaHasRules(a,e.RULES.all)){h.schema=a,h.schemaPath=o,h.errSchemaPath=s,
+r+=" for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var C=u+"["+m+"]";h.dataPathArr[g]=m;var A=e.validate(h);h.baseId=b,e.util.varOccurences(A,v)<2?r+=" "+e.util.varReplace(A,v,C)+" ":r+=" var "+v+" = "+C+"; "+A+" ",c&&(r+=" if (!"+d+") break; "),r+=" } ",c&&(r+=" if ("+d+") { ",f+="}")}return c&&(r+=" "+f+" if ("+p+" == errors) {"),r=e.util.cleanUpCode(r)}},{}],41:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),p=e.opts.v5&&o&&o.$data;p?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",r="schema"+i):r=o,n+="var division"+i+";if (",p&&(n+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),n+=" (division"+i+" = "+l+" / "+r+", ",e.opts.multipleOfPrecision?n+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+e.opts.multipleOfPrecision+" ":n+=" division"+i+" !== parseInt(division"+i+") ",n+=" ) ",p&&(n+=" ) "),n+=" ) { ";var h=h||[];h.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be multiple of ",n+=p?"' + "+r:o+"'"),e.opts.verbose&&(n+=" , schema: ",n+=p?"validate.schema"+s:""+o,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var f=n;return n=h.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="} ",u&&(n+=" else { "),n}},{}],42:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.level,i=e.dataLevel,a=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(i||""),l="errs__"+n,p=e.util.copy(e);p.level++;var h="valid"+p.level;if(e.util.schemaHasRules(a,e.RULES.all)){p.schema=a,p.schemaPath=o,p.errSchemaPath=s,r+=" var "+l+" = errors; ";var f=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.createErrors=!1;var d;p.opts.allErrors&&(d=p.opts.allErrors,p.opts.allErrors=!1),r+=" "+e.validate(p)+" ",p.createErrors=!0,d&&(p.opts.allErrors=d),e.compositeRule=p.compositeRule=f,r+=" if ("+h+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var g=r;r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+l+"; if (vErrors !== null) { if ("+l+") vErrors.length = "+l+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}},{}],43:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.level,i=e.dataLevel,a=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(i||""),l="valid"+n,p="errs__"+n,h=e.util.copy(e),f="";h.level++;var d="valid"+h.level;r+="var "+p+" = errors;var prevValid"+n+" = false;var "+l+" = false;";var m=h.baseId,g=e.compositeRule;e.compositeRule=h.compositeRule=!0;var v=a;if(v)for(var b,y=-1,w=v.length-1;y5)r+=" || validate.schema"+o+"["+m+"] ";else{var D=b;if(D)for(var q,R=-1,M=D.length-1;R= "+de+"; ",s=e.errSchemaPath+"/patternGroups/minimum",r+=" if (!"+l+") { ";var X=X||[];X.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: { reason: '"+ve+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(U)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have "+be+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(U)+"\"' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var G=r;r=X.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+G+"]); ":r+=" validate.errors = ["+G+"]; return false; ":r+=" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",void 0!==me&&(r+=" else ")}if(void 0!==me){var ge=me,ve="maximum",be="more";r+=" "+l+" = pgPropCount"+n+" <= "+me+"; ",s=e.errSchemaPath+"/patternGroups/maximum",r+=" if (!"+l+") { ";var X=X||[];X.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: { reason: '"+ve+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(U)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have "+be+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(U)+"\"' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var G=r;r=X.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+G+"]); ":r+=" validate.errors = ["+G+"]; return false; ":r+=" var err = "+G+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } "}s=V,c&&(r+=" if ("+l+") { ",f+="}")}}}}return c&&(r+=" "+f+" if ("+p+" == errors) {"),r=e.util.cleanUpCode(r)}},{}],47:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(o||""),p="valid"+a;if("#"==s||"#/"==s)e.isRoot?(r=e.async,n="validate"):(r=!0===e.root.schema.$async,n="root.refVal[0]");else{var h=e.resolveRef(e.baseId,s,e.isRoot);if(void 0===h){var f="can't resolve reference "+s+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(f);var d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(s)+"' } ",!1!==e.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(s)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(s)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var m=i;i=d.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var g=new Error(f);throw g.missingRef=e.resolve.url(e.baseId,s),g.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(g.missingRef)),g}console.log(f),u&&(i+=" if (true) { ")}}else if(h.inline){var v=e.util.copy(e);v.level++;var b="valid"+v.level;v.schema=h.schema,v.schemaPath="",v.errSchemaPath=s;var y=e.validate(v).replace(/validate\.schema/g,h.code);i+=" "+y+" ",u&&(i+=" if ("+b+") { ")}else r=!0===h.$async,n=h.code}if(n){var d=d||[];d.push(i),i="",e.opts.passContext?i+=" "+n+".call(this, ":i+=" "+n+"( ",i+=" "+l+", (dataPath || '')",'""'!=e.errorPath&&(i+=" + "+e.errorPath);i+=" , "+(o?"data"+(o-1||""):"parentData")+" , "+(o?e.dataPathArr[o]:"parentDataProperty")+", rootData) ";var w=i;if(i=d.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");i+=" try { ",u&&(i+="var "+p+" ="),i+=" "+e.yieldAwait+" "+w+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",u&&(i+=" if ("+p+") { ")}else i+=" if (!"+w+") { if (vErrors === null) vErrors = "+n+".errors; else vErrors = vErrors.concat("+n+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.level,i=e.dataLevel,a=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(i||""),l="valid"+n,p=e.opts.v5&&a&&a.$data;p&&(r+=" var schema"+n+" = "+e.util.getData(a.$data,i,e.dataPathArr)+"; ");var h="schema"+n;if(!p)if(a.length=e.opts.loopRequired;if(c)if(r+=" var missing"+n+"; ",w){p||(r+=" var "+h+" = validate.schema"+o+"; ");var x="i"+n,k="schema"+n+"["+x+"]",_="' + "+k+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,k,e.opts.jsonPointers)),r+=" var "+l+" = true; ",p&&(r+=" if (schema"+n+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+n+")) "+l+" = false; else {"),r+=" for (var "+x+" = 0; "+x+" < "+h+".length; "+x+"++) { "+l+" = "+u+"["+h+"["+x+"]] !== undefined; if (!"+l+") break; } ",p&&(r+=" } "),r+=" if (!"+l+") { ";var j=j||[];j.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(s)+" , params: { missingProperty: '"+_+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+_+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var S=r;r=j.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+S+"]); ":r+=" validate.errors = ["+S+"]; return false; ":r+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var E=f;if(E)for(var C,x=-1,A=E.length-1;x 1) { var i = "+l+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+l+"[i], "+l+"[j])) { "+p+" = false; break outer; } } } } ",h&&(n+=" } "),n+=" if (!"+p+") { ";var f=f||[];f.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+o,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;n=f.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n}},{}],51:[function(e,t,r){"use strict";t.exports=function(e,t){function r(t){return void 0!==e.schema[t.keyword]||"properties"==t.keyword&&(!1===e.schema.additionalProperties||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}var n="",i=!0===e.schema.$async;if(e.isTop){var a=e.isTop,o=e.level=0,s=e.dataLevel=0,c="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,i){e.async=!0;var u="es7"==e.opts.async;e.yieldAwait=u?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],n+=" var validate = ",i?u?n+=" (async function ":("co*"==e.opts.async&&(n+="co.wrap"),n+="(function* "):n+=" (function ",n+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data;"}else{var o=e.level,s=e.dataLevel,c="data"+(s||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+o+" = errors;"}var l="valid"+o,p=!e.opts.allErrors,h="",f="",d=e.schema.type,m=Array.isArray(d);if(d&&e.opts.coerceTypes){var g=e.util.coerceToTypes(e.opts.coerceTypes,d);if(g){var v=e.schemaPath+".type",b=e.errSchemaPath+"/type",y=m?"checkDataTypes":"checkDataType";n+=" if ("+e.util[y](d,c,!0)+") { ";var w="dataType"+o,x="coerced"+o;n+=" var "+w+" = typeof "+c+"; ","array"==e.opts.coerceTypes&&(n+=" if ("+w+" == 'object' && Array.isArray("+c+")) "+w+" = 'array'; "),n+=" var "+x+" = undefined; ";var k="",_=g;if(_)for(var j,S=-1,E=_.length-1;S>6],i=0==(32&r);if(31==(31&r)){var a=r;for(r=0;128==(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:p.tag[r]}}function o(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=p.tagClassByName[r||"universal"]<<6)}var s=e("inherits"),c=e("buffer").Buffer,u=e("../../asn1"),l=u.base,p=u.constants.der;t.exports=n,n.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(i,l.Node),i.prototype._encodeComposite=function(e,t,r,n){var i=o(e,t,r,this.reporter);if(n.length<128){var a=new c(2);return a[0]=i,a[1]=n.length,this._createEncoderBuffer([a,n])}for(var s=1,u=n.length;u>=256;u>>=8)s++;var a=new c(2+s);a[0]=i,a[1]=128|s;for(var u=1+s,l=n.length;l>0;u--,l>>=8)a[u]=255&l;return this._createEncoderBuffer([a,n])},i.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new c(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,n=0;n=128;a>>=7)i++}for(var o=new c(i),s=o.length-1,n=e.length-1;n>=0;n--){var a=e[n];for(o[s--]=127&a;(a>>=7)>0;)o[s--]=128|127&a}return this._createEncoderBuffer(o)},i.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[a(n.getFullYear()),a(n.getUTCMonth()+1),a(n.getUTCDate()),a(n.getUTCHours()),a(n.getUTCMinutes()),a(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[a(n.getFullYear()%100),a(n.getUTCMonth()+1),a(n.getUTCDate()),a(n.getUTCHours()),a(n.getUTCMinutes()),a(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new c(r)}if(c.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new c(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var i=new Array(n),a=i.length-1;a>=0;a--)i[a]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new c(i))},i.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},i.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},i.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(0==(t&=127))throw s("Indefinite length not supported");if(t>4)throw s("encoding too long");if(this._size-ethis._size-i)return null;if(this._offset=i,0===this.length)return t?new r(0):"";var o=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?o:o.toString("utf8")},n.prototype.readOID=function(e){e||(e=a.OID);var t=this.readString(e,!0);if(null===t)return null;for(var r=[],n=0,i=0;i>0),r.join(".")},n.prototype._readTag=function(e){i.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw s("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw s("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var n=this._buf[this._offset],a=0,o=0;o>0},t.exports=n}).call(this,e("buffer").Buffer)},{"./errors":70,"./types":73,assert:77,buffer:123}],73:[function(e,t,r){t.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},{}],74:[function(e,t,r){(function(r){function n(e,t){return a.ok(e),a.equal(typeof e,"object"),a.ok(t),a.equal(typeof t,"object"),Object.getOwnPropertyNames(e).forEach(function(r){if(!t[r]){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n)}}),t}function i(e){e=n(c,e||{}),this._buf=new r(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}var a=e("assert"),o=e("./types"),s=e("./errors"),c=(s.newInvalidAsn1Error,{size:1024,growthFactor:8});Object.defineProperty(i.prototype,"buffer",{get:function(){if(this._seq.length)throw new InvalidAsn1Error(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),i.prototype.writeByte=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},i.prototype.writeInt=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");"number"!=typeof t&&(t=o.Integer);for(var r=4;(0==(4286578688&e)||-8388608==(4286578688&e))&&r>1;)r--,e<<=8;if(r>4)throw new InvalidAsn1Error("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(4278190080&e)>>>24,e<<=8},i.prototype.writeNull=function(){this.writeByte(o.Null),this.writeByte(0)},i.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");return"number"!=typeof t&&(t=o.Enumeration),this.writeInt(e,t)},i.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw new TypeError("argument must be a Boolean");"number"!=typeof t&&(t=o.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0},i.prototype.writeString=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=o.OctetString);var n=r.byteLength(e);this.writeByte(t),this.writeLength(n),n&&(this._ensure(n),this._buf.write(e,this._offset),this._offset+=n)},i.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw new TypeError("tag must be a number");if(!r.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},i.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach(function(e){t.writeString(e)})},i.prototype.writeOID=function(e,t){function r(e,t){t<128?e.push(t):t<16384?(e.push(t>>>7|128),e.push(127&t)):t<2097152?(e.push(t>>>14|128),e.push(255&(t>>>7|128)),e.push(127&t)):t<268435456?(e.push(t>>>21|128),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t)):(e.push(255&(t>>>28|128)),e.push(255&(t>>>21|128)),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t))}if("string"!=typeof e)throw new TypeError("argument must be a string");if("number"!=typeof t&&(t=o.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");var n=e.split("."),i=[];i.push(40*parseInt(n[0],10)+parseInt(n[1],10)),n.slice(2).forEach(function(e){r(i,parseInt(e,10))});var a=this;this._ensure(2+i.length),this.writeByte(t),this.writeLength(i.length),i.forEach(function(e){a.writeByte(e)})},i.prototype.writeLength=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else{if(!(e<=16777215))throw new InvalidAsn1ERror("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e}},i.prototype.startSequence=function(e){"number"!=typeof e&&(e=o.Sequence|o.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},i.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else{if(!(r<=16777215))throw new InvalidAsn1Error("Sequence too long");this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r}},i.prototype._shift=function(e,t,r){a.ok(void 0!==e),a.ok(void 0!==t),a.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r},i.prototype._ensure=function(e){if(a.ok(e),this._size-this._offset=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(o=c[s],!f(e[o],t[o],r,n))return!1;return!0}function g(e,t,r){f(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",g)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e){var t;try{e()}catch(e){t=e}return t}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=b(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!e&&w.isError(i),s=!e&&i&&!r;if((o&&a&&v(i,r)||s)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!v(i,r)||!e&&i)throw i}var w=e("util/"),x=Object.prototype.hasOwnProperty,k=Array.prototype.slice,_=function(){return"foo"===function(){}.name}(),j=t.exports=h,S=/\s*function\s+([^\(\s]*)\s*/;j.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=l(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},w.inherits(j.AssertionError,Error),j.fail=p,j.ok=h,j.equal=function(e,t,r){e!=t&&p(e,t,r,"==",j.equal)},j.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",j.notEqual)},j.deepEqual=function(e,t,r){f(e,t,!1)||p(e,t,r,"deepEqual",j.deepEqual)},j.deepStrictEqual=function(e,t,r){f(e,t,!0)||p(e,t,r,"deepStrictEqual",j.deepStrictEqual)},j.notDeepEqual=function(e,t,r){f(e,t,!1)&&p(e,t,r,"notDeepEqual",j.notDeepEqual)},j.notDeepStrictEqual=g,j.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",j.strictEqual)},j.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",j.notStrictEqual)},j.throws=function(e,t,r){y(!0,e,t,r)},j.doesNotThrow=function(e,t,r){y(!1,e,t,r)},j.ifError=function(e){if(e)throw e};var E=Object.keys||function(e){var t=[];for(var r in e)x.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":542}],78:[function(e,t,r){function n(e){return"AWS "+e.key+":"+a(e)}function i(e){return p.createHmac("sha1",e.secret).update(e.message).digest("base64")}function a(e){return e.message=s(e),i(e)}function o(e){return e.message=c(e),i(e)}function s(e){var t=e.amazonHeaders||"";return t&&(t+="\n"),[e.verb,e.md5,e.contentType,e.date?e.date.toUTCString():"",t+e.resource].join("\n")}function c(e){return"GET\n\n\n"+e.date+"\n"+e.resource}function u(e){for(var t=[],r=Object.keys(e),n=0,i=r.length;n=0&&"us-east-1"===this.region||["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0},s.prototype.createHost=function(){var e=this.isSingleRegion()?"":("s3"===this.service&&"us-east-1"!==this.region?"-":".")+this.region;return("ses"===this.service?"email":this.service)+e+".amazonaws.com"},s.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,r=t.headers;t.signQuery?(this.parsedPath.query=e=this.parsedPath.query||{},this.credentials.sessionToken&&(e["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||e["X-Amz-Expires"]||(e["X-Amz-Expires"]=86400),e["X-Amz-Date"]?this.datetime=e["X-Amz-Date"]:e["X-Amz-Date"]=this.getDateTime(),e["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",e["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),e["X-Amz-SignedHeaders"]=this.signedHeaders()):(t.doNotModifyHeaders||this.isCodeCommitGit||(!t.body||r["Content-Type"]||r["content-type"]||(r["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8"),!t.body||r["Content-Length"]||r["content-length"]||(r["Content-Length"]=n.byteLength(t.body)),!this.credentials.sessionToken||r["X-Amz-Security-Token"]||r["x-amz-security-token"]||(r["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||r["X-Amz-Content-Sha256"]||r["x-amz-content-sha256"]||(r["X-Amz-Content-Sha256"]=a(this.request.body||"","hex")),r["X-Amz-Date"]||r["x-amz-date"]?this.datetime=r["X-Amz-Date"]||r["x-amz-date"]:r["X-Amz-Date"]=this.getDateTime()),delete r.Authorization,delete r.authorization)},s.prototype.sign=function(){return this.parsedPath||this.prepareRequest(),this.request.signQuery?this.parsedPath.query["X-Amz-Signature"]=this.signature():this.request.headers.Authorization=this.authHeader(),this.request.path=this.formatPath(),this.request},s.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit&&(this.datetime=this.datetime.slice(0,-1))}return this.datetime},s.prototype.getDate=function(){return this.getDateTime().substr(0,8)},s.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")},s.prototype.signature=function(){var e,t,r,n=this.getDate(),a=[this.credentials.secretAccessKey,n,this.region,this.service].join(),o=f.get(a);return o||(e=i("AWS4"+this.credentials.secretAccessKey,n),t=i(e,this.region),r=i(t,this.service),o=i(r,"aws4_request"),f.set(a,o)),i(o,this.stringToSign(),"hex")},s.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),a(this.canonicalString(),"hex")].join("\n")},s.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e,t=this.parsedPath.path,r=this.parsedPath.query,n=this.request.headers,i="",s="s3"!==this.service,c="s3"===this.service||this.request.doNotEncodePath,u="s3"===this.service,p="s3"===this.service;return e="s3"===this.service&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":n["X-Amz-Content-Sha256"]||n["x-amz-content-sha256"]||a(this.request.body||"","hex"),r&&(i=o(l.stringify(Object.keys(r).sort().reduce(function(e,t){return t?(e[t]=Array.isArray(r[t])?p?r[t][0]:r[t].slice().sort():r[t],e):e},{})))),"/"!==t&&(s&&(t=t.replace(/\/{2,}/g,"/")),t=t.split("/").reduce(function(e,t){return s&&".."===t?e.pop():s&&"."===t||(c&&(t=l.unescape(t)),e.push(o(l.escape(t)))),e},[]).join("/"),"/"!==t[0]&&(t="/"+t),u&&(t=t.replace(/%2F/g,"/"))),[this.request.method||"GET",t,i,this.canonicalHeaders()+"\n",this.signedHeaders(),e].join("\n")},s.prototype.canonicalHeaders=function(){function e(e){return e.toString().trim().replace(/\s+/g," ")}var t=this.request.headers;return Object.keys(t).sort(function(e,t){return e.toLowerCase()=0&&(r=l.parse(e.slice(t+1)),e=e.slice(0,t)),/[^0-9A-Za-z!'()*\-._~%\/]/.test(e)&&(e=e.split("/").map(function(e){return l.escape(l.unescape(e))}).join("/")),this.parsedPath={path:e,query:r}},s.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+o(l.stringify(t))):e},c.RequestSigner=s,c.sign=function(e,t){return new s(e,t).sign()}}).call(this,e("_process"),e("buffer").Buffer)},{"./lru":80,_process:438,buffer:123,crypto:136,querystring:453,url:537}],80:[function(e,t,r){function n(e){this.capacity=0|e,this.map=Object.create(null),this.list=new i}function i(){this.firstNode=null,this.lastNode=null}function a(e,t){this.key=e,this.val=t,this.prev=null,this.next=null}t.exports=function(e){return new n(e)},n.prototype.get=function(e){var t=this.map[e];if(null!=t)return this.used(t),t.val},n.prototype.set=function(e,t){var r=this.map[e];if(null!=r)r.val=t;else{if(this.capacity||this.prune(),!this.capacity)return!1;r=new a(e,t),this.map[e]=r,this.capacity--}return this.used(r),!0},n.prototype.used=function(e){this.list.moveToFront(e)},n.prototype.prune=function(){var e=this.list.pop();null!=e&&(delete this.map[e.key],this.capacity++)},i.prototype.moveToFront=function(e){this.firstNode!=e&&(this.remove(e),null==this.firstNode?(this.firstNode=e,this.lastNode=e,e.prev=null,e.next=null):(e.prev=null,e.next=this.firstNode,e.next.prev=e,this.firstNode=e))},i.prototype.pop=function(){var e=this.lastNode;return null!=e&&this.remove(e),e},i.prototype.remove=function(e){this.firstNode==e?this.firstNode=e.next:null!=e.prev&&(e.prev.next=e.next),this.lastNode==e?this.lastNode=e.prev:null!=e.next&&(e.next.prev=e.prev)}},{}],81:[function(e,t,r){var n=e("./lib/backoff"),i=e("./lib/strategy/exponential"),a=e("./lib/strategy/fibonacci"),o=e("./lib/function_call.js");t.exports.Backoff=n,t.exports.FunctionCall=o,t.exports.FibonacciStrategy=a,t.exports.ExponentialStrategy=i,t.exports.fibonacci=function(e){return new n(new a(e))},t.exports.exponential=function(e){return new n(new i(e))},t.exports.call=function(e,t,r){var n=Array.prototype.slice.call(arguments);return e=n[0],t=n.slice(1,n.length-1),r=n[n.length-1],new o(e,t,r)}},{"./lib/backoff":82,"./lib/function_call.js":83,"./lib/strategy/exponential":84,"./lib/strategy/fibonacci":85}],82:[function(e,t,r){function n(e){i.EventEmitter.call(this),this.backoffStrategy_=e,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var i=e("events");e("util").inherits(n,i.EventEmitter),n.prototype.failAfter=function(e){if(e<1)throw new Error("Maximum number of retry must be greater than 0. Actual: "+e);this.maxNumberOfRetry_=e},n.prototype.backoff=function(e){if(-1!==this.timeoutID_)throw new Error("Backoff in progress.");this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e))},n.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},n.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=n},{events:173,util:542}],83:[function(e,t,r){function n(e){return"function"==typeof e}function i(e,t,r){if(a.EventEmitter.call(this),
!n(e))throw new Error("fn should be a function.Actual: "+typeof e);if(!n(r))throw new Error("callback should be a function.Actual: "+typeof e);this.function_=e,this.arguments_=t,this.callback_=r,this.results_=[],this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.state_=i.State_.PENDING}var a=e("events"),o=e("util"),s=e("./backoff"),c=e("./strategy/fibonacci");o.inherits(i,a.EventEmitter),i.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},i.prototype.isPending=function(){return this.state_==i.State_.PENDING},i.prototype.isRunning=function(){return this.state_==i.State_.RUNNING},i.prototype.isCompleted=function(){return this.state_==i.State_.COMPLETED},i.prototype.isAborted=function(){return this.state_==i.State_.ABORTED},i.prototype.setStrategy=function(e){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.strategy_=e,this},i.prototype.getResults=function(){return this.results_.concat()},i.prototype.failAfter=function(e){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.failAfter_=e,this},i.prototype.abort=function(){if(this.isCompleted())throw new Error("FunctionCall already completed.");this.isRunning()&&this.backoff_.reset(),this.state_=i.State_.ABORTED},i.prototype.start=function(e){if(this.isAborted())throw new Error("FunctionCall aborted.");if(!this.isPending())throw new Error("FunctionCall already started.");var t=this.strategy_||new c;this.backoff_=e?e(t):new s(t),this.backoff_.on("ready",this.doCall_.bind(this)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=i.State_.RUNNING,this.doCall_()},i.prototype.doCall_=function(){var e=["call"].concat(this.arguments_);a.EventEmitter.prototype.emit.apply(this,e);var t=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(t))},i.prototype.doCallback_=function(){var e=this.results_[this.results_.length-1];this.callback_.apply(null,e)},i.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.results_.push(e),a.EventEmitter.prototype.emit.apply(this,["callback"].concat(e)),e[0]?this.backoff_.backoff(e[0]):(this.state_=i.State_.COMPLETED,this.doCallback_())}},i.prototype.handleBackoff_=function(e,t,r){this.emit("backoff",e,t,r)},t.exports=i},{"./backoff":82,"./strategy/fibonacci":85,events:173,util:542}],84:[function(e,t,r){function n(e){a.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var i=e("util"),a=e("./strategy");i.inherits(n,a),n.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=2*this.backoffDelay_,this.backoffDelay_},n.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=n},{"./strategy":86,util:542}],85:[function(e,t,r){function n(e){a.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var i=e("util"),a=e("./strategy");i.inherits(n,a),n.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},n.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=n},{"./strategy":86,util:542}],86:[function(e,t,r){function n(e){return void 0!==e&&null!==e}function i(e){if(e=e||{},n(e.initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(n(e.maxDelay)&&e.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(n(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}e("events"),e("util");i.prototype.getMaxDelay=function(){return this.maxDelay_},i.prototype.getInitialDelay=function(){return this.initialDelay_},i.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_;return Math.round(e*t)},i.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},i.prototype.reset=function(){this.reset_()},i.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=i},{events:173,util:542}],87:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function a(e){var t,r,i,a,o,s,c=e.length;o=n(e),s=new p(3*c/4-o),i=o>0?c-4:c;var u=0;for(t=0,r=0;t>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,s[u++]=255&a):1===o&&(a=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,r){for(var n,i=[],a=t;ac?c:o+16383));return 1===n?(t=e[r-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=c;for(var u=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f=t&&(c=0),n=n<<8|e[c];return n}function a(e,t,r){var n,a=new u,o=new Uint32Array(l),s=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(a.expandstate(t,64,e,64),n=0;n<64;n++)a.expand0state(t,64),a.expand0state(e,64);for(n=0;n>>24,r[4*n+2]=o[n]>>>16,r[4*n+1]=o[n]>>>8,r[4*n+0]=o[n]}function o(e,t,r,n,i,o,c){var u,l,h,f,d,m,g=new Uint8Array(64),v=new Uint8Array(64),b=new Uint8Array(p),y=new Uint8Array(p),w=new Uint8Array(n+4),x=o;if(c<1)return-1;if(0===t||0===n||0===o||o>b.byteLength*b.byteLength||n>1<<20)return-1;for(f=Math.floor((o+b.byteLength-1)/b.byteLength),h=Math.floor((o+f-1)/f),u=0;u0;m++){for(w[n+0]=m>>>24,w[n+1]=m>>>16,w[n+2]=m>>>8,w[n+3]=m,s(v,w,n+4),a(g,v,y),u=b.byteLength;u--;)b[u]=y[u];for(u=1;u=x);u++)i[d]=b[u];o-=u}return 0}var s=e("tweetnacl").lowlevel.crypto_hash,c=0,u=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};u.prototype.encipher=function(e,t){void 0===t&&(t=new Uint8Array(e.buffer),0!==e.byteOffset&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var r=1;r<16;r+=2)e[1]^=n(this.S,t,0)^this.P[r],e[0]^=n(this.S,t,4)^this.P[r+1];var i=e[0];e[0]=e[1]^this.P[17],e[1]=i},u.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);0!==e.byteOffset&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var r=16;r>0;r-=2)e[1]^=n(this.S,t,0)^this.P[r],e[0]^=n(this.S,t,4)^this.P[r-1];var i=e[0];e[0]=e[1]^this.P[0],e[1]=i},u.prototype.expand0state=function(e,t){var r,n,a=new Uint32Array(2),o=new Uint8Array(a.buffer);for(r=0,c=0;r<18;r++)this.P[r]^=i(e,t);for(c=0,r=0;r<18;r+=2)this.encipher(a,o),this.P[r]=a[0],this.P[r+1]=a[1];for(r=0;r<4;r++)for(n=0;n<256;n+=2)this.encipher(a,o),this.S[r][n]=a[0],this.S[r][n+1]=a[1]},u.prototype.expandstate=function(e,t,r,n){var a,o,s=new Uint32Array(2);for(a=0,c=0;a<18;a++)this.P[a]^=i(r,n);for(a=0,c=0;a<18;a+=2)s[0]^=i(e,t),s[1]^=i(e,t),this.encipher(s),this.P[a]=s[0],this.P[a+1]=s[1];for(a=0;a<4;a++)for(o=0;o<256;o+=2)s[0]^=i(e,t),s[1]^=i(e,t),this.encipher(s),this.S[a][o]=s[0],this.S[a][o+1]=s[1];c=0},u.prototype.enc=function(e,t){for(var r=0;r=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}function c(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}function u(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,p=67108863&c,h=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=h;f++){var d=u-f|0;i=0|e.words[d],a=0|t.words[f],o=i*a+p,l+=o/67108864|0,p=67108863&o}r.words[u]=0|p,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}function l(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function p(e,t,r){return(new h).mulp(e,t,r)}function h(e,t){this.x=e,this.y=t}function f(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function d(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function b(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function y(e){b.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var w;try{w=e("buffer").Buffer}catch(e){}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("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 i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=o(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=o(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,c=Math.min(a,a-o)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var x=["","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"],k=[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],_=[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];a.prototype.toString=function(e,t){e=e||10,t=0|t||1;var r;if(16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?x[6-c.length]+c+r:c+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=k[e],l=_[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var h=p.modn(l).toString(e);p=p.idivn(l),r=p.isZero()?h+r:x[u-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==w),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,u=new e(a),l=this.clone();if(c){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,f=0|o[1],d=8191&f,m=f>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],w=8191&y,x=y>>>13,k=0|o[4],_=8191&k,j=k>>>13,S=0|o[5],E=8191&S,C=S>>>13,A=0|o[6],T=8191&A,I=A>>>13,P=0|o[7],O=8191&P,D=P>>>13,q=0|o[8],M=8191&q,R=q>>>13,z=0|o[9],B=8191&z,N=z>>>13,F=0|s[0],L=8191&F,U=F>>>13,H=0|s[1],K=8191&H,$=H>>>13,V=0|s[2],G=8191&V,X=V>>>13,W=0|s[3],J=8191&W,Z=W>>>13,Q=0|s[4],Y=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],pe=8191&le,he=le>>>13,fe=0|s[9],de=8191&fe,me=fe>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(p,L),i=Math.imul(p,U),i=i+Math.imul(h,L)|0,a=Math.imul(h,U);var ge=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,L),i=Math.imul(d,U),i=i+Math.imul(m,L)|0,a=Math.imul(m,U),n=n+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(h,K)|0,a=a+Math.imul(h,$)|0;var ve=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,L),i=Math.imul(v,U),i=i+Math.imul(b,L)|0,a=Math.imul(b,U),n=n+Math.imul(d,K)|0,i=i+Math.imul(d,$)|0,i=i+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(h,G)|0,a=a+Math.imul(h,X)|0;var be=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,L),i=Math.imul(w,U),i=i+Math.imul(x,L)|0,a=Math.imul(x,U),n=n+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(b,K)|0,a=a+Math.imul(b,$)|0,n=n+Math.imul(d,G)|0,i=i+Math.imul(d,X)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Z)|0,i=i+Math.imul(h,J)|0,a=a+Math.imul(h,Z)|0;var ye=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,L),i=Math.imul(_,U),i=i+Math.imul(j,L)|0,a=Math.imul(j,U),n=n+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(x,K)|0,a=a+Math.imul(x,$)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(b,G)|0,a=a+Math.imul(b,X)|0,n=n+Math.imul(d,J)|0,i=i+Math.imul(d,Z)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Z)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(h,Y)|0,a=a+Math.imul(h,ee)|0;var we=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,L),i=Math.imul(E,U),i=i+Math.imul(C,L)|0,a=Math.imul(C,U),n=n+Math.imul(_,K)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(j,K)|0,a=a+Math.imul(j,$)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,X)|0,i=i+Math.imul(x,G)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Z)|0,i=i+Math.imul(b,J)|0,a=a+Math.imul(b,Z)|0,n=n+Math.imul(d,Y)|0,i=i+Math.imul(d,ee)|0,i=i+Math.imul(m,Y)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(h,re)|0,a=a+Math.imul(h,ne)|0;var xe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,L),i=Math.imul(T,U),i=i+Math.imul(I,L)|0,a=Math.imul(I,U),n=n+Math.imul(E,K)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,X)|0,i=i+Math.imul(j,G)|0,a=a+Math.imul(j,X)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Z)|0,i=i+Math.imul(x,J)|0,a=a+Math.imul(x,Z)|0,n=n+Math.imul(v,Y)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(b,Y)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(d,re)|0,i=i+Math.imul(d,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(h,ae)|0,a=a+Math.imul(h,oe)|0;var ke=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,L),i=Math.imul(O,U),i=i+Math.imul(D,L)|0,a=Math.imul(D,U),n=n+Math.imul(T,K)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(I,K)|0,a=a+Math.imul(I,$)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,X)|0,i=i+Math.imul(C,G)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Z)|0,i=i+Math.imul(j,J)|0,a=a+Math.imul(j,Z)|0,n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(x,Y)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(d,ae)|0,i=i+Math.imul(d,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(p,ce)|0,i=i+Math.imul(p,ue)|0,i=i+Math.imul(h,ce)|0,a=a+Math.imul(h,ue)|0;var _e=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,L),i=Math.imul(M,U),i=i+Math.imul(R,L)|0,a=Math.imul(R,U),n=n+Math.imul(O,K)|0,i=i+Math.imul(O,$)|0,i=i+Math.imul(D,K)|0,a=a+Math.imul(D,$)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,X)|0,i=i+Math.imul(I,G)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Z)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,Z)|0,n=n+Math.imul(_,Y)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(j,Y)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(d,ce)|0,i=i+Math.imul(d,ue)|0,i=i+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,he)|0,i=i+Math.imul(h,pe)|0,a=a+Math.imul(h,he)|0;var je=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(B,L),i=Math.imul(B,U),i=i+Math.imul(N,L)|0,a=Math.imul(N,U),n=n+Math.imul(M,K)|0,i=i+Math.imul(M,$)|0,i=i+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(O,G)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(D,G)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Z)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,Z)|0,n=n+Math.imul(E,Y)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(C,Y)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,i=i+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,n=n+Math.imul(d,pe)|0,i=i+Math.imul(d,he)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,he)|0,n=n+Math.imul(p,de)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(h,de)|0,a=a+Math.imul(h,me)|0;var Se=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,K),i=Math.imul(B,$),i=i+Math.imul(N,K)|0,a=Math.imul(N,$),n=n+Math.imul(M,G)|0,i=i+Math.imul(M,X)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,J)|0,i=i+Math.imul(O,Z)|0,i=i+Math.imul(D,J)|0,a=a+Math.imul(D,Z)|0,n=n+Math.imul(T,Y)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(I,Y)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,i=i+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,he)|0,i=i+Math.imul(b,pe)|0,a=a+Math.imul(b,he)|0,n=n+Math.imul(d,de)|0,i=i+Math.imul(d,me)|0,i=i+Math.imul(m,de)|0,a=a+Math.imul(m,me)|0;var Ee=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,G),i=Math.imul(B,X),i=i+Math.imul(N,G)|0,a=Math.imul(N,X),n=n+Math.imul(M,J)|0,i=i+Math.imul(M,Z)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Z)|0,n=n+Math.imul(O,Y)|0,i=i+Math.imul(O,ee)|0,i=i+Math.imul(D,Y)|0,a=a+Math.imul(D,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,i=i+Math.imul(j,ce)|0,a=a+Math.imul(j,ue)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,he)|0,i=i+Math.imul(x,pe)|0,a=a+Math.imul(x,he)|0,n=n+Math.imul(v,de)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(b,de)|0,a=a+Math.imul(b,me)|0;var Ce=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,J),i=Math.imul(B,Z),i=i+Math.imul(N,J)|0,a=Math.imul(N,Z),n=n+Math.imul(M,Y)|0,i=i+Math.imul(M,ee)|0,i=i+Math.imul(R,Y)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,i=i+Math.imul(D,re)|0,a=a+Math.imul(D,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(E,ce)|0,i=i+Math.imul(E,ue)|0,i=i+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,he)|0,i=i+Math.imul(j,pe)|0,a=a+Math.imul(j,he)|0,n=n+Math.imul(w,de)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(x,de)|0,a=a+Math.imul(x,me)|0;var Ae=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,Y),i=Math.imul(B,ee),i=i+Math.imul(N,Y)|0,a=Math.imul(N,ee),n=n+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(O,ae)|0,i=i+Math.imul(O,oe)|0,i=i+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,n=n+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,i=i+Math.imul(I,ce)|0,a=a+Math.imul(I,ue)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,he)|0,i=i+Math.imul(C,pe)|0,a=a+Math.imul(C,he)|0,n=n+Math.imul(_,de)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(j,de)|0,a=a+Math.imul(j,me)|0;var Te=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=Math.imul(B,ne),i=i+Math.imul(N,re)|0,a=Math.imul(N,ne),n=n+Math.imul(M,ae)|0,i=i+Math.imul(M,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,i=i+Math.imul(D,ce)|0,a=a+Math.imul(D,ue)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,he)|0,i=i+Math.imul(I,pe)|0,a=a+Math.imul(I,he)|0,n=n+Math.imul(E,de)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(C,de)|0,a=a+Math.imul(C,me)|0;var Ie=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,ae),i=Math.imul(B,oe),i=i+Math.imul(N,ae)|0,a=Math.imul(N,oe),n=n+Math.imul(M,ce)|0,i=i+Math.imul(M,ue)|0,i=i+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,n=n+Math.imul(O,pe)|0,i=i+Math.imul(O,he)|0,i=i+Math.imul(D,pe)|0,a=a+Math.imul(D,he)|0,n=n+Math.imul(T,de)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(I,de)|0,a=a+Math.imul(I,me)|0;var Pe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,ce),i=Math.imul(B,ue),i=i+Math.imul(N,ce)|0,a=Math.imul(N,ue),n=n+Math.imul(M,pe)|0,i=i+Math.imul(M,he)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,he)|0,n=n+Math.imul(O,de)|0,i=i+Math.imul(O,me)|0,i=i+Math.imul(D,de)|0,a=a+Math.imul(D,me)|0;var Oe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,pe),i=Math.imul(B,he),i=i+Math.imul(N,pe)|0,a=Math.imul(N,he),n=n+Math.imul(M,de)|0,i=i+Math.imul(M,me)|0,i=i+Math.imul(R,de)|0,a=a+Math.imul(R,me)|0;var De=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(B,de),i=Math.imul(B,me),i=i+Math.imul(N,de)|0,a=Math.imul(N,me);var qe=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(qe>>>26)|0,qe&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=we,c[5]=xe,c[6]=ke,c[7]=_e,c[8]=je,c[9]=Se,c[10]=Ee,c[11]=Ce,c[12]=Ae,c[13]=Te,c[14]=Ie,c[15]=Pe,c[16]=Oe,c[17]=De,c[18]=qe,0!==u&&(c[19]=u,r.length++),r};Math.imul||(j=u),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?j(this,e,t):r<63?u(this,e,t):r<1024?l(this,e,t):p(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},h.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=c(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0);var i;i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>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},a.prototype.isubn=function(e){if(n("number"==typeof e),n(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>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){s=new a(null),s.length=c+1,s.words=new Array(s.length);for(var u=0;u=0;p--){var h=67108864*(0|n.words[i.length+p])+(0|n.words[i.length+p-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,p);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,p),n.isZero()||(n.negative^=1);s&&(s.words[p]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),c=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var h=0,f=1;0==(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(p)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(c)):(r.isub(t),s.isub(i),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var l=0,p=1;0==(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o)):(r.isub(t),o.isub(i))}var h;return h=0===t.cmpn(1)?i:o,h.cmpn(0)<0&&h.iadd(e),h},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new b(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};f.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},f.prototype.split=function(e,t){e.iushrn(this.n,0,t)},f.prototype.imulK=function(e){return e.imul(this.k)},i(d,f),d.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},d.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(S[e])return S[e];var t;if("k256"===e)t=new d;else if("p224"===e)t=new m;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new v}return S[e]=t,t},b.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},b.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},b.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},b.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},b.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},b.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},b.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},b.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},b.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},b.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},b.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},b.prototype.isqr=function(e){return this.imul(e,e.clone())},b.prototype.sqr=function(e){return this.mul(e,e)},b.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),d=o;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var p=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==p||0!==o?(o<<=1,o|=p,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}c=26}return i},b.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},b.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new y(e)},i(y,b),y.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},y.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},y.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},y.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},y.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],90:[function(e,t,r){function n(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.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),r=0;re.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,f=0|o[1],d=8191&f,m=f>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],w=8191&y,x=y>>>13,k=0|o[4],_=8191&k,j=k>>>13,S=0|o[5],E=8191&S,C=S>>>13,A=0|o[6],T=8191&A,I=A>>>13,P=0|o[7],O=8191&P,D=P>>>13,q=0|o[8],R=8191&q,M=q>>>13,z=0|o[9],B=8191&z,N=z>>>13,F=0|s[0],L=8191&F,U=F>>>13,H=0|s[1],K=8191&H,$=H>>>13,V=0|s[2],X=8191&V,G=V>>>13,W=0|s[3],J=8191&W,Z=W>>>13,Q=0|s[4],Y=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],pe=8191&le,he=le>>>13,fe=0|s[9],de=8191&fe,me=fe>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(p,L),i=Math.imul(p,U),i=i+Math.imul(h,L)|0,a=Math.imul(h,U);var ge=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,L),i=Math.imul(d,U),i=i+Math.imul(m,L)|0,a=Math.imul(m,U),n=n+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(h,K)|0,a=a+Math.imul(h,$)|0;var ve=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,L),i=Math.imul(v,U),i=i+Math.imul(b,L)|0,a=Math.imul(b,U),n=n+Math.imul(d,K)|0,i=i+Math.imul(d,$)|0,i=i+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(p,X)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(h,X)|0,a=a+Math.imul(h,G)|0;var be=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,L),i=Math.imul(w,U),i=i+Math.imul(x,L)|0,a=Math.imul(x,U),n=n+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(b,K)|0,a=a+Math.imul(b,$)|0,n=n+Math.imul(d,X)|0,i=i+Math.imul(d,G)|0,i=i+Math.imul(m,X)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Z)|0,i=i+Math.imul(h,J)|0,a=a+Math.imul(h,Z)|0;var ye=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,L),i=Math.imul(_,U),i=i+Math.imul(j,L)|0,a=Math.imul(j,U),n=n+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(x,K)|0,a=a+Math.imul(x,$)|0,n=n+Math.imul(v,X)|0,i=i+Math.imul(v,G)|0,i=i+Math.imul(b,X)|0,a=a+Math.imul(b,G)|0,n=n+Math.imul(d,J)|0,i=i+Math.imul(d,Z)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Z)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(h,Y)|0,a=a+Math.imul(h,ee)|0;var we=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,L),i=Math.imul(E,U),i=i+Math.imul(C,L)|0,a=Math.imul(C,U),n=n+Math.imul(_,K)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(j,K)|0,a=a+Math.imul(j,$)|0,n=n+Math.imul(w,X)|0,i=i+Math.imul(w,G)|0,i=i+Math.imul(x,X)|0,a=a+Math.imul(x,G)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Z)|0,i=i+Math.imul(b,J)|0,a=a+Math.imul(b,Z)|0,n=n+Math.imul(d,Y)|0,i=i+Math.imul(d,ee)|0,i=i+Math.imul(m,Y)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(h,re)|0,a=a+Math.imul(h,ne)|0;var xe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,L),i=Math.imul(T,U),i=i+Math.imul(I,L)|0,a=Math.imul(I,U),n=n+Math.imul(E,K)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(C,K)|0,a=a+Math.imul(C,$)|0,n=n+Math.imul(_,X)|0,i=i+Math.imul(_,G)|0,i=i+Math.imul(j,X)|0,a=a+Math.imul(j,G)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Z)|0,i=i+Math.imul(x,J)|0,a=a+Math.imul(x,Z)|0,n=n+Math.imul(v,Y)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(b,Y)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(d,re)|0,i=i+Math.imul(d,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(h,ae)|0,a=a+Math.imul(h,oe)|0;var ke=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,L),i=Math.imul(O,U),i=i+Math.imul(D,L)|0,a=Math.imul(D,U),n=n+Math.imul(T,K)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(I,K)|0,a=a+Math.imul(I,$)|0,n=n+Math.imul(E,X)|0,i=i+Math.imul(E,G)|0,i=i+Math.imul(C,X)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Z)|0,i=i+Math.imul(j,J)|0,a=a+Math.imul(j,Z)|0,n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(x,Y)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(d,ae)|0,i=i+Math.imul(d,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(p,ce)|0,i=i+Math.imul(p,ue)|0,i=i+Math.imul(h,ce)|0,a=a+Math.imul(h,ue)|0;var _e=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(R,L),i=Math.imul(R,U),i=i+Math.imul(M,L)|0,a=Math.imul(M,U),n=n+Math.imul(O,K)|0,i=i+Math.imul(O,$)|0,i=i+Math.imul(D,K)|0,a=a+Math.imul(D,$)|0,n=n+Math.imul(T,X)|0,i=i+Math.imul(T,G)|0,i=i+Math.imul(I,X)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Z)|0,i=i+Math.imul(C,J)|0,a=a+Math.imul(C,Z)|0,n=n+Math.imul(_,Y)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(j,Y)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(d,ce)|0,i=i+Math.imul(d,ue)|0,i=i+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,he)|0,i=i+Math.imul(h,pe)|0,a=a+Math.imul(h,he)|0;var je=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(B,L),i=Math.imul(B,U),i=i+Math.imul(N,L)|0,a=Math.imul(N,U),n=n+Math.imul(R,K)|0,i=i+Math.imul(R,$)|0,i=i+Math.imul(M,K)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(O,X)|0,i=i+Math.imul(O,G)|0,i=i+Math.imul(D,X)|0,a=a+Math.imul(D,G)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Z)|0,i=i+Math.imul(I,J)|0,a=a+Math.imul(I,Z)|0,n=n+Math.imul(E,Y)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(C,Y)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,i=i+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,n=n+Math.imul(d,pe)|0,i=i+Math.imul(d,he)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,he)|0,n=n+Math.imul(p,de)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(h,de)|0,a=a+Math.imul(h,me)|0;var Se=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,K),i=Math.imul(B,$),i=i+Math.imul(N,K)|0,a=Math.imul(N,$),n=n+Math.imul(R,X)|0,i=i+Math.imul(R,G)|0,i=i+Math.imul(M,X)|0,a=a+Math.imul(M,G)|0,n=n+Math.imul(O,J)|0,i=i+Math.imul(O,Z)|0,i=i+Math.imul(D,J)|0,a=a+Math.imul(D,Z)|0,n=n+Math.imul(T,Y)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(I,Y)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,i=i+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,he)|0,i=i+Math.imul(b,pe)|0,a=a+Math.imul(b,he)|0,n=n+Math.imul(d,de)|0,i=i+Math.imul(d,me)|0,i=i+Math.imul(m,de)|0,a=a+Math.imul(m,me)|0;var Ee=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,X),i=Math.imul(B,G),i=i+Math.imul(N,X)|0,a=Math.imul(N,G),n=n+Math.imul(R,J)|0,i=i+Math.imul(R,Z)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Z)|0,n=n+Math.imul(O,Y)|0,i=i+Math.imul(O,ee)|0,i=i+Math.imul(D,Y)|0,a=a+Math.imul(D,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,i=i+Math.imul(j,ce)|0,a=a+Math.imul(j,ue)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,he)|0,i=i+Math.imul(x,pe)|0,a=a+Math.imul(x,he)|0,n=n+Math.imul(v,de)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(b,de)|0,a=a+Math.imul(b,me)|0;var Ce=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,J),i=Math.imul(B,Z),i=i+Math.imul(N,J)|0,a=Math.imul(N,Z),n=n+Math.imul(R,Y)|0,i=i+Math.imul(R,ee)|0,i=i+Math.imul(M,Y)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,i=i+Math.imul(D,re)|0,a=a+Math.imul(D,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(E,ce)|0,i=i+Math.imul(E,ue)|0,i=i+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,he)|0,i=i+Math.imul(j,pe)|0,a=a+Math.imul(j,he)|0,n=n+Math.imul(w,de)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(x,de)|0,a=a+Math.imul(x,me)|0;var Ae=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,Y),i=Math.imul(B,ee),i=i+Math.imul(N,Y)|0,a=Math.imul(N,ee),n=n+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(O,ae)|0,i=i+Math.imul(O,oe)|0,i=i+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,n=n+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,i=i+Math.imul(I,ce)|0,a=a+Math.imul(I,ue)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,he)|0,i=i+Math.imul(C,pe)|0,a=a+Math.imul(C,he)|0,n=n+Math.imul(_,de)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(j,de)|0,a=a+Math.imul(j,me)|0;var Te=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=Math.imul(B,ne),i=i+Math.imul(N,re)|0,a=Math.imul(N,ne),n=n+Math.imul(R,ae)|0,i=i+Math.imul(R,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,i=i+Math.imul(D,ce)|0,a=a+Math.imul(D,ue)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,he)|0,i=i+Math.imul(I,pe)|0,a=a+Math.imul(I,he)|0,n=n+Math.imul(E,de)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(C,de)|0,a=a+Math.imul(C,me)|0;var Ie=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,ae),i=Math.imul(B,oe),i=i+Math.imul(N,ae)|0,a=Math.imul(N,oe),n=n+Math.imul(R,ce)|0,i=i+Math.imul(R,ue)|0,i=i+Math.imul(M,ce)|0,a=a+Math.imul(M,ue)|0,n=n+Math.imul(O,pe)|0,i=i+Math.imul(O,he)|0,i=i+Math.imul(D,pe)|0,a=a+Math.imul(D,he)|0,n=n+Math.imul(T,de)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(I,de)|0,a=a+Math.imul(I,me)|0;var Pe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,ce),i=Math.imul(B,ue),i=i+Math.imul(N,ce)|0,a=Math.imul(N,ue),n=n+Math.imul(R,pe)|0,i=i+Math.imul(R,he)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,he)|0,n=n+Math.imul(O,de)|0,i=i+Math.imul(O,me)|0,i=i+Math.imul(D,de)|0,a=a+Math.imul(D,me)|0;var Oe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,pe),i=Math.imul(B,he),i=i+Math.imul(N,pe)|0,a=Math.imul(N,he),n=n+Math.imul(R,de)|0,i=i+Math.imul(R,me)|0,i=i+Math.imul(M,de)|0,a=a+Math.imul(M,me)|0;var De=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(B,de),i=Math.imul(B,me),i=i+Math.imul(N,de)|0,a=Math.imul(N,me);var qe=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(qe>>>26)|0,qe&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=we,c[5]=xe,c[6]=ke,c[7]=_e,c[8]=je,c[9]=Se,c[10]=Ee,c[11]=Ce,c[12]=Ae,c[13]=Te,c[14]=Ie,c[15]=Pe,c[16]=Oe,c[17]=De,c[18]=qe,0!==u&&(c[19]=u,r.length++),r};Math.imul||(j=u),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?j(this,e,t):r<63?u(this,e,t):r<1024?l(this,e,t):p(this,e,t)},h.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},h.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=c(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0);var i;i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>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},a.prototype.isubn=function(e){if(n("number"==typeof e),n(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>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){s=new a(null),s.length=c+1,s.words=new Array(s.length);for(var u=0;u=0;p--){var h=67108864*(0|n.words[i.length+p])+(0|n.words[i.length+p-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,p);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,p),n.isZero()||(n.negative^=1);s&&(s.words[p]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),c=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var h=0,f=1;0==(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(p)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(c)):(r.isub(t),s.isub(i),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var l=0,p=1;0==(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o)):(r.isub(t),o.isub(i))}var h;return h=0===t.cmpn(1)?i:o,h.cmpn(0)<0&&h.iadd(e),h},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new b(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};f.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},f.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},f.prototype.split=function(e,t){e.iushrn(this.n,0,t)},f.prototype.imulK=function(e){return e.imul(this.k)},i(d,f),d.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},d.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(S[e])return S[e];var t;if("k256"===e)t=new d;else if("p224"===e)t=new m;else if("p192"===e)t=new g;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new v}return S[e]=t,t},b.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},b.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},b.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},b.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},b.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},b.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},b.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},b.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},b.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},b.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},b.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},b.prototype.isqr=function(e){return this.imul(e,e.clone())},b.prototype.sqr=function(e){return this.mul(e,e)},b.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),d=o;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var u=t.words[n],l=c-1;l>=0;l--){var p=u>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==p||0!==o?(o<<=1,o|=p,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}c=26}return i},b.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},b.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new y(e)},i(y,b),y.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},y.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},y.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},y.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},y.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{}],90:[function(e,t,r){function n(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.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),r=0;r>18&63,a=c>>12&63,o=c>>6&63,s=63&c,f[p++]=u.charAt(i)+u.charAt(a)+u.charAt(o)+u.charAt(s)}while(l299)&&r.error){e=new Error("CouchDB error: "+(r.error.reason||r.error.error));for(var i in r)e[i]=r[i];return n(e,t,r)}return n(e,t,r)}return"string"==typeof t&&(t={uri:t}),t.json=!0,t.body&&(t.json=t.body),delete t.body,n=n||r,e(t,i)},e})},{}],92:[function(e,t,r){},{}],93:[function(e,t,r){(function(e){function t(e){var t;return e>s||e<0?(t=Math.abs(e)%s,e<0?s-t:t):e}function n(e){for(;0>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=e[i],o=e[a],s=e[o],n=257*e[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*s^65537*o^257*a^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=c=1:(i=a^e[e[e[s^a]]],c^=e[e[c]]);return!0};var c=new i;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var e,t,r,n,i,a;for(r=this._key,t=r.length,this._nRounds=t+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=c.RCON[n/t|0]<<24):t>6&&n%t==4&&(a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]),this._keySchedule[n-t]^a);for(this._invKeySchedule=[],e=0;e>>24]]^c.INV_SUB_MIX[1][c.SBOX[a>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[a>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&a]];return!0},o.prototype.encryptBlock=function(t){t=a(new e(t));var r=this._doCryptBlock(t,this._keySchedule,c.SUB_MIX,c.SBOX),n=new e(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},o.prototype.decryptBlock=function(t){t=a(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var n=this._doCryptBlock(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX),i=new e(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},o.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},o.prototype._doCryptBlock=function(e,r,n,i){var a,o,s,c,u,l,p,h,f;o=e[0]^r[0],s=e[1]^r[1],c=e[2]^r[2],u=e[3]^r[3],a=4;for(var d=1;d>>24]^n[1][s>>>16&255]^n[2][c>>>8&255]^n[3][255&u]^r[a++],p=n[0][s>>>24]^n[1][c>>>16&255]^n[2][u>>>8&255]^n[3][255&o]^r[a++],h=n[0][c>>>24]^n[1][u>>>16&255]^n[2][o>>>8&255]^n[3][255&s]^r[a++],f=n[0][u>>>24]^n[1][o>>>16&255]^n[2][s>>>8&255]^n[3][255&c]^r[a++],o=l,s=p,c=h,u=f;return l=(i[o>>>24]<<24|i[s>>>16&255]<<16|i[c>>>8&255]<<8|i[255&u])^r[a++],p=(i[s>>>24]<<24|i[c>>>16&255]<<16|i[u>>>8&255]<<8|i[255&o])^r[a++],h=(i[c>>>24]<<24|i[u>>>16&255]<<16|i[o>>>8&255]<<8|i[255&s])^r[a++],f=(i[u>>>24]<<24|i[o>>>16&255]<<16|i[s>>>8&255]<<8|i[255&c])^r[a++],[t(l),t(p),t(h),t(f)]},r.AES=o}).call(this,e("buffer").Buffer)},{buffer:123}],94:[function(e,t,r){(function(r){function n(e,t,i,s){if(!(this instanceof n))return new n(e,t,i);o.call(this),this._finID=r.concat([i,new r([0,0,0,1])]),i=r.concat([i,new r([0,0,0,2])]),this._cipher=new a.AES(t),this._prev=new r(i.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=s,this._alen=0,this._len=0,i.copy(this._prev),this._mode=e;var u=new r(4);u.fill(0),this._ghash=new c(this._cipher.encryptBlock(u)),this._authTag=null,this._called=!1}function i(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=-1;++i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var m={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=s,r.createDecipheriv=o}).call(this,e("buffer").Buffer)},{"./aes":93,"./authCipher":94,"./modes":99,"./modes/cbc":100,"./modes/cfb":101,"./modes/cfb1":102,"./modes/cfb8":103,"./modes/ctr":104,"./modes/ecb":105,"./modes/ofb":106,"./streamCipher":107,buffer:123,"cipher-base":126,evp_bytestokey:174,inherits:217}],97:[function(e,t,r){(function(t){function n(e,r,a){if(!(this instanceof n))return new n(e,r,a);c.call(this),this._cache=new i,this._cipher=new s.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,this._autopadding=!0}function i(){if(!(this instanceof i))return new i;this.cache=new t("")}function a(e,r,i){var a=l[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===a.type?new h(d[a.mode],r,i):"auth"===a.type?new f(d[a.mode],r,i):new n(d[a.mode],r,i)}function o(e,t){var r=l[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=p(t,!1,r.key,r.iv);return a(e,n.key,n.iv)}var s=e("./aes"),c=e("cipher-base"),u=e("inherits"),l=e("./modes"),p=e("evp_bytestokey"),h=e("./streamCipher"),f=e("./authCipher");u(n,c),n.prototype._update=function(e){this._cache.add(e);for(var r,n,i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},n.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},i.prototype.add=function(e){this.cache=t.concat([this.cache,e])},i.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++nc||e<0?(t=Math.abs(e)%c,e<0?c-t:t):e}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var s=new e(16);s.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=i(s)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,s],16)),this.ghash(i([0,t,0,r])),this.state};var c=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:123}],99:[function(e,t,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},r.aes128=r["aes-128-cbc"],r.aes192=r["aes-192-cbc"],r.aes256=r["aes-256-cbc"],r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],100:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":122}],101:[function(e,t,r){(function(t){function n(e,r,n){var a=r.length,o=i(r,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,n?r:o]),o}var i=e("buffer-xor");r.encrypt=function(e,r,i){for(var a,o=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){o=t.concat([o,n(e,r,i)]);break}a=e._cache.length,o=t.concat([o,n(e,r.slice(0,a),i)]),r=r.slice(a)}return o}}).call(this,e("buffer").Buffer)},{buffer:123,"buffer-xor":122}],102:[function(e,t,r){(function(e){function t(e,t,r){for(var i,a,o,s=-1,c=0;++s<8;)i=e._cipher.encryptBlock(e._prev),a=t&1<<7-s?128:0,o=i[0]^a,c+=(128&o)>>s%8,e._prev=n(e._prev,r?a:o);return c}function n(t,r){var n=t.length,i=-1,a=new e(t.length);for(t=e.concat([t,new e([r])]);++i>7;return a}r.encrypt=function(r,n,i){for(var a=n.length,o=new e(a),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new o(s(t));return r}var o=e("bn.js"),s=e("randombytes");t.exports=i,i.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":89,buffer:123,randombytes:454}],112:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":113}],113:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],114:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],115:[function(e,t,r){(function(r){function n(e){c.Writable.call(this);var t=h[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){c.Writable.call(this);var t=h[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function a(e){return new n(e)}function o(e){return new i(e)}var s=e("create-hash"),c=e("stream"),u=e("inherits"),l=e("./sign"),p=e("./verify"),h=e("./algorithms.json");Object.keys(h).forEach(function(e){h[e].id=new r(h[e].id,"hex"),h[e.toLowerCase()]=h[e]}),u(n,c.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=l(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},u(i,c.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return p(t,i,e,this._signType,this._tag)},t.exports={Sign:a,Verify:o,createSign:a,createVerify:o}}).call(this,e("buffer").Buffer)},{"./algorithms.json":113,"./sign":116,"./verify":117,buffer:123,"create-hash":131,inherits:217,stream:518}],116:[function(e,t,r){(function(r){function n(e,t,n,o,s){var c=g(t);if(c.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return i(e,c)}if("dsa"===c.type){if("dsa"!==o)throw new Error("wrong private key type");return a(e,c,n)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");e=r.concat([s,e]);for(var u=c.modulus.byteLength(),l=[0,1];e.length+l.length+10&&r.ishrn(n),r}function u(e,t){e=c(e,t),e=e.mod(t);var n=new r(e.toArray());if(n.length=t)throw new Error("invalid sig")}var s=e("bn.js"),c=e("elliptic").ec,u=e("parse-asn1"),l=e("./curves.json");t.exports=n}).call(this,e("buffer").Buffer)},{"./curves.json":114,"bn.js":89,buffer:123,elliptic:157,"parse-asn1":429}],118:[function(e,t,r){(function(t,n){function i(e){if(er.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function a(e,t){for(var r=0;rr.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsr.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelr.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelr.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=r.Z_FILTERED&&e.strategy!=r.Z_HUFFMAN_ONLY&&e.strategy!=r.Z_RLE&&e.strategy!=r.Z_FIXED&&e.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new m.Zlib(t);var i=this;this._hadError=!1,this._binding.onerror=function(e,t){i._binding=null,i._hadError=!0;var n=new Error(e);n.errno=t,n.code=r.codes[t],i.emit("error",n)};var a=r.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(a=e.level);var o=r.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(o=e.strategy),this._binding.init(e.windowBits||r.Z_DEFAULT_WINDOWBITS,a,e.memLevel||r.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new n(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=o,this.once("end",this.close)}var d=e("_stream_transform"),m=e("./binding"),g=e("util"),v=e("assert").ok;m.Z_MIN_WINDOWBITS=8,m.Z_MAX_WINDOWBITS=15,m.Z_DEFAULT_WINDOWBITS=15,m.Z_MIN_CHUNK=64,m.Z_MAX_CHUNK=1/0,m.Z_DEFAULT_CHUNK=16384,m.Z_MIN_MEMLEVEL=1,m.Z_MAX_MEMLEVEL=9,m.Z_DEFAULT_MEMLEVEL=8,m.Z_MIN_LEVEL=-1,m.Z_MAX_LEVEL=9,m.Z_DEFAULT_LEVEL=m.Z_DEFAULT_COMPRESSION,Object.keys(m).forEach(function(e){e.match(/^Z/)&&(r[e]=m[e])}),r.codes={Z_OK:m.Z_OK,Z_STREAM_END:m.Z_STREAM_END,Z_NEED_DICT:m.Z_NEED_DICT,Z_ERRNO:m.Z_ERRNO,Z_STREAM_ERROR:m.Z_STREAM_ERROR,Z_DATA_ERROR:m.Z_DATA_ERROR,Z_MEM_ERROR:m.Z_MEM_ERROR,Z_BUF_ERROR:m.Z_BUF_ERROR,Z_VERSION_ERROR:m.Z_VERSION_ERROR},Object.keys(r.codes).forEach(function(e){r.codes[r.codes[e]]=e}),r.Deflate=o,r.Inflate=s,r.Gzip=c,r.Gunzip=u,r.DeflateRaw=l,r.InflateRaw=p,r.Unzip=h,r.createDeflate=function(e){return new o(e)},r.createInflate=function(e){return new s(e)},r.createDeflateRaw=function(e){return new l(e)},r.createInflateRaw=function(e){return new p(e)},r.createGzip=function(e){return new c(e)},r.createGunzip=function(e){return new u(e)},r.createUnzip=function(e){return new h(e)},r.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new o(t),e,r)},r.deflateSync=function(e,t){return a(new o(t),e)},r.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new c(t),e,r)},r.gzipSync=function(e,t){return a(new c(t),e)},r.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new l(t),e,r)},r.deflateRawSync=function(e,t){return a(new l(t),e)},r.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new h(t),e,r)},r.unzipSync=function(e,t){return a(new h(t),e)},r.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new s(t),e,r)},r.inflateSync=function(e,t){return a(new s(t),e)},r.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new u(t),e,r)},r.gunzipSync=function(e,t){return a(new u(t),e)},r.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new p(t),e,r)},r.inflateRawSync=function(e,t){return a(new p(t),e)},g.inherits(f,d),f.prototype.params=function(e,n,i){if(er.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var a=this;this.flush(m.Z_SYNC_FLUSH,function(){a._binding.params(e,n),a._hadError||(a._level=e,a._strategy=n,i&&i())})}else t.nextTick(i)},f.prototype.reset=function(){return this._binding.reset()},f.prototype._flush=function(e){this._transform(new n(0),"",e)},f.prototype.flush=function(e,r){var i=this._writableState;if(("function"==typeof e||void 0===e&&!r)&&(r=e,e=m.Z_FULL_FLUSH),i.ended)r&&t.nextTick(r);else if(i.ending)r&&this.once("end",r);else if(i.needDrain){var a=this;this.once("drain",function(){a.flush(r)})}else this._flushFlag=e,this.write(new n(0),"",r)},f.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var r=this;t.nextTick(function(){r.emit("close")})}},f.prototype._transform=function(e,t,r){var i,a=this._writableState,o=a.ending||a.ended,s=o&&(!e||a.length===e.length);if(null===!e&&!n.isBuffer(e))return r(new Error("invalid input"));s?i=m.Z_FINISH:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||m.Z_NO_FLUSH));this._processChunk(e,i,r)},f.prototype._processChunk=function(e,t,r){function i(l,f){if(!c._hadError){var d=o-f;if(v(d>=0,"have should not go down"),d>0){var m=c._buffer.slice(c._offset,c._offset+d);c._offset+=d,u?c.push(m):(p.push(m),h+=m.length)}if((0===f||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=new n(c._chunkSize)),0===f){if(s+=a-l,a=l,!u)return!0;var g=c._binding.write(t,e,s,a,c._buffer,c._offset,c._chunkSize);return g.callback=i,void(g.buffer=e)}if(!u)return!1;r()}}var a=e&&e.length,o=this._chunkSize-this._offset,s=0,c=this,u="function"==typeof r;if(!u){var l,p=[],h=0;this.on("error",function(e){l=e});do{var f=this._binding.writeSync(t,e,s,a,this._buffer,this._offset,o)}while(!this._hadError&&i(f[0],f[1]));if(this._hadError)throw l;var d=n.concat(p,h);return this.close(),d}var m=this._binding.write(t,e,s,a,this._buffer,this._offset,o);m.buffer=e,m.callback=i},g.inherits(o,f),g.inherits(s,f),g.inherits(c,f),g.inherits(u,f),g.inherits(l,f),g.inherits(p,f),g.inherits(h,f)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":118,_process:438,_stream_transform:466,assert:77,buffer:123,util:542}],120:[function(e,t,r){arguments[4][92][0].apply(r,arguments)},{dup:92}],121:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,a=n.SlowBuffer,o=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var n=r,a=t;void 0===a&&(n=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var c=new i(a,n),u=c.length,l=-1;++lo)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=r;if(1===arguments.length)return new i(e);void 0===a&&(a=0);var o=n;if(void 0===o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:123}],122:[function(e,t,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),a=0;a=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function g(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}var u;if(i){var l=-1;for(u=r;us&&(r=s-c),u=r;u>=0;u--){for(var p=!0,h=0;hi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var c,u,l,p;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],128==(192&c)&&(p=(31&a)<<6|63&c)>127&&(o=p);break;case 3:c=e[i+1],u=e[i+2],128==(192&c)&&128==(192&u)&&(p=(15&a)<<12|(63&c)<<6|63&u)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:c=e[i+1],u=e[i+2],l=e[i+3],128==(192&c)&&128==(192&u)&&128==(192&l)&&(p=(15&a)<<18|(63&c)<<12|(63&u)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return T(n)}function T(e){var t=e.length;if(t<=Y)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function z(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function B(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return i||B(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||B(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function L(e){if(e=U(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function $(e){for(var t=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function G(e){return J.toByteArray(L(e))}function X(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var J=e("base64-js"),Z=e("ieee754"),Q=e("isarray");r.Buffer=a,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return c(null,e,t,r)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},a.prototype.compare=function(e,t,r,n,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,c=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),p=0;pi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return j(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Y=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return t||q(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||q(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||q(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||q(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||q(e,t,this.length);for(var n=this[e],i=1,a=0;++a=i&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||q(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||q(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||q(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||q(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||q(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||q(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||q(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||q(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,
-this[t+1]=e>>>8):R(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o2&&(t=h.call(arguments,1)),r(t)})})}function o(e){return Promise.all(e.map(i,this))}function s(e){for(var t=new e.constructor,r=Object.keys(e),n=[],a=0;a>>2),o=0,s=0;o>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,l=271733878,p=0;p>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e,t){return e<>>32-t}var p=e("./make-hash");t.exports=function(e){return p(e,n)}},{"./make-hash":132}],134:[function(e,t,r){"use strict";function n(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>r){t=("rmd160"===e?new u:l(e)).update(t).digest()}else t.lengthc?t=e(t):t.lengtha;a++){var o=255&r[a>>>2]>>>24-a%4*8;t[n+a>>>2]|=o<<24-(n+a)%4*8}else if(r.length>65535)for(var a=0;i>a;a+=4)t[n+a>>>2]=r[a>>>2];else t.push.apply(t,r);return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;t>n;n+=4)r.push(0|4294967296*e.random());return new a.init(r,t)}}),o=r.enc={},s=o.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;r>i;i++){var a=255&t[i>>>2]>>>24-i%4*8;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=o.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;r>i;i++){var a=255&t[i>>>2]>>>24-i%4*8;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},u=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=4*o,c=i/s;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var u=c*o,l=e.min(4*u,i);if(u){for(var p=0;u>p;p+=o)this._doProcessBlock(n,p);var h=n.splice(0,u);r.sigBytes-=l}return new a.init(h,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=l.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=r.algo={};return r}(Math);return e})},{}],138:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core"),e("./sha1"),e("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],i):i(n.CryptoJS)}(this,function(e){return e.HmacSHA1})},{"./core":137,"./hmac":139,"./sha1":140}],139:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(e){!function(){var t=e,r=t.lib,n=r.Base,i=t.enc,a=i.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,c=o.words,u=0;r>u;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}()})},{"./core":137}],140:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],c=r[4],u=0;80>u;u++){if(16>u)o[u]=0|e[t+u];else{var l=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=l<<1|l>>>31}var p=(n<<5|n>>>27)+c+o[u];p+=20>u?1518500249+(i&a|~i&s):40>u?1859775393+(i^a^s):60>u?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=n,n=p}r[0]=0|r[0]+n,r[1]=0|r[1]+i,r[2]=0|r[2]+a,r[3]=0|r[3]+s,r[4]=0|r[4]+c},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),e.SHA1})},{"./core":137}],141:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function a(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))}),e.splice(a,0,n)}}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function c(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}r=t.exports=e("./debug"),r.log=o,r.formatArgs=a,r.save=s,r.load=c,r.useColors=i,r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(c())}).call(this,e("_process"))},{"./debug":142,_process:438}],142:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(u||n);e.diff=i,e.prev=u,e.curr=n,u=n;for(var a=new Array(arguments.length),o=0;o=t)throw new Error("invalid sig")}var s=e("bn.js"),c=e("elliptic").ec,u=e("parse-asn1"),l=e("./curves.json");t.exports=n}).call(this,e("buffer").Buffer)},{"./curves.json":114,"bn.js":89,buffer:123,elliptic:157,"parse-asn1":429}],118:[function(e,t,r){(function(t,n){function i(e){if(er.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function a(e,t){for(var r=0;rr.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsr.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelr.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelr.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=r.Z_FILTERED&&e.strategy!=r.Z_HUFFMAN_ONLY&&e.strategy!=r.Z_RLE&&e.strategy!=r.Z_FIXED&&e.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new m.Zlib(t);var i=this;this._hadError=!1,this._binding.onerror=function(e,t){i._binding=null,i._hadError=!0;var n=new Error(e);n.errno=t,n.code=r.codes[t],i.emit("error",n)};var a=r.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(a=e.level);var o=r.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(o=e.strategy),this._binding.init(e.windowBits||r.Z_DEFAULT_WINDOWBITS,a,e.memLevel||r.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new n(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=o,this.once("end",this.close)}var d=e("_stream_transform"),m=e("./binding"),g=e("util"),v=e("assert").ok;m.Z_MIN_WINDOWBITS=8,m.Z_MAX_WINDOWBITS=15,m.Z_DEFAULT_WINDOWBITS=15,m.Z_MIN_CHUNK=64,m.Z_MAX_CHUNK=1/0,m.Z_DEFAULT_CHUNK=16384,m.Z_MIN_MEMLEVEL=1,m.Z_MAX_MEMLEVEL=9,m.Z_DEFAULT_MEMLEVEL=8,m.Z_MIN_LEVEL=-1,m.Z_MAX_LEVEL=9,m.Z_DEFAULT_LEVEL=m.Z_DEFAULT_COMPRESSION,Object.keys(m).forEach(function(e){e.match(/^Z/)&&(r[e]=m[e])}),r.codes={Z_OK:m.Z_OK,Z_STREAM_END:m.Z_STREAM_END,Z_NEED_DICT:m.Z_NEED_DICT,Z_ERRNO:m.Z_ERRNO,Z_STREAM_ERROR:m.Z_STREAM_ERROR,Z_DATA_ERROR:m.Z_DATA_ERROR,Z_MEM_ERROR:m.Z_MEM_ERROR,Z_BUF_ERROR:m.Z_BUF_ERROR,Z_VERSION_ERROR:m.Z_VERSION_ERROR},Object.keys(r.codes).forEach(function(e){r.codes[r.codes[e]]=e}),r.Deflate=o,r.Inflate=s,r.Gzip=c,r.Gunzip=u,r.DeflateRaw=l,r.InflateRaw=p,r.Unzip=h,r.createDeflate=function(e){return new o(e)},r.createInflate=function(e){return new s(e)},r.createDeflateRaw=function(e){return new l(e)},r.createInflateRaw=function(e){return new p(e)},r.createGzip=function(e){return new c(e)},r.createGunzip=function(e){return new u(e)},r.createUnzip=function(e){return new h(e)},r.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new o(t),e,r)},r.deflateSync=function(e,t){return a(new o(t),e)},r.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new c(t),e,r)},r.gzipSync=function(e,t){return a(new c(t),e)},r.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new l(t),e,r)},r.deflateRawSync=function(e,t){return a(new l(t),e)},r.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new h(t),e,r)},r.unzipSync=function(e,t){return a(new h(t),e)},r.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new s(t),e,r)},r.inflateSync=function(e,t){return a(new s(t),e)},r.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new u(t),e,r)},r.gunzipSync=function(e,t){return a(new u(t),e)},r.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new p(t),e,r)},r.inflateRawSync=function(e,t){return a(new p(t),e)},g.inherits(f,d),f.prototype.params=function(e,n,i){if(er.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var a=this;this.flush(m.Z_SYNC_FLUSH,function(){a._binding.params(e,n),a._hadError||(a._level=e,a._strategy=n,i&&i())})}else t.nextTick(i)},f.prototype.reset=function(){return this._binding.reset()},f.prototype._flush=function(e){this._transform(new n(0),"",e)},f.prototype.flush=function(e,r){var i=this._writableState;if(("function"==typeof e||void 0===e&&!r)&&(r=e,e=m.Z_FULL_FLUSH),i.ended)r&&t.nextTick(r);else if(i.ending)r&&this.once("end",r);else if(i.needDrain){var a=this;this.once("drain",function(){a.flush(r)})}else this._flushFlag=e,this.write(new n(0),"",r)},f.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var r=this;t.nextTick(function(){r.emit("close")})}},f.prototype._transform=function(e,t,r){var i,a=this._writableState,o=a.ending||a.ended,s=o&&(!e||a.length===e.length);if(null===!e&&!n.isBuffer(e))return r(new Error("invalid input"));s?i=m.Z_FINISH:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||m.Z_NO_FLUSH));this._processChunk(e,i,r)},f.prototype._processChunk=function(e,t,r){function i(l,f){if(!c._hadError){var d=o-f;if(v(d>=0,"have should not go down"),d>0){var m=c._buffer.slice(c._offset,c._offset+d);c._offset+=d,u?c.push(m):(p.push(m),h+=m.length)}if((0===f||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=new n(c._chunkSize)),0===f){if(s+=a-l,a=l,!u)return!0;var g=c._binding.write(t,e,s,a,c._buffer,c._offset,c._chunkSize);return g.callback=i,void(g.buffer=e)}if(!u)return!1;r()}}var a=e&&e.length,o=this._chunkSize-this._offset,s=0,c=this,u="function"==typeof r;if(!u){var l,p=[],h=0;this.on("error",function(e){l=e});do{var f=this._binding.writeSync(t,e,s,a,this._buffer,this._offset,o)}while(!this._hadError&&i(f[0],f[1]));if(this._hadError)throw l;var d=n.concat(p,h);return this.close(),d}var m=this._binding.write(t,e,s,a,this._buffer,this._offset,o);m.buffer=e,m.callback=i},g.inherits(o,f),g.inherits(s,f),g.inherits(c,f),g.inherits(u,f),g.inherits(l,f),g.inherits(p,f),g.inherits(h,f)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":118,_process:438,_stream_transform:466,assert:77,buffer:123,util:542}],120:[function(e,t,r){arguments[4][92][0].apply(r,arguments)},{dup:92}],121:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,a=n.SlowBuffer,o=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var n=r,a=t;void 0===a&&(n=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var c=new i(a,n),u=c.length,l=-1;++lo)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=r;if(1===arguments.length)return new i(e);void 0===a&&(a=0);var o=n;if(void 0===o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:123}],122:[function(e,t,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),a=0;a=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function g(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}var u;if(i){var l=-1;for(u=r;us&&(r=s-c),u=r;u>=0;u--){for(var p=!0,h=0;hi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var c,u,l,p;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],128==(192&c)&&(p=(31&a)<<6|63&c)>127&&(o=p);break;case 3:c=e[i+1],u=e[i+2],128==(192&c)&&128==(192&u)&&(p=(15&a)<<12|(63&c)<<6|63&u)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:c=e[i+1],u=e[i+2],l=e[i+3],128==(192&c)&&128==(192&u)&&128==(192&l)&&(p=(15&a)<<18|(63&c)<<12|(63&u)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return T(n)}function T(e){var t=e.length;if(t<=Y)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function z(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function B(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return i||B(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||B(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function L(e){if(e=U(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function $(e){for(var t=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function X(e){return J.toByteArray(L(e))}function G(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var J=e("base64-js"),Z=e("ieee754"),Q=e("isarray");r.Buffer=a,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return c(null,e,t,r)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},a.prototype.compare=function(e,t,r,n,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,c=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),p=0;pi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return j(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Y=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return t||q(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||q(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||q(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||q(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||q(e,t,this.length);for(var n=this[e],i=1,a=0;++a=i&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||q(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||q(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||q(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||q(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||q(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||q(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||q(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||q(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){R(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,
+this[t+1]=e>>>8):M(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o2&&(t=h.call(arguments,1)),r(t)})})}function o(e){return Promise.all(e.map(i,this))}function s(e){for(var t=new e.constructor,r=Object.keys(e),n=[],a=0;a>>2),o=0,s=0;o>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,l=271733878,p=0;p>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e,t){return e<>>32-t}var p=e("./make-hash");t.exports=function(e){return p(e,n)}},{"./make-hash":132}],134:[function(e,t,r){"use strict";function n(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>r){t=("rmd160"===e?new u:l(e)).update(t).digest()}else t.lengthc?t=e(t):t.lengtha;a++){var o=255&r[a>>>2]>>>24-a%4*8;t[n+a>>>2]|=o<<24-(n+a)%4*8}else if(r.length>65535)for(var a=0;i>a;a+=4)t[n+a>>>2]=r[a>>>2];else t.push.apply(t,r);return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;t>n;n+=4)r.push(0|4294967296*e.random());return new a.init(r,t)}}),o=r.enc={},s=o.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;r>i;i++){var a=255&t[i>>>2]>>>24-i%4*8;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=o.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;r>i;i++){var a=255&t[i>>>2]>>>24-i%4*8;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},u=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=4*o,c=i/s;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var u=c*o,l=e.min(4*u,i);if(u){for(var p=0;u>p;p+=o)this._doProcessBlock(n,p);var h=n.splice(0,u);r.sigBytes-=l}return new a.init(h,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=l.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=r.algo={};return r}(Math);return e})},{}],138:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core"),e("./sha1"),e("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],i):i(n.CryptoJS)}(this,function(e){return e.HmacSHA1})},{"./core":137,"./hmac":139,"./sha1":140}],139:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(e){!function(){var t=e,r=t.lib,n=r.Base,i=t.enc,a=i.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,c=o.words,u=0;r>u;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}()})},{"./core":137}],140:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],c=r[4],u=0;80>u;u++){if(16>u)o[u]=0|e[t+u];else{var l=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=l<<1|l>>>31}var p=(n<<5|n>>>27)+c+o[u];p+=20>u?1518500249+(i&a|~i&s):40>u?1859775393+(i^a^s):60>u?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=n,n=p}r[0]=0|r[0]+n,r[1]=0|r[1]+i,r[2]=0|r[2]+a,r[3]=0|r[3]+s,r[4]=0|r[4]+c},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),e.SHA1})},{"./core":137}],141:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function a(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))}),e.splice(a,0,n)}}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function c(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}r=t.exports=e("./debug"),r.log=o,r.formatArgs=a,r.save=s,r.load=c,r.useColors=i,r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(c())}).call(this,e("_process"))},{"./debug":142,_process:438}],142:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(u||n);e.diff=i,e.prev=u,e.curr=n,u=n;for(var a=new Array(arguments.length),o=0;o0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},n.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=c.r28shl(r,o),n=c.r28shl(n,o),c.pc2(r,n,e.keys,i)}},i.prototype._update=function(e,t,r,n){var i=this._desState,a=c.readUInt32BE(e,t),o=c.readUInt32BE(e,t+4);c.ip(a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,o,i.tmp,0):this._decrypt(i,a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],c.writeUInt32BE(r,a,n),c.writeUInt32BE(r,o,n+4)},i.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=f}c.rip(o,a,n,i)},i.prototype._decrypt=function(e,t,r,n,i){for(var a=r,o=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],l=e.keys[s+1];c.expand(a,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var p=c.substitute(u,l),h=c.permute(p),f=a;a=(o^h)>>>0,o=f}c.rip(a,o,n,i)}},{"../des":144,inherits:217,"minimalistic-assert":396}],148:[function(e,t,r){"use strict";function n(e,t){a.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[u.create({type:"encrypt",key:r}),u.create({type:"decrypt",key:n}),u.create({type:"encrypt",key:i})]:[u.create({type:"decrypt",key:i}),u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:r})]}function i(e){c.call(this,e);var t=new n(this.type,this.options.key);this._edeState=t}var a=e("minimalistic-assert"),o=e("inherits"),s=e("../des"),c=s.Cipher,u=s.DES;o(i,c),t.exports=i,i.create=function(e){return new i(e)},i.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},i.prototype._pad=u.prototype._pad,i.prototype._unpad=u.prototype._unpad},{"../des":144,inherits:217,"minimalistic-assert":396}],149:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}r[n+0]=i>>>0,r[n+1]=a>>>0},r.rip=function(e,t,r,n){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},r.pc1=function(e,t,r,n){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var a=0,o=0,s=n.length>>>1,c=0;c>>n[c]&1;for(var c=s;c>>n[c]&1;r[i+0]=a>>>0,r[i+1]=o>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(var a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){var a=e>>>18-6*n&63,o=i[64*n+a];r<<=4,r|=o}for(var n=0;n<4;n++){var a=t>>>18-6*n&63,o=i[256+64*n+a];r<<=4,r|=o}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>a[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(h),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(d))for(;r.mod(m).cmp(g);)r.iadd(b)}else for(;r.mod(u).cmp(v);)r.iadd(b);if(n=r.shrn(1),i(n)&&i(r)&&a(n)&&a(r)&&p.test(n)&&p.test(r))return r}}var s=e("randombytes");t.exports=o,o.simpleSieve=i,o.fermatTest=a;var c=e("bn.js"),u=new c(24),l=e("miller-rabin"),p=new l,h=new c(1),f=new c(2),d=new c(5),m=(new c(16),new c(8),new c(10)),g=new c(3),v=(new c(7),new c(11)),b=new c(4),y=(new c(12),null)},{"bn.js":89,"miller-rabin":392,randombytes:454}],153:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],154:[function(e,t,r){(function(t){function n(e,t){return e.length>=t?e:n("0"+e,t)}var i=e("crypto"),a=e("jsbn").BigInteger;e("./lib/ec.js").ECPointFp;r.ECCurves=e("./lib/sec.js"),r.ECKey=function(e,r,o){var s,c=e(),u=c.getN(),l=Math.floor(u.bitLength()/8);if(r)if(o){var e=c.getCurve();this.P=e.decodePointHex(r.toString("hex"))}else{if(r.length!=l)return!1;s=new a(r.toString("hex"),16)}else{var p=u.subtract(a.ONE),h=new a(i.randomBytes(u.bitLength()));s=h.mod(p).add(a.ONE),this.P=c.getG().multiply(s)}this.P&&(this.PublicKey=new t(c.getCurve().encodeCompressedPointHex(this.P),"hex")),s&&(this.PrivateKey=new t(n(s.toString(16),2*l),"hex"),this.deriveSharedSecret=function(e){if(!e||!e.P)return!1;var r=e.P.multiply(s);return new t(n(r.getX().toBigInteger().toString(16),2*l),"hex")})}}).call(this,e("buffer").Buffer)},{"./lib/ec.js":155,"./lib/sec.js":156,buffer:123,crypto:136,jsbn:228}],155:[function(e,t,r){function n(e,t){this.x=t,this.q=e}function i(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)}function a(){return this.x}function o(){return new n(this.q,this.x.negate().mod(this.q))}function s(e){return new n(this.q,this.x.add(e.toBigInteger()).mod(this.q))}function c(e){return new n(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))}function u(e){return new n(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))}function l(){return new n(this.q,this.x.square().mod(this.q))}function p(e){return new n(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))}function h(e,t,r,n){this.curve=e,this.x=t,this.y=r,this.z=null==n?P.ONE:n,this.zinv=null}function f(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function d(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function m(e){if(e==this)return!0;if(this.isInfinity())return e.isInfinity();if(e.isInfinity())return this.isInfinity();var t,r;return t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),!!t.equals(P.ZERO)&&(r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q),r.equals(P.ZERO))}function g(){return null==this.x&&null==this.y||this.z.equals(P.ZERO)&&!this.y.toBigInteger().equals(P.ZERO)}function v(){return new h(this.curve,this.x,this.y.negate(),this.z)}function b(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(P.ZERO.equals(r))return P.ZERO.equals(t)?this.twice():this.curve.getInfinity();var n=new P("3"),i=this.x.toBigInteger(),a=this.y.toBigInteger(),o=(e.x.toBigInteger(),e.y.toBigInteger(),r.square()),s=o.multiply(r),c=i.multiply(o),u=t.square().multiply(this.z),l=u.subtract(c.shiftLeft(1)).multiply(e.z).subtract(s).multiply(r).mod(this.curve.q),p=c.multiply(n).multiply(t).subtract(a.multiply(s)).subtract(u.multiply(t)).multiply(e.z).add(t.multiply(s)).mod(this.curve.q),f=s.multiply(this.z).multiply(e.z).mod(this.curve.q);return new h(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(p),f)}function y(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new P("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),a=this.curve.a.toBigInteger(),o=t.square().multiply(e);P.ZERO.equals(a)||(o=o.add(this.z.square().multiply(a))),o=o.mod(this.curve.q);var s=o.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),c=o.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(o.square().multiply(o)).mod(this.curve.q),u=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new h(this.curve,this.curve.fromBigInteger(s),this.curve.fromBigInteger(c),u)}function w(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e,n=r.multiply(new P("3")),i=this.negate(),a=this;for(t=n.bitLength()-2;t>0;--t){a=a.twice();var o=n.testBit(t);o!=r.testBit(t)&&(a=a.add(o?this:i))}return a}function x(e,t,r){var n;n=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),a=this.add(t);n>=0;)i=i.twice(),e.testBit(n)?i=r.testBit(n)?i.add(a):i.add(this):r.testBit(n)&&(i=i.add(t)),--n;return i}function k(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new h(this,null,null),this.reducer=new O(this.q)}function _(){return this.q}function j(){return this.a}function S(){return this.b}function E(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)}function C(){return this.infinity}function A(e){return new n(this.q,e)}function T(e){this.reducer.reduce(e)}function I(e){if(e.isInfinity())return"00";var t=e.getX().toBigInteger().toString(16),r=e.getY().toBigInteger().toString(16),n=this.getQ().toString(16).length;for(n%2!=0&&n++;t.length128){-1==this.q.shiftRight(e-64).intValue()&&(this.r=P.ONE.shiftLeft(e).subtract(this.q))}return this.r},n.prototype.modMult=function(e,t){return this.modReduce(e.multiply(t))},n.prototype.modReduce=function(e){if(null!=this.getR()){for(var t=q.bitLength();e.bitLength()>t+1;){var r=e.shiftRight(t),n=e.subtract(r.shiftLeft(t));this.getR().equals(P.ONE)||(r=r.multiply(this.getR())),e=r.add(n)}for(;e.compareTo(q)>=0;)e=e.subtract(q)}else e=e.mod(q);return e},n.prototype.sqrt=function(){if(!this.q.testBit(0))throw"unsupported";if(this.q.testBit(1)){var e=new n(this.q,this.x.modPow(this.q.shiftRight(2).add(P.ONE),this.q));return e.square().equals(this)?e:null}var t=this.q.subtract(P.ONE),r=t.shiftRight(1);if(!this.x.modPow(r,this.q).equals(P.ONE))return null;var i,a,o=t.shiftRight(2),s=o.shiftLeft(1).add(P.ONE),c=this.x,u=modDouble(modDouble(c));do{var l;do{l=new P(this.q.bitLength(),new SecureRandom)}while(l.compareTo(this.q)>=0||!l.multiply(l).subtract(u).modPow(r,this.q).equals(t));var p=this.lucasSequence(l,c,s);if(i=p[0],a=p[1],this.modMult(a,a).equals(u))return a.testBit(0)&&(a=a.add(q)),a=a.shiftRight(1),new n(q,a)}while(i.equals(P.ONE)||i.equals(t));return null},n.prototype.lucasSequence=function(e,t,r){for(var n=r.bitLength(),i=r.getLowestSetBit(),a=P.ONE,o=P.TWO,s=e,c=P.ONE,u=P.ONE,l=n-1;l>=i+1;--l)c=this.modMult(c,u),r.testBit(l)?(u=this.modMult(c,t),a=this.modMult(a,s),o=this.modReduce(s.multiply(o).subtract(e.multiply(c))),s=this.modReduce(s.multiply(s).subtract(u.shiftLeft(1)))):(u=c,a=this.modReduce(a.multiply(o).subtract(c)),s=this.modReduce(s.multiply(o).subtract(e.multiply(c))),o=this.modReduce(o.multiply(o).subtract(c.shiftLeft(1))));c=this.modMult(c,u),u=this.modMult(c,t),a=this.modReduce(a.multiply(o).subtract(c)),o=this.modReduce(s.multiply(o).subtract(e.multiply(c))),c=this.modMult(c,u);for(var l=1;l<=i;++l)a=this.modMult(a,o),o=this.modReduce(o.multiply(o).subtract(c.shiftLeft(1))),c=this.modMult(c,c);return[a,o]};var r={ECCurveFp:k,ECPointFp:h,ECFieldElementFp:n};t.exports=r},{jsbn:228}],156:[function(e,t,r){function n(e,t,r,n){this.curve=e,this.g=t,this.n=r,this.h=n}function i(){return this.curve}function a(){return this.g}function o(){return this.n}function s(){return this.h}function c(e){return new g(e,16)}function u(){var e=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"),r=c("E87579C11079F43DD824993C2CEE5ED3"),i=c("FFFFFFFE0000000075A30D1B9038A115"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83"),i,a)}function l(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"),t=g.ZERO,r=c("7"),i=c("0100000000000000000001B8FA16DFAB9ACA16B6B3"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE"),i,a)}function p(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"),r=c("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"),i=c("0100000000000000000001F4C8F927AED3CA752257"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32"),i,a)}function h(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"),t=g.ZERO,r=c("3"),i=c("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"),i,a)}function f(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"),r=c("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"),i=c("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811"),i,a)}function d(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"),r=c("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"),i=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34"),i,a)}function m(){var e=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),r=c("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),i=c("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),a=g.ONE,o=new v(e,t,r);return new n(o,o.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"),i,a)}var g=e("jsbn").BigInteger,v=e("./ec.js").ECCurveFp;n.prototype.getCurve=i,n.prototype.getG=a,n.prototype.getN=o,n.prototype.getH=s,t.exports={secp128r1:u,secp160k1:l,secp160r1:p,secp192k1:h,secp192r1:f,secp224r1:d,secp256r1:m}},{"./ec.js":155,jsbn:228}],157:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":172,"./elliptic/curve":160,"./elliptic/curves":163,"./elliptic/ec":164,"./elliptic/eddsa":167,"./elliptic/utils":171,brorand:90}],158:[function(e,t,r){"use strict";function n(e,t){this.type=e,this.p=new a(t.p,16),this.red=t.prime?a.red(t.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=t.n&&new a(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);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function i(e,t){this.curve=e,this.type=t,this.precomputed=null}var a=e("bn.js"),o=e("../../elliptic"),s=o.utils,c=s.getNAF,u=s.getJSF,l=s.assert;t.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},
n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(e,t){l(e.precomputed);var r=e._getDoubles(),n=c(t,1),i=(1<=o;t--)s=(s<<1)+n[t];a.push(s)}for(var u=this.jpoint(null,null,null),p=this.jpoint(null,null,null),h=i;h>0;h--){for(var o=0;o=0;s--){for(var t=0;s>=0&&0===a[s];s--)t++;if(s>=0&&t++,o=o.dblp(t),s<0)break;var u=a[s];l(0!==u),o="affine"===e.type?u>0?o.mixedAdd(i[u-1>>1]):o.mixedAdd(i[-u-1>>1].neg()):u>0?o.add(i[u-1>>1]):o.add(i[-u-1>>1].neg())}return"affine"===e.type?o.toP():o},n.prototype._wnafMulAdd=function(e,t,r,n,i){for(var a=this._wnafT1,o=this._wnafT2,s=this._wnafT3,l=0,p=0;p=1;p-=2){var d=p-1,m=p;if(1===a[d]&&1===a[m]){var g=[t[d],null,null,t[m]];0===t[d].y.cmp(t[m].y)?(g[1]=t[d].add(t[m]),g[2]=t[d].toJ().mixedAdd(t[m].neg())):0===t[d].y.cmp(t[m].y.redNeg())?(g[1]=t[d].toJ().mixedAdd(t[m]),g[2]=t[d].add(t[m].neg())):(g[1]=t[d].toJ().mixedAdd(t[m]),g[2]=t[d].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=u(r[d],r[m]);l=Math.max(b[0].length,l),s[d]=new Array(l),s[m]=new Array(l);for(var y=0;y=0;p--){for(var j=0;p>=0;){for(var S=!0,y=0;y=0&&j++,k=k.dblp(j),p<0)break;for(var y=0;y0?h=o[y][E-1>>1]:E<0&&(h=o[y][-E-1>>1].neg()),k="affine"===h.type?k.mixedAdd(h):k.add(h))}}for(var p=0;p=Math.ceil((e.bitLength()+1)/t.step)},i.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),c=i.redMul(o),u=a.redMul(s),l=i.redMul(s),p=o.redMul(a);return this.curve.point(c,u,p,l)},i.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(i),s=o.redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(o.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var c=this.z.redSqr(),u=s.redSub(c).redISub(c);e=n.redSub(i).redISub(a).redMul(u),t=s.redMul(o.redSub(a)),r=s.redMul(u)}}else{var o=i.redAdd(a),c=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=o.redSub(c).redSub(c);e=this.curve._mulC(n.redISub(o)).redMul(u),t=this.curve._mulC(o).redMul(i.redISub(a)),r=o.redMul(u)}return this.curve.point(e,t,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=a.redMul(o),l=s.redMul(c),p=a.redMul(c),h=o.redMul(s);return this.curve.point(u,l,h,p)},i.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),p=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=c.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(c).redMul(u)),this.curve.point(p,t,r)},i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},i.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},i.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},{"../../elliptic":157,"../curve":160,"bn.js":89,inherits:217}],160:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":158,"./edwards":159,"./mont":161,"./short":162}],161:[function(e,t,r){"use strict";function n(e){c.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,r){c.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var a=e("../curve"),o=e("bn.js"),s=e("inherits"),c=a.base,u=e("../../elliptic"),l=u.utils;s(n,c),t.exports=n,n.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},s(i,c.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(l.toArray(e,t),1)},n.prototype.point=function(e,t){return new i(this,e,t)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),a=t.redMul(n),o=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,o)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(r),s=i.redMul(n),c=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(c,u)},i.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":157,"../curve":160,"bn.js":89,inherits:217}],162:[function(e,t,r){"use strict";function n(e){l.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(e,t,r,n){l.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(e,t,r,n){l.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(r,16),this.z=new c(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=e("../curve"),s=e("../../elliptic"),c=e("bn.js"),u=e("inherits"),l=o.base,p=s.utils.assert;u(n,l),t.exports=n,n.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=n[0].cmp(n[1])<0?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new c(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],p(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var a;return a=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:a}}},n.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),r=new c(2).toRed(t).redInvm(),n=r.redNeg(),i=new c(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},n.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,o,s,u,l,p=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,f=this.n.clone(),d=new c(1),m=new c(0),g=new c(0),v=new c(1),b=0;0!==h.cmpn(0);){var y=f.div(h);u=f.sub(y.mul(h)),l=g.sub(y.mul(d));var w=v.sub(y.mul(m));if(!n&&u.cmp(p)<0)t=s.neg(),r=d,n=u.neg(),i=l;else if(n&&2==++b)break;s=u,f=h,h=u,g=d,d=l,v=m,m=w}a=u.neg(),o=l;var x=n.sqr().add(i.sqr());return a.sqr().add(o.sqr()).cmp(x)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:i},{a:a,b:o}]},n.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),c=i.mul(r.b),u=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:c.add(u).neg()}},n.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},n.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(a,l.BasePoint),n.prototype.jpoint=function(e,t,r){return new a(this,e,t,r)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),p=n.redMul(u),h=c.redSqr().redIAdd(l).redISub(p).redISub(p),f=c.redMul(p.redISub(h)).redISub(a.redMul(l)),d=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,f,d)},a.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),l=r.redMul(c),p=s.redSqr().redIAdd(u).redISub(l).redISub(l),h=s.redMul(l.redISub(p)).redISub(i.redMul(u)),f=this.z.redMul(o);return this.curve.jpoint(p,h,f)},a.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":157,"../curve":160,"bn.js":89,inherits:217}],163:[function(e,t,r){"use strict";function n(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:r}),r}})}var a=r,o=e("hash.js"),s=e("../elliptic"),c=s.utils.assert;a.PresetCurve=n,i("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"]}),i("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"]}),i("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"]}),i("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"]}),i("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"]}),i("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"]}),i("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"]});var u;try{u=e("./precomputed/secp256k1")}catch(e){u=void 0}i("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",u]})},{"../elliptic":157,"./precomputed/secp256k1":170,"hash.js":201}],164:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);"string"==typeof e&&(c(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var i=e("bn.js"),a=e("hmac-drbg"),o=e("../../elliptic"),s=o.utils,c=s.assert,u=e("./key"),l=e("./signature");t.exports=n,n.prototype.keyPair=function(e){return new u(this,e)},n.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},n.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},n.prototype.genKeyPair=function(e){e||(e={});for(var t=new a({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var s=new i(t.generate(r));if(!(s.cmp(n)>0))return s.iaddn(1),this.keyFromPrivate(s)}},n.prototype._truncateToN=function(e,t){
var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},n.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new a({hash:this.hash,entropy:s,nonce:c,pers:n.pers,persEnc:n.persEnc||"utf8"}),p=this.n.sub(new i(1)),h=0;!0;h++){var f=n.k?n.k(h):new i(u.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(p)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var m=d.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=f.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(v=v.umod(this.n),0!==v.cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new l({r:g,s:v,recoveryParam:b})}}}}}},n.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n),t=new l(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var p=this.g.mulAdd(c,r.getPublic(),u);return!p.isInfinity()&&0===p.getX().umod(this.n).cmp(a)}var p=this.g.jmulAdd(c,r.getPublic(),u);return!p.isInfinity()&&p.eqXToP(a)},n.prototype.recoverPubKey=function(e,t,r,n){c((3&r)===r,"The recovery param is more than two bits"),t=new l(t,n);var a=this.n,o=new i(e),s=t.r,u=t.s,p=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),p):this.curve.pointFromX(s,p);var f=t.r.invm(a),d=a.sub(o).mul(f).umod(a),m=u.mul(f).umod(a);return this.g.mulAdd(d,s,m)},n.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new l(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":157,"./key":165,"./signature":166,"bn.js":89,"hmac-drbg":208}],165:[function(e,t,r){"use strict";function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var i=e("bn.js"),a=e("../../elliptic"),o=a.utils,s=o.assert;t.exports=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},n.prototype.derive=function(e){return e.mul(this.priv).getX()},n.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},n.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},n.prototype.inspect=function(){return""}},{"../../elliptic":157,"bn.js":89}],166:[function(e,t,r){"use strict";function n(e,t){if(e instanceof n)return e;this._importDER(e,t)||(p(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function i(){this.place=0}function a(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,a=0,o=t.place;a>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var c=e("bn.js"),u=e("../../elliptic"),l=u.utils,p=l.assert;t.exports=n,n.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new i;if(48!==e[r.place++])return!1;if(a(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var n=a(e,r),o=e.slice(r.place,n+r.place);if(r.place+=n,2!==e[r.place++])return!1;var s=a(e,r);if(e.length!==s+r.place)return!1;var u=e.slice(r.place,s+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new c(o),this.s=new c(u),this.recoveryParam=null,!0},n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=o(t),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];s(n,t.length),n=n.concat(t),n.push(2),s(n,r.length);var i=n.concat(r),a=[48];return s(a,i.length),a=a.concat(i),l.encode(a,e)}},{"../../elliptic":157,"bn.js":89}],167:[function(e,t,r){"use strict";function n(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof n))return new n(e);var e=a.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}var i=e("hash.js"),a=e("../../elliptic"),o=a.utils,s=o.assert,c=o.parseBytes,u=e("./key"),l=e("./signature");t.exports=n,n.prototype.sign=function(e,t){e=c(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),s=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:a})},n.prototype.verify=function(e,t,r){e=c(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},n.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,c=1;c0||t.cmpn(-i)>0;){var a=e.andln(3)+n&3,o=t.andln(3)+i&3;3===a&&(a=-1),3===o&&(o=-1);var s;if(0==(1&a))s=0;else{var c=e.andln(7)+n&7;s=3!==c&&5!==c||2!==o?a:-a}r[0].push(s);var u;if(0==(1&o))u=0;else{var c=t.andln(7)+i&7;u=3!==c&&5!==c||2!==a?o:-o}r[1].push(u),2*n===s+1&&(n=1-n),2*i===u+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function a(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function o(e){return"string"==typeof e?c.toArray(e,"hex"):e}function s(e){return new u(e,"hex","le")}var c=r,u=e("bn.js"),l=e("minimalistic-assert"),p=e("minimalistic-crypto-utils");c.assert=l,c.toArray=p.toArray,c.zero2=p.zero2,c.toHex=p.toHex,c.encode=p.encode,c.getNAF=n,c.getJSF=i,c.cachedProperty=a,c.parseBytes=o,c.intFromLE=s},{"bn.js":89,"minimalistic-assert":396,"minimalistic-crypto-utils":397}],172:[function(e,t,r){t.exports={_args:[[{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},"C:\\Users\\User4\\Desktop\\projects\\quickblox-javascript-sdk\\node_modules\\browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.4.0",_inCache:!0,_location:"/elliptic",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"elliptic@^6.0.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.0.0",spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"C:\\Users\\User4\\Desktop\\projects\\quickblox-javascript-sdk\\node_modules\\browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},files:["lib"],gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],173:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(r=this._events[e],s(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),u=r.slice(),n=u.length,c=0;c0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],174:[function(e,t,r){(function(r){function n(e,t,n,a){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),n/=8,a=a||0;for(var o,s,c=0,u=0,l=new r(n),p=new r(a),h=0,f=[];;){if(h++>0&&f.push(o),f.push(e),t&&f.push(t),o=i(r.concat(f)),f=[],s=0,n>0)for(;;){if(0===n)break;if(s===o.length)break;l[c++]=o[s],n--,s++}if(a>0&&s!==o.length)for(;;){if(0===a)break;if(s===o.length)break;p[u++]=o[s],a--,s++}if(0===n&&0===a)break}for(s=0;s0)throw new Error("non-zero precision not supported");switch(t.match(/-/)&&(u=!0),t.match(/0/)&&(l="0"),t.match(/\+/)&&(p=!0),c){case"s":if(void 0===h||null===h)throw new Error("argument "+b+": attempted to print undefined or null as a string");v+=i(l,r,u,h.toString());break;case"d":h=Math.floor(h);case"f":p=p&&h>0?"+":"",v+=p+i(l,r,u,h.toString());break;case"j":0===r&&(r=10),v+=s.inspect(h,!1,r);break;case"r":v+=a(h);break;default:throw new Error("unsupported conversion: "+c)}}else v+="%";return v+=e}function i(e,t,r,n){for(var i=n;i.length0&&!e.useChunkedEncodingByDefault){var o=this.freeSockets[i].pop();o.removeListener("error",o._onIdleError),delete o._onIdleError,e._reusedSocket=!0,e.onSocket(o)}else this.addRequestNoreuse(e,t,r)},i.prototype.removeSocket=function(e,t,r,n){if(this.sockets[t]){var i=this.sockets[t].indexOf(e);-1!==i&&this.sockets[t].splice(i,1)}else this.sockets[t]&&0===this.sockets[t].length&&(delete this.sockets[t],delete this.requests[t]);if(this.freeSockets[t]){var i=this.freeSockets[t].indexOf(e);-1!==i&&(this.freeSockets[t].splice(i,1),0===this.freeSockets[t].length&&delete this.freeSockets[t])}this.requests[t]&&this.requests[t].length&&this.createSocket(t,r,n).emit("free")},s.inherits(a,i),a.prototype.createConnection=o,a.prototype.addRequestNoreuse=p.prototype.addRequest},{http:519,https:214,net:120,tls:120,util:542}],178:[function(e,t,r){t.exports="object"==typeof self?self.FormData:window.FormData},{}],179:[function(e,t,r){t.exports={id:"afterRequest.json#",type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},lastAccess:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}}},{}],180:[function(e,t,r){t.exports={id:"beforeRequest.json#",type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},lastAccess:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}}},{}],181:[function(e,t,r){t.exports={id:"browser.json#",type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},{}],182:[function(e,t,r){t.exports={id:"cache.json#",properties:{beforeRequest:{oneOf:[{type:"null"},{$ref:"beforeRequest.json#"}]},afterRequest:{oneOf:[{type:"null"},{$ref:"afterRequest.json#"}]},comment:{type:"string"}}}},{}],183:[function(e,t,r){t.exports={id:"content.json#",type:"object",required:["size","mimeType"],properties:{size:{type:"integer"},compression:{type:"integer"},mimeType:{type:"string"},text:{type:"string"},encoding:{type:"string"},comment:{type:"string"}}}},{}],184:[function(e,t,r){t.exports={id:"cookie.json#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},path:{type:"string"},domain:{type:"string"},expires:{type:["string","null"],format:"date-time"},httpOnly:{type:"boolean"},secure:{type:"boolean"},comment:{type:"string"}}}},{}],185:[function(e,t,r){t.exports={id:"creator.json#",type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},{}],186:[function(e,t,r){t.exports={id:"entry.json#",type:"object",optional:!0,required:["startedDateTime","time","request","response","cache","timings"],properties:{pageref:{
-type:"string"},startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},time:{type:"number",min:0},request:{$ref:"request.json#"},response:{$ref:"response.json#"},cache:{$ref:"cache.json#"},timings:{$ref:"timings.json#"},serverIPAddress:{type:"string",oneOf:[{format:"ipv4"},{format:"ipv6"}]},connection:{type:"string"},comment:{type:"string"}}}},{}],187:[function(e,t,r){t.exports={id:"har.json#",type:"object",required:["log"],properties:{log:{$ref:"log.json#"}}}},{}],188:[function(e,t,r){t.exports={id:"header.json#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},{}],189:[function(e,t,r){"use strict";t.exports={afterRequest:e("./afterRequest.json"),beforeRequest:e("./beforeRequest.json"),browser:e("./browser.json"),cache:e("./cache.json"),content:e("./content.json"),cookie:e("./cookie.json"),creator:e("./creator.json"),entry:e("./entry.json"),har:e("./har.json"),header:e("./header.json"),log:e("./log.json"),page:e("./page.json"),pageTimings:e("./pageTimings.json"),postData:e("./postData.json"),query:e("./query.json"),request:e("./request.json"),response:e("./response.json"),timings:e("./timings.json")}},{"./afterRequest.json":179,"./beforeRequest.json":180,"./browser.json":181,"./cache.json":182,"./content.json":183,"./cookie.json":184,"./creator.json":185,"./entry.json":186,"./har.json":187,"./header.json":188,"./log.json":190,"./page.json":191,"./pageTimings.json":192,"./postData.json":193,"./query.json":194,"./request.json":195,"./response.json":196,"./timings.json":197}],190:[function(e,t,r){t.exports={id:"log.json#",type:"object",required:["version","creator","entries"],properties:{version:{type:"string"},creator:{$ref:"creator.json#"},browser:{$ref:"browser.json#"},pages:{type:"array",items:{$ref:"page.json#"}},entries:{type:"array",items:{$ref:"entry.json#"}},comment:{type:"string"}}}},{}],191:[function(e,t,r){t.exports={id:"page.json#",type:"object",optional:!0,required:["startedDateTime","id","title","pageTimings"],properties:{startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},id:{type:"string",unique:!0},title:{type:"string"},pageTimings:{$ref:"pageTimings.json#"},comment:{type:"string"}}}},{}],192:[function(e,t,r){t.exports={id:"pageTimings.json#",type:"object",properties:{onContentLoad:{type:"number",min:-1},onLoad:{type:"number",min:-1},comment:{type:"string"}}}},{}],193:[function(e,t,r){t.exports={id:"postData.json#",type:"object",optional:!0,required:["mimeType"],properties:{mimeType:{type:"string"},text:{type:"string"},params:{type:"array",required:["name"],properties:{name:{type:"string"},value:{type:"string"},fileName:{type:"string"},contentType:{type:"string"},comment:{type:"string"}}},comment:{type:"string"}}}},{}],194:[function(e,t,r){t.exports={id:"query.json#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},{}],195:[function(e,t,r){t.exports={id:"request.json#",type:"object",required:["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],properties:{method:{type:"string"},url:{type:"string",format:"uri"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookie.json#"}},headers:{type:"array",items:{$ref:"header.json#"}},queryString:{type:"array",items:{$ref:"query.json#"}},postData:{$ref:"postData.json#"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},{}],196:[function(e,t,r){t.exports={id:"response.json#",type:"object",required:["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookie.json#"}},headers:{type:"array",items:{$ref:"header.json#"}},content:{$ref:"content.json#"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},{}],197:[function(e,t,r){t.exports={id:"timings.json#",required:["send","wait","receive"],properties:{dns:{type:"number",min:-1},connect:{type:"number",min:-1},blocked:{type:"number",min:-1},send:{type:"number",min:-1},wait:{type:"number",min:-1},receive:{type:"number",min:-1},ssl:{type:"number",min:-1},comment:{type:"string"}}}},{}],198:[function(e,t,r){"use strict";function n(e){this.name="HARError",this.message="validation failed",this.errors=e,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error("validation failed").stack}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n,n.prototype=Error.prototype,t.exports=r.default},{}],199:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};T=T||new E.default({allErrors:!0,schemas:j});var r=T.getSchema(e+".json");return new Promise(function(e,n){r(t)?e(t):n(new A.default(r.errors))})}function a(e){return i("afterRequest",e)}function o(e){return i("beforeRequest",e)}function s(e){return i("browser",e)}function c(e){return i("cache",e)}function u(e){return i("content",e)}function l(e){return i("cookie",e)}function p(e){return i("creator",e)}function h(e){return i("entry",e)}function f(e){return i("har",e)}function d(e){return i("header",e)}function m(e){return i("log",e)}function g(e){return i("page",e)}function v(e){return i("pageTimings",e)}function b(e){return i("postData",e)}function y(e){return i("query",e)}function w(e){return i("request",e)}function x(e){return i("response",e)}function k(e){return i("timings",e)}Object.defineProperty(r,"__esModule",{value:!0}),r.validate=i,r.afterRequest=a,r.beforeRequest=o,r.browser=s,r.cache=c,r.content=u,r.cookie=l,r.creator=p,r.entry=h,r.har=f,r.header=d,r.log=m,r.page=g,r.pageTimings=v,r.postData=b,r.query=y,r.request=w,r.response=x,r.timings=k;var _=e("har-schema"),j=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(_),S=e("ajv"),E=n(S),C=e("./error"),A=n(C),T=void 0},{"./error":198,ajv:15,"har-schema":189}],200:[function(e,t,r){(function(r){"use strict";function n(e){i.call(this),this._block=new r(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var i=e("stream").Transform;e("inherits")(n,i),n.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},n.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=new r(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},n.prototype._update=function(e){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:123,inherits:217,stream:518}],201:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":202,"./hash/hmac":203,"./hash/ripemd":204,"./hash/sha":205,"./hash/utils":206}],202:[function(e,t,r){function n(){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}var i=e("../hash"),a=i.utils,o=a.assert;r.BlockHash=n,n.prototype.update=function(e,t){if(e=a.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=a.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else{n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;for(var a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t>>3}function d(e){return P(e,17)^P(e,19)^e>>>10}function m(e,t,r,n){return 0===e?c(t,r,n):1===e||3===e?l(t,r,n):2===e?u(t,r,n):void 0}function g(e,t,r,n,i,a){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function v(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function b(e,t,r,n,i,a){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function y(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function w(e,t){var r=R(e,t,28),n=R(t,e,2),i=R(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function x(e,t){var r=z(e,t,28),n=z(t,e,2),i=z(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function k(e,t){var r=R(e,t,14),n=R(e,t,18),i=R(t,e,9),a=r^n^i;return a<0&&(a+=4294967296),a}function _(e,t){var r=z(e,t,14),n=z(e,t,18),i=z(t,e,9),a=r^n^i;return a<0&&(a+=4294967296),a}function j(e,t){var r=R(e,t,1),n=R(e,t,8),i=B(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function S(e,t){var r=z(e,t,1),n=z(e,t,8),i=N(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function E(e,t){var r=R(e,t,19),n=R(t,e,29),i=B(e,t,6),a=r^n^i;return a<0&&(a+=4294967296),a}function C(e,t){var r=z(e,t,19),n=z(t,e,29),i=N(e,t,6),a=r^n^i;return a<0&&(a+=4294967296),a}var A=e("../hash"),T=A.utils,I=T.assert,P=T.rotr32,O=T.rotl32,D=T.sum32,q=T.sum32_4,M=T.sum32_5,R=T.rotr64_hi,z=T.rotr64_lo,B=T.shr64_hi,N=T.shr64_lo,F=T.sum64,L=T.sum64_hi,U=T.sum64_lo,H=T.sum64_4_hi,K=T.sum64_4_lo,$=T.sum64_5_hi,V=T.sum64_5_lo,G=A.common.BlockHash,X=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],J=[1518500249,1859775393,2400959708,3395469782];T.inherits(n,G),r.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(var n=0;n>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e,t){for(var r="",n=0;n>>0}return a}function l(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r}function p(e,t){return e>>>t|e<<32-t}function h(e,t){return e<>>32-t}function f(e,t){return e+t>>>0}function d(e,t,r){return e+t+r>>>0}function m(e,t,r,n){return e+t+r+n>>>0}function g(e,t,r,n,i){return e+t+r+n+i>>>0}function v(e,t){if(!e)throw new Error(t||"Assertion failed")}function b(e,t,r,n){var i=e[t],a=e[t+1],o=n+a>>>0,s=(o>>0,e[t+1]=o}function y(e,t,r,n){return(t+n>>>0>>0}function w(e,t,r,n){return t+n>>>0}function x(e,t,r,n,i,a,o,s){var c=0,u=t;return u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0}function k(e,t,r,n,i,a,o,s){return t+n+a+s>>>0}function _(e,t,r,n,i,a,o,s,c,u){var l=0,p=t;return p=p+n>>>0,l+=p>>0,l+=p