/* Counter block mode compatible with Dr Brian Gladman fileenc.c derived from CryptoJS.mode.CTR Jan Hruby jhruby.web@gmail.com (c) 2012 by C?dric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (c) 2012 by C?dric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. MIT License (c) copyright 2013-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors MIT License (c) copyright 2010-2014 original author or authors */ var $jscomp={scope:{},getGlobal:function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global?global:t}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(t){return"jscomp_symbol_"+t+$jscomp.symbolCounter_++}; $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};$jscomp.makeIterator=function(t){$jscomp.initSymbolIterator();if(t[$jscomp.global.Symbol.iterator])return t[$jscomp.global.Symbol.iterator]();var b=0;return{next:function(){return b==t.length?{done:!0}:{done:!1,value:t[b++]}}}}; $jscomp.arrayFromIterator=function(t){for(var b,l=[];!(b=t.next()).done;)l.push(b.value);return l};$jscomp.arrayFromIterable=function(t){return t instanceof Array?t:$jscomp.arrayFromIterator($jscomp.makeIterator(t))}; $jscomp.inherits=function(t,b){function l(){}l.prototype=b.prototype;t.prototype=new l;t.prototype.constructor=t;for(var g in b)if($jscomp.global.Object.defineProperties){var n=$jscomp.global.Object.getOwnPropertyDescriptor(b,g);n&&$jscomp.global.Object.defineProperty(t,g,n)}else t[g]=b[g]};$jscomp.array=$jscomp.array||{};$jscomp.array.done_=function(){return{done:!0,value:void 0}}; $jscomp.array.arrayIterator_=function(t,b){t instanceof String&&(t=String(t));var l=0;$jscomp.initSymbol();$jscomp.initSymbolIterator();var g={},n=(g.next=function(){if(lb;)--l in this?this[--t]=this[l]:delete this[t];return this};$jscomp.array.copyWithin$install=function(){Array.prototype.copyWithin||(Array.prototype.copyWithin=$jscomp.array.copyWithin)}; $jscomp.array.fill=function(t,b,l){null!=l&&t.length||(l=this.length||0);l=Number(l);for(b=Number((void 0===b?0:b)||0);b>>0;if(0===t)return 32;var b=0;0===(t&4294901760)&&(t<<=16,b+=16);0===(t&4278190080)&&(t<<=8,b+=8);0===(t&4026531840)&&(t<<=4,b+=4);0===(t&3221225472)&&(t<<=2,b+=2);0===(t&2147483648)&&b++;return b};$jscomp.math.imul=function(t,b){t=Number(t);b=Number(b);var l=t&65535,g=b&65535;return l*g+((t>>>16&65535)*g+l*(b>>>16&65535)<<16>>>0)|0};$jscomp.math.sign=function(t){t=Number(t);return 0===t||isNaN(t)?t:0t&&-.25t&&-.25t?-b:b};$jscomp.math.acosh=function(t){t=Number(t);return Math.log(t+Math.sqrt(t*t-1))};$jscomp.math.asinh=function(t){t=Number(t);if(0===t)return t;var b=Math.log(Math.abs(t)+Math.sqrt(t*t+1));return 0>t?-b:b}; $jscomp.math.atanh=function(t){t=Number(t);return($jscomp.math.log1p(t)-$jscomp.math.log1p(-t))/2}; $jscomp.math.hypot=function(t,b,l){for(var g=[],n=2;nf){t/=f;b/=f;m=t*t+b*b;g=$jscomp.makeIterator(g);for(n=g.next();!n.done;n=g.next())n=n.value,n=Number(n)/f,m+=n*n;return Math.sqrt(m)*f}f=t*t+b*b;g=$jscomp.makeIterator(g);for(n=g.next();!n.done;n=g.next())n=n.value,n=Number(n),f+= n*n;return Math.sqrt(f)};$jscomp.math.trunc=function(t){t=Number(t);if(isNaN(t)||Infinity===t||-Infinity===t||0===t)return t;var b=Math.floor(Math.abs(t));return 0>t?-b:b};$jscomp.math.cbrt=function(t){if(0===t)return t;t=Number(t);var b=Math.pow(Math.abs(t),1/3);return 0>t?-b:b};$jscomp.number=$jscomp.number||{};$jscomp.number.isFinite=function(t){return"number"!==typeof t?!1:!isNaN(t)&&Infinity!==t&&-Infinity!==t}; $jscomp.number.isInteger=function(t){return $jscomp.number.isFinite(t)?t===Math.floor(t):!1};$jscomp.number.isNaN=function(t){return"number"===typeof t&&isNaN(t)};$jscomp.number.isSafeInteger=function(t){return $jscomp.number.isInteger(t)&&Math.abs(t)<=$jscomp.number.MAX_SAFE_INTEGER};$jscomp.number.EPSILON=Math.pow(2,-52);$jscomp.number.MAX_SAFE_INTEGER=9007199254740991;$jscomp.number.MIN_SAFE_INTEGER=-9007199254740991;$jscomp.object=$jscomp.object||{}; $jscomp.object.assign=function(t,b){for(var l=[],g=1;gg||1114111=g?l+=String.fromCharCode(g):(g-=65536,l+=String.fromCharCode(g>>>10&1023|55296),l+=String.fromCharCode(g&1023|56320))}return l}; $jscomp.string.repeat=function(t){var b=this.toString();if(0>t||1342177279>>=1)b+=b;return l};$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)}; $jscomp.string.codePointAt=function(t){var b=this.toString(),l=b.length;t=Number(t)||0;if(0<=t&&tg||56319t||57343=n};$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)}; $jscomp.string.endsWith=function(t,b){$jscomp.string.noRegExp_(t,"endsWith");var l=this.toString();t+="";void 0===b&&(b=l.length);for(var g=Math.max(0,Math.min(b|0,l.length)),n=t.length;0=n};$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)}; (function(t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).autobahn=t()})(function(){return function b(l,g,n){function f(d,e){if(!g[d]){if(!l[d]){var k="function"==typeof require&&require;if(!e&&k)return k(d,!0);if(m)return m(d,!0);k=Error("Cannot find module '"+d+"'");throw k.code="MODULE_NOT_FOUND",k;}k=g[d]={exports:{}}; l[d][0].call(k.exports,function(c){var a=l[d][1][c];return f(a?a:c)},k,k.exports,b,l,g,n)}return g[d].exports}for(var m="function"==typeof require&&require,e=0;ethis._max_retry_delay&&(this._retry_delay=this._max_retry_delay);this._retry_count+=1;var c;c=this._retry&&(-1===this._max_retries||this._retry_count<=this._max_retries)?{count:this._retry_count,delay:this._retry_delay,will_retry:!0}:{count:null,delay:null,will_retry:!1};this._retry_delay_growth&&(this._retry_delay*=this._retry_delay_growth);return c};k.prototype.open=function(){function c(){a._transport=a._create_transport();if(a._transport)a._session= new m.Session(a._transport,a._defer,a._options.onchallenge),a._session_close_reason=null,a._session_close_message=null,a._transport.onopen=function(){a._autoreconnect_reset();a._connect_successes+=1;a._session.join(a._options.realm,a._options.authmethods,a._options.authid)},a._session.onjoin=function(c){if(a.onopen)try{a.onopen(a._session,c)}catch(k){d.debug("Exception raised from app code while firing Connection.onopen()",k)}},a._session.onleave=function(c,d){a._session_close_reason=c;a._session_close_message= d.message||"";a._retry=!1;a._transport.close(1E3)},a._transport.onclose=function(h){a._autoreconnect_reset_timer();var k=a._transport=null;0===a._connect_successes?(k="unreachable",a._retry_if_unreachable||(a._retry=!1)):k=h.wasClean?"closed":"lost";h=a._autoreconnect_advance();if(a.onclose){var e={reason:a._session_close_reason,message:a._session_close_message,retry_delay:h.delay,retry_count:h.count,will_retry:h.will_retry};try{var p=a.onclose(k,e)}catch(f){d.debug("Exception raised from app code while firing Connection.onclose()", f)}}a._session&&(a._session._id=null,a._session=null,a._session_close_reason=null,a._session_close_message=null);a._retry&&!p&&(h.will_retry?(a._is_retrying=!0,d.debug("retrying in "+h.delay+" s"),a._retry_timer=setTimeout(c,1E3*h.delay)):d.debug("giving up trying to reconnect"))};else if(a._retry=!1,a.onclose)a.onclose("unsupported",{reason:null,message:null,retry_delay:null,retry_count:null,will_retry:!1})}var a=this;if(a._transport)throw"connection already open (or opening)";a._autoreconnect_reset(); a._retry=!0;c()};k.prototype.close=function(c,a){if(!this._transport&&!this._is_retrying)throw"connection already closed";this._retry=!1;this._session&&this._session.isOpen?this._session.leave(c,a):this._transport&&this._transport.close(1E3)};Object.defineProperty(k.prototype,"defer",{get:function(){return this._defer}});Object.defineProperty(k.prototype,"session",{get:function(){return this._session}});Object.defineProperty(k.prototype,"isOpen",{get:function(){return this._session&&this._session.isOpen? !0:!1}});Object.defineProperty(k.prototype,"isConnected",{get:function(){return this._transport?!0:!1}});Object.defineProperty(k.prototype,"transport",{get:function(){return this._transport?this._transport:{info:{type:"none",url:null,protocol:null}}}});Object.defineProperty(k.prototype,"isRetrying",{get:function(){return this._is_retrying}});g.Connection=k}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./autobahn.js":3,"./log.js":6, "./session.js":16,"./util.js":20,when:93}],6:[function(b,l,g){(function(n){var f=function(){};"AUTOBAHN_DEBUG"in n&&AUTOBAHN_DEBUG&&"console"in n&&(f=function(){console.log.apply(console,arguments)});g.debug=f}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],7:[function(b,l,g){b("./polyfill/object");b("./polyfill/array");b("./polyfill/string");b("./polyfill/function");b("./polyfill/console");b("./polyfill/typedarray");b("./polyfill/json")}, {"./polyfill/array":8,"./polyfill/console":9,"./polyfill/function":10,"./polyfill/json":11,"./polyfill/object":12,"./polyfill/string":13,"./polyfill/typedarray":14}],8:[function(b,l,g){"function"!==typeof Array.prototype.reduce&&(Array.prototype.reduce=function(n){var f,m,e,d;if(null===this||"undefined"===typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!==typeof n)throw new TypeError(n+" is not a function");m=Object(this);f=m.length>>>0;d=0;if(2<= arguments.length)e=arguments[1];else{for(;d=f)throw new TypeError("Reduce of empty array with no initial value");e=m[d++]}for(;df&&(f+=this.length);0>f&&(f=0);for(var m=this.length;ff&&(f+= this.length);f>this.length-1&&(f=this.length-1);for(f++;0>>0)-1,e;if(2<=arguments.length)e=arguments[1];else{for(;0<=m&&!m in f;)m--;if(0>m)throw new TypeError("Reduce of empty array with no initial value");e=f[m--]}for(;0<=m;m--)m in f&&(e=n(e,f[m],m,f));return e})},{}],9:[function(b,l,g){(function(n){(function(f){f||(f=window.console={log:function(f,e,d, p,k){},info:function(f,e,d,p,k){},warn:function(f,e,d,p,k){},error:function(f,e,d,p,k){},assert:function(f,e){}});"object"===typeof f.log&&(f.log=Function.prototype.call.bind(f.log,f),f.info=Function.prototype.call.bind(f.info,f),f.warn=Function.prototype.call.bind(f.warn,f),f.error=Function.prototype.call.bind(f.error,f),f.debug=Function.prototype.call.bind(f.info,f));"group"in f||(f.group=function(m){f.info("\n--- "+m+" ---\n")});"groupEnd"in f||(f.groupEnd=function(){f.log("\n")});"assert"in f|| (f.assert=function(f,e){if(!f)try{throw Error("assertion failed: "+e);}catch(d){setTimeout(function(){throw d;},0)}});"time"in f||function(){var m={};f.time=function(e){m[e]=(new Date).getTime()};f.timeEnd=function(e){var d=(new Date).getTime();f.info(e+": "+(e in m?d-m[e]:0)+"ms")}}()})(n.console)}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],10:[function(b,l,g){Function.prototype.bind||(Function.prototype.bind=function(n){var f= this,m=Array.prototype.slice.call(arguments,1);return function(){return f.apply(n,Array.prototype.concat.apply(m,arguments))}})},{}],11:[function(b,l,g){"object"!==typeof JSON&&(JSON={});(function(){function n(a){return 10>a?"0"+a:a}function f(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var h=c[a];return"string"===typeof h?h:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function m(c,d){var e,n,b,g,G=p,x,y=d[c];y&&"object"===typeof y&&"function"===typeof y.toJSON&& (y=y.toJSON(c));"function"===typeof a&&(y=a.call(d,c,y));switch(typeof y){case "string":return f(y);case "number":return isFinite(y)?String(y):"null";case "boolean":case "null":return String(y);case "object":if(!y)return"null";p+=k;x=[];if("[object Array]"===Object.prototype.toString.apply(y)){g=y.length;for(e=0;e>q}function h(a,c){var q=32-c;return a<>>q}function z(a){return[a&255]}function n(c){return a(c[0],8)}function b(a){return[a&255]}function g(a){return h(a[0],8)}function B(a){a=na(Number(a));return[0>a?0:255>8&255,a&255]}function x(c){return a(c[0]<<8|c[1],16)}function y(a){return[a>>8&255,a&255]}function D(a){return h(a[0]<<8|a[1],16)}function l(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}function E(c){return a(c[0]<<24|c[1]<<16|c[2]<<8|c[3], 32)}function F(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}function q(a){return h(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function v(a,c,q){function h(a){var c=I(a);a-=c;return.5>a?c:.5a?1:0):0===a?(p=e=0,k=-Infinity===1/a?1:0):(k=0>a,a=L(a),a>=X(2,1-d)?(e=R(I(N(a)/K),1023),p=h(a/X(2,e)*X(2,q)),2<=p/X(2,q)&&(e+=1,p=1),e>d?(e=(1<>=1;h.reverse();k=h.join("");a=(1<h?-0:0}function J(a){return w(a,11,52)}function M(a){return v(a,11,52)}function H(a){return w(a,8,23)}function O(a){return v(a,8,23)}var K=Math.LN2,L=Math.abs,I=Math.floor,N=Math.log,V=Math.max,R=Math.min,X=Math.pow,na=Math.round;(function(){var a=Object.defineProperty,c;try{c=Object.defineProperty({},"x",{})}catch(q){c=!1}a&&c||(Object.defineProperty=function(c,q,h){if(a)try{return a(c,q,h)}catch(d){}if(c!==Object(c))throw TypeError("Object.defineProperty called on non-object"); Object.prototype.__defineGetter__&&"get"in h&&Object.prototype.__defineGetter__.call(c,q,h.get);Object.prototype.__defineSetter__&&"set"in h&&Object.prototype.__defineSetter__.call(c,q,h.set);"value"in h&&(c[q]=h.value);return c})})();(function(){function a(c){c>>=0;if(0>c)throw RangeError("ArrayBuffer size is not a small enough positive integer.");Object.defineProperty(this,"byteLength",{value:c});Object.defineProperty(this,"_bytes",{value:Array(c)});for(var q=0;q>=0;if(0>c)throw RangeError("length is not a small enough positive integer.");Object.defineProperty(this,"length",{value:c});Object.defineProperty(this,"byteLength",{value:c*this.BYTES_PER_ELEMENT});Object.defineProperty(this,"buffer",{value:new a(this.byteLength)});Object.defineProperty(this,"byteOffset",{value:0})}.apply(this,arguments);if(1<=arguments.length&&"object"===e(arguments[0])&&arguments[0]instanceof h)return function(c){if(this.constructor!== c.constructor)throw TypeError();var q=c.length*this.BYTES_PER_ELEMENT;Object.defineProperty(this,"buffer",{value:new a(q)});Object.defineProperty(this,"byteLength",{value:q});Object.defineProperty(this,"byteOffset",{value:0});Object.defineProperty(this,"length",{value:c.length});for(q=0;q>>=0;if(c>a.byteLength)throw RangeError("byteOffset out of range"); if(c%this.BYTES_PER_ELEMENT)throw RangeError("buffer length minus the byteOffset is not a multiple of the element size.");if(void 0===q){var h=a.byteLength-c;if(h%this.BYTES_PER_ELEMENT)throw RangeError("length of buffer minus byteOffset not a multiple of the element size");q=h/this.BYTES_PER_ELEMENT}else q>>>=0,h=q*this.BYTES_PER_ELEMENT;if(c+h>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:a});Object.defineProperty(this, "byteLength",{value:h});Object.defineProperty(this,"byteOffset",{value:c});Object.defineProperty(this,"length",{value:q})}.apply(this,arguments);throw TypeError();}function v(a,q,d){var k=function(){Object.defineProperty(this,"constructor",{value:k});h.apply(this,arguments);c(this)};"__proto__"in k?k.__proto__=h:(k.from=h.from,k.of=h.of);k.BYTES_PER_ELEMENT=a;var e=function(){};e.prototype=w;k.prototype=new e;Object.defineProperty(k.prototype,"BYTES_PER_ELEMENT",{value:a});Object.defineProperty(k.prototype, "_pack",{value:q});Object.defineProperty(k.prototype,"_unpack",{value:d});return k}f.ArrayBuffer=f.ArrayBuffer||a;Object.defineProperty(h,"from",{value:function(a){return new this(a)}});Object.defineProperty(h,"of",{value:function(){return new this(arguments)}});var w={};h.prototype=w;Object.defineProperty(h.prototype,"_getter",{value:function(a){if(1>arguments.length)throw SyntaxError("Not enough arguments");a>>>=0;if(!(a>=this.length)){var c=[],q,h;q=0;for(h=this.byteOffset+a*this.BYTES_PER_ELEMENT;q< this.BYTES_PER_ELEMENT;q+=1,h+=1)c.push(this.buffer._bytes[h]);return this._unpack(c)}}});Object.defineProperty(h.prototype,"get",{value:h.prototype._getter});Object.defineProperty(h.prototype,"_setter",{value:function(a,c){if(2>arguments.length)throw SyntaxError("Not enough arguments");a>>>=0;if(!(a>=this.length)){var q=this._pack(c),h,d;h=0;for(d=this.byteOffset+a*this.BYTES_PER_ELEMENT;h>>0,d=V(d,0);a>>=0;a=0>a?V(d+a,0):R(a,d);c>>=0;c=0>c?V(d+c,0):R(c,d);q=void 0===q?d:q>>0;q=0>q?V(d+q,0):R(q,d);d=R(q-c,d-a);from>>0;if(!p(a))throw TypeError(); for(var d=0;d>>0,d=V(d,0);c>>=0;c=0>c?V(d+c,0):R(c,d);q=void 0===q?d:q>>0;for(d=0>q?V(d+q,0):R(q,d);c>>0;if(!p(a))throw TypeError();for(var d=[],k=0;k>>0;if(!p(a))throw TypeError();for(var h=1>>0;if(!p(a))throw TypeError();for(var h=1>>0;if(!p(a))throw TypeError();for(var d=0;d>>0;if(0===q)return-1;var h=0,d;0=q)return-1;for(h=0<=h?h:V(q-L(h),0);h>>0,h=Array(q),d=0;d>>0;if(0===q)return-1; var h=q;1>>0;if(!p(a))throw TypeError();var d=[];d.length=h;for(var k=0;k>>0;if(!p(a))throw TypeError();if(0===q&&1===arguments.length)throw TypeError();var h=0,d;for(d=2<=arguments.length?arguments[1]:c._getter(h++);h>>0;if(!p(a))throw TypeError();if(0===q&&1===arguments.length)throw TypeError(); var q=q-1,h;for(h=2<=arguments.length?arguments[1]:c._getter(q--);0<=q;)h=a.call(void 0,h,c._getter(q),q,c),q--;return h}});Object.defineProperty(h.prototype,"reverse",{value:function(){if(void 0===this||null===this)throw TypeError();for(var a=Object(this),c=a.length>>>0,q=I(c/2),h=0,c=c-1;harguments.length)throw SyntaxError("Not enough arguments"); var q,h,d,k,e,p;if("object"===typeof arguments[0]&&arguments[0].constructor===this.constructor){q=arguments[0];h=arguments[1]>>>0;if(h+q.length>this.length)throw RangeError("Offset plus length of array is out of range");p=this.byteOffset+h*this.BYTES_PER_ELEMENT;h=q.length*this.BYTES_PER_ELEMENT;if(q.buffer===this.buffer){d=[];k=0;for(e=q.byteOffset;k>>0;h=arguments[1]>>>0;if(h+d>this.length)throw RangeError("Offset plus length of array is out of range");for(k=0;k>>0,d=a>>0,d=0>d?V(h+d,0):R(d,h),e=void 0===c?h:c>>0,h=0>e?V(h+e,0): R(e,h),e=new q.constructor(h-d),p=0;d>>0;if(!p(a))throw TypeError();for(var d=0;d>>0,h=Array(q),d=0;d< q;++d)h[d]=c._getter(d);a?h.sort(a):h.sort();for(d=0;d>=0;c>>=0;1>arguments.length&&(a=0);2>arguments.length&&(c=this.length);0>a&&(a=this.length+a);0>c&&(c=this.length+c);var q=this.length;a=0>a?0:a>q?q:a;q=this.length;q=(0>c?0:c>q?q:c)-a;0>q&&(q=0);return new this.constructor(this.buffer,this.byteOffset+a*this.BYTES_PER_ELEMENT,q)}});var K=v(1,z,n),N=v(1,b,g),X=v(1,B,g),na=v(2,G,x),ra=v(2,y, D),ta=v(4,l,E),ba=v(4,F,q),da=v(4,O,H),P=v(8,M,J);f.Int8Array=m.Int8Array=f.Int8Array||K;f.Uint8Array=m.Uint8Array=f.Uint8Array||N;f.Uint8ClampedArray=m.Uint8ClampedArray=f.Uint8ClampedArray||X;f.Int16Array=m.Int16Array=f.Int16Array||na;f.Uint16Array=m.Uint16Array=f.Uint16Array||ra;f.Int32Array=m.Int32Array=f.Int32Array||ta;f.Uint32Array=m.Uint32Array=f.Uint32Array||ba;f.Float32Array=m.Float32Array=f.Float32Array||da;f.Float64Array=m.Float64Array=f.Float64Array||P})();(function(){function a(c,q){return p(c.get)? c.get(q):c[q]}function c(a,q,h){if(!(a instanceof ArrayBuffer||"ArrayBuffer"===d(a)))throw TypeError();q>>>=0;if(q>a.byteLength)throw RangeError("byteOffset out of range");h=void 0===h?a.byteLength-q:h>>>0;if(q+h>a.byteLength)throw RangeError("byteOffset and length reference an area beyond the end of the buffer");Object.defineProperty(this,"buffer",{value:a});Object.defineProperty(this,"byteLength",{value:h});Object.defineProperty(this,"byteOffset",{value:q})}function q(c){return function(q,h){q>>>= 0;if(q+c.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");q+=this.byteOffset;for(var d=new f.Uint8Array(this.buffer,q,c.BYTES_PER_ELEMENT),e=[],p=0;p>>=0;if(q+c.BYTES_PER_ELEMENT>this.byteLength)throw RangeError("Array index out of range");h=new c([h]);h=new f.Uint8Array(h.buffer);var e=[],p;for(p=0;p=k?e[207](p,k):d(p,k)};l.prototype.serialize=function(d){return f.encode(d,{codec:this.codec})};l.prototype.unserialize=function(d){return f.decode(d,{codec:this.codec})};l.prototype.registerExtType=function(d,k,c,a){c&&k&&this.codec.addExtPacker(d,k,c);a&&this.codec.addExtUnpacker(d,a)};g.MsgpackSerializer=l}catch(p){g.MsgpackSerializer=null}},{"msgpack-lite":58,"msgpack-lite/lib/write-token":61,"msgpack-lite/lib/write-type":62}], 16:[function(b,l,g){(function(n){function f(){return Math.floor(9007199254740992*Math.random())}b("when");var m=b("when/function"),e=b("./log.js"),d=b("./util.js");Date.now=Date.now||function(){return+new Date};var p={caller:{features:{caller_identification:!0,progressive_call_results:!0}},callee:{features:{caller_identification:!0,pattern_based_registration:!0,shared_registration:!0,progressive_call_results:!0,registration_revocation:!0}},publisher:{features:{publisher_identification:!0,subscriber_blackwhite_listing:!0, publisher_exclusion:!0}},subscriber:{features:{publisher_identification:!0,pattern_based_subscription:!0,subscription_revocation:!0}}},k=function(a,c,h,d,k){this.procedure=a;this.progress=c;this.caller=h;this.caller_authid=d;this.caller_authrole=k},c=function(a,c,h,d,k){this.publication=a;this.topic=c;this.publisher=h;this.publisher_authid=d;this.publisher_authrole=k},a=function(a,c){this.args=a||[];this.kwargs=c||{}},h=function(a,c,h){this.error=a;this.args=c||[];this.kwargs=h||{}},z=function(a, c,h,d,k){this.topic=a;this.handler=c;this.options=h||{};this.session=d;this.id=k;this.active=!0;this._on_unsubscribe=d._defer();this.on_unsubscribe=this._on_unsubscribe.promise.then?this._on_unsubscribe.promise:this._on_unsubscribe};z.prototype.unsubscribe=function(){return this.session.unsubscribe(this)};var C=function(a,c,h,d,k){this.procedure=a;this.endpoint=c;this.options=h||{};this.session=d;this.id=k;this.active=!0;this._on_unregister=d._defer();this.on_unregister=this._on_unregister.promise.then? this._on_unregister.promise:this._on_unregister};C.prototype.unregister=function(){return this.session.unregister(this)};var u=function(a){this.id=a},r=function(d,f,x){var b=this;b._socket=d;b._defer=f;b._onchallenge=x;b._id=null;b._realm=null;b._features=null;b._goodbye_sent=!1;b._transport_is_closing=!1;b._publish_reqs={};b._subscribe_reqs={};b._unsubscribe_reqs={};b._call_reqs={};b._register_reqs={};b._unregister_reqs={};b._subscriptions={};b._registrations={};b._invocations={};b._prefixes={}; b._caller_disclose_me=!1;b._publisher_disclose_me=!1;b._send_wamp=function(a){e.debug(a);b._socket.send(a)};b._protocol_violation=function(a){e.debug("failing transport due to protocol violation: "+a);b._socket.close(1002,"protocol violation: "+a)};b._MESSAGE_MAP={};b._MESSAGE_MAP[8]={};b._process_SUBSCRIBED=function(a){var c=a[1];a=a[2];if(c in b._subscribe_reqs){var h=b._subscribe_reqs[c],d=h[0],q=h[1],k=h[2],h=h[3];a in b._subscriptions||(b._subscriptions[a]=[]);q=new z(q,k,h,b,a);b._subscriptions[a].push(q); d.resolve(q);delete b._subscribe_reqs[c]}else b._protocol_violation("SUBSCRIBED received for non-pending request ID "+c)};b._MESSAGE_MAP[33]=b._process_SUBSCRIBED;b._process_SUBSCRIBE_ERROR=function(a){var c=a[2];c in b._subscribe_reqs?(a=new h(a[4],a[5],a[6]),b._subscribe_reqs[c][0].reject(a),delete b._subscribe_reqs[c]):b._protocol_violation("SUBSCRIBE-ERROR received for non-pending request ID "+c)};b._MESSAGE_MAP[8][32]=b._process_SUBSCRIBE_ERROR;b._process_UNSUBSCRIBED=function(a){var c=a[1]; if(c in b._unsubscribe_reqs){a=b._unsubscribe_reqs[c];var h=a[0];a=a[1];if(a in b._subscriptions){for(var d=b._subscriptions[a],q=0;q must be a string");d.assert(!c||Array.isArray(c),"Session.join: must be an array []");d.assert(!h||"string"===typeof h,"Session.join: must be a string"); if(this.isOpen)throw"session already open";this._goodbye_sent=!1;this._realm=a;var k={};k.roles=p;c&&(k.authmethods=c);h&&(k.authid=h);this._send_wamp([1,a,k])};r.prototype.leave=function(a,c){d.assert(!a||"string"===typeof a,"Session.leave: must be a string");d.assert(!c||"string"===typeof c,"Session.leave: must be a string");if(!this.isOpen)throw"session not open";a||(a="wamp.close.normal");var h={};c&&(h.message=c);this._send_wamp([6,h,a]);this._goodbye_sent=!0};r.prototype.call= function(a,c,h,k){d.assert("string"===typeof a,"Session.call: must be a string");d.assert(!c||Array.isArray(c),"Session.call: must be an array []");d.assert(!h||h instanceof Object,"Session.call: must be an object {}");d.assert(!k||k instanceof Object,"Session.call: must be an object {}");if(!this.isOpen)throw"session not open";k=k||{};void 0===k.disclose_me&&this._caller_disclose_me&&(k.disclose_me=!0);var e=this._defer(),p=f();this._call_reqs[p]=[e,k];a=[48, p,k,this.resolve(a)];c?(a.push(c),h&&a.push(h)):h&&(a.push([]),a.push(h));this._send_wamp(a);return e.promise.then?e.promise:e};r.prototype.publish=function(a,c,h,k){d.assert("string"===typeof a,"Session.publish: must be a string");d.assert(!c||Array.isArray(c),"Session.publish: must be an array []");d.assert(!h||h instanceof Object,"Session.publish: must be an object {}");d.assert(!k||k instanceof Object,"Session.publish: must be an object {}");if(!this.isOpen)throw"session not open"; k=k||{};void 0===k.disclose_me&&this._publisher_disclose_me&&(k.disclose_me=!0);var e=null,p=f();k.acknowledge&&(e=this._defer(),this._publish_reqs[p]=[e,k]);a=[16,p,k,this.resolve(a)];c?(a.push(c),h&&a.push(h)):h&&(a.push([]),a.push(h));this._send_wamp(a);if(e)return e.promise.then?e.promise:e};r.prototype.subscribe=function(a,c,h){d.assert("string"===typeof a,"Session.subscribe: must be a string");d.assert("function"===typeof c,"Session.subscribe: must be a function");d.assert(!h|| h instanceof Object,"Session.subscribe: must be an object {}");if(!this.isOpen)throw"session not open";var k=f(),e=this._defer();this._subscribe_reqs[k]=[e,a,c,h];c=[32,k];h?c.push(h):c.push({});c.push(this.resolve(a));this._send_wamp(c);return e.promise.then?e.promise:e};r.prototype.register=function(a,c,h){d.assert("string"===typeof a,"Session.register: must be a string");d.assert("function"===typeof c,"Session.register: must be a function");d.assert(!h||h instanceof Object,"Session.register: must be an object {}");if(!this.isOpen)throw"session not open";var k=f(),e=this._defer();this._register_reqs[k]=[e,a,c,h];c=[64,k];h?c.push(h):c.push({});c.push(this.resolve(a));this._send_wamp(c);return e.promise.then?e.promise:e};r.prototype.unsubscribe=function(a){d.assert(a instanceof z,"Session.unsubscribe: must be an instance of class autobahn.Subscription");if(!this.isOpen)throw"session not open";if(!(a.active&&a.id in this._subscriptions))throw"subscription not active"; var c=this._subscriptions[a.id],h=c.indexOf(a);if(-1===h)throw"subscription not active";c.splice(h,1);a.active=!1;h=this._defer();c.length?h.resolve(!1):(c=f(),this._unsubscribe_reqs[c]=[h,a.id],this._send_wamp([34,c,a.id]));return h.promise.then?h.promise:h};r.prototype.unregister=function(a){d.assert(a instanceof C,"Session.unregister: must be an instance of class autobahn.Registration");if(!this.isOpen)throw"session not open";if(!(a.active&&a.id in this._registrations))throw"registration not active"; var c=f(),h=this._defer();this._unregister_reqs[c]=[h,a];this._send_wamp([66,c,a.id]);return h.promise.then?h.promise:h};r.prototype.prefix=function(a,c){d.assert("string"===typeof a,"Session.prefix: must be a string");d.assert(!c||"string"===typeof c,"Session.prefix: must be a string or falsy");c?this._prefixes[a]=c:a in this._prefixes&&delete this._prefixes[a]};r.prototype.resolve=function(a){d.assert("string"===typeof a,"Session.resolve: must be a string");var c=a.indexOf(":"); if(0<=c){var h=a.substring(0,c);if(h in this._prefixes)return this._prefixes[h]+"."+a.substring(c+1);throw"cannot resolve CURIE prefix '"+h+"'";}return a};g.Session=r;g.Invocation=k;g.Event=c;g.Result=a;g.Error=h;g.Subscription=z;g.Registration=C;g.Publication=u}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./log.js":6,"./util.js":20,when:93,"when/function":69}],17:[function(b,l,g){function n(e){f.assert(void 0!==e.url,"options.url missing"); f.assert("string"===typeof e.url,"options.url must be a string");this._options=e}var f=b("../util.js"),m=b("../log.js");b("when");n.prototype.type="longpoll";n.prototype.create=function(){var e=this;m.debug("longpoll.Factory.create");var d={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){},info:{type:"longpoll",url:null,protocol:"wamp.2.json"},_run:function(){var p=null,k=!1,c=e._options.request_timeout||12E3;f.http_post(e._options.url+"/open", JSON.stringify({protocols:["wamp.2.json"]}),c).then(function(a){function h(){m.debug("longpoll.Transport: polling for message ...");f.http_post(z+"/receive",null,c).then(function(a){a&&(a=JSON.parse(a),m.debug("longpoll.Transport: message received",a),d.onmessage(a));k||h()},function(a){m.debug("longpoll.Transport: could not receive message",a.code,a.text);k=!0;d.onclose({code:1001,reason:"transport receive failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})}p=JSON.parse(a);var z= e._options.url+"/"+p.transport;d.info.url=z;m.debug("longpoll.Transport: open",p);d.close=function(a,h){if(k)throw"transport is already closing";k=!0;f.http_post(z+"/close",null,c).then(function(){m.debug("longpoll.Transport: transport closed");d.onclose({code:1E3,reason:"transport closed",wasClean:!0})},function(a){m.debug("longpoll.Transport: could not close transport",a.code,a.text)})};d.send=function(a){if(k)throw"transport is closing or closed already";m.debug("longpoll.Transport: sending message ...", a);a=JSON.stringify(a);f.http_post(z+"/send",a,c).then(function(){m.debug("longpoll.Transport: message sent")},function(a){m.debug("longpoll.Transport: could not send message",a.code,a.text);k=!0;d.onclose({code:1001,reason:"transport send failure (HTTP/POST status "+a.code+" - '"+a.text+"')",wasClean:!1})})};h();d.onopen()},function(a){m.debug("longpoll.Transport: could not open transport",a.code,a.text);k=!0;d.onclose({code:1001,reason:"transport open failure (HTTP/POST status "+a.code+" - '"+a.text+ "')",wasClean:!1})})}};d._run();return d};g.Factory=n},{"../log.js":6,"../util.js":20,when:93}],18:[function(b,l,g){(function(n,f){function m(a){a.protocols?d.assert(Array.isArray(a.protocols),"options.protocols must be an array"):a.protocols=["wamp.2.json"];a.rawsocket_max_len_exp=a.rawsocket_max_len_exp||24;this._options=a}function e(a,c){this._options={_peer_serializer:null,_peer_max_len_exp:0};this._options=d.defaults(this._options,c,this.DEFAULT_OPTIONS);d.assert(this._options.serializer in this.SERIALIZERS, "Unsupported serializer: "+this._options.serializer);d.assert(9<=this._options.max_len_exp&&36>=this._options.max_len_exp,"Message length out of bounds [9, 36]: "+this._options.max_len_exp);d.assert(!this._options.autoping||Number.isInteger(this._options.autoping)&&0<=this._options.autoping,"Autoping interval must be positive");d.assert(!this._options.ping_timeout||Number.isInteger(this._options.ping_timeout)&&0<=this._options.ping_timeout,"Ping timeout duration must be positive");d.assert(!this._options.packet_timeout|| Number.isInteger(this._options.packet_timeout)&&0<=this._options.packet_timeout,"Packet timeout duration must be positive");d.assert(!this._options.autoping||!this._options.ping_timeout||this._options.autoping>this._options.ping_timeout,"Autoping interval ("+this._options.autoping+") must be lower than ping timeout ("+this._options.ping_timeout+")");this._ping_interval=this._ping_payload=this._ping_timeout=null;this._status=this.STATUS.UNINITIATED;this._stream=a;this._emitter=new k;this._buffer=new f(4); this._msgLen=this._bufferLen=0;var e=this;this._stream.on("data",function(a){e._read(a)});this._stream.on("connect",function(){e._handshake()});["close","drain","end","error","timeout"].forEach(function(a){e._stream.on(a,function(c){e._emitter.emit(a,c)})})}var d=b("../util.js"),p=b("../log.js"),k=b("events").EventEmitter;m.prototype.type="rawsocket";m.prototype.create=function(){var a=this,c={protocol:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){}, info:{type:"rawsocket",url:null,protocol:"wamp.2.json"}};if(n.process&&n.process.versions.node)(function(){var d=b("net"),k;if(a._options.path)connectionOptions={path:a._options.path,allowHalfOpen:!0};else if(a._options.port)connectionOptions={port:a._options.port||8E3,host:a._options.host||"localhost",allowHalfOpen:!0};else throw"You must specify a host/port combination or a unix socket path to connect to";d=d.connect(connectionOptions);k=new e(d,{serializer:"json",max_len_exp:a._options.rawsocket_max_len_exp}); k.on("connect",function(a){p.debug("RawSocket transport negociated");c.onopen(a)});k.on("data",function(a){p.debug("RawSocket transport received",a);c.onmessage(a)});k.on("close",function(a){p.debug("RawSocket transport closed");c.onclose({code:999,reason:"",wasClean:!a})});k.on("error",function(a){p.debug("RawSocket transport error",a)});c.close=function(a,c){p.debug("RawSocket transport closing",a,c);k.close()};c.send=function(a){p.debug("RawSocket transport sending",a);k.write(a)}})();else throw"No RawSocket support in browser"; return c};e.prototype._MAGIC_BYTE=127;e.prototype.SERIALIZERS={json:1};e.prototype.STATUS={CLOSED:-1,UNINITIATED:0,NEGOCIATING:1,NEGOCIATED:2,RXHEAD:3,RXDATA:4,RXPING:5,RXPONG:6};e.prototype.ERRORS={0:"illegal (must not be used)",1:"serializer unsupported",2:"maximum message length unacceptable",3:"use of reserved bits (unsupported feature)",4:"maximum connection count reached"};e.prototype.MSGTYPES={WAMP:0,PING:1,PONG:2};e.prototype.DEFAULT_OPTIONS={fail_on_ping_timeout:!0,strict_pong:!0,ping_timeout:2E3, autoping:0,max_len_exp:24,serializer:"json",packet_timeout:2E3};e.prototype.close=function(){this._status=this.STATUS.CLOSED;this._stream.end();return this.STATUS.CLOSED};e.prototype.write=function(a,h,d){h=void 0===h?0:h;h===this.MSGTYPES.WAMP&&(a=JSON.stringify(a));var k=f.byteLength(a,"utf8");if(k>Math.pow(2,this._options._peer_max_len_exp))this._emitter.emit("error",new c("Frame too big"));else{var e=new f(k+4);e.writeUInt8(h,0);e.writeUIntBE(k,1,3);e.write(a,4);this._stream.write(e,d)}};e.prototype.ping= function(a){a=a||255;if(Number.isInteger(a))for(var c=Math.max(1,a),d=0;d".charAt(92*Math.random()|0);this._ping_payload=a;return this.write(a,this.MSGTYPES.PING,this._setupPingTimeout.bind(this))};e.prototype._setupPingTimeout=function(){this._options.ping_timeout&&(this._ping_timeout=setTimeout(this._onPingTimeout.bind(this),this._options.ping_timeout))};e.prototype._clearPingTimeout=function(){this._ping_timeout&& (clearTimeout(this._ping_timeout),this._ping_timeout=null)};e.prototype._setupAutoPing=function(){this._clearAutoPing();this._options.autoping&&(this._autoping_interval=setInterval(this.ping.bind(this),this._options.autoping))};e.prototype._clearAutoPing=function(){this._autoping_interval&&(clearInterval(this._autoping_interval),this._autoping_interval=null)};e.prototype._onPingTimeout=function(){this._emitter.emit("error",new c("PING timeout"));this._options.fail_on_ping_timeout&&this.close()};e.prototype._read= function(a){var h,d;switch(this._status){case this.STATUS.CLOSED:case this.STATUS.UNINITIATED:this._emitter.emit("error",c("Unexpected packet"));break;case this.STATUS.NEGOCIATING:h=this._handleHandshake;d=4;break;case this.STATUS.NEGOCIATED:case this.STATUS.RXHEAD:this._status=this.STATUS.RXHEAD;h=this._handleHeaderPacket;d=4;break;case this.STATUS.RXDATA:h=this._handleDataPacket;d=this._msgLen;break;case this.STATUS.RXPING:h=this._handlePingPacket;d=this._msgLen;break;case this.STATUS.RXPONG:h= this._handlePongPacket,d=this._msgLen}if(a=this._splitBytes(a,d))this._status=h.call(this,a[0]),0>4,this._emitter.emit("error",new c("Peer failed handshake: "+(this.ERRORS[a]||"0x"+a.toString(16)))),this.close();this._options._peer_max_len_exp=(a[1]>>4)+9;this._options._peer_serializer=a[1]&15;if(this._options._peer_serializer!==this.SERIALIZERS.json)return this._emitter.emit("error",new c("Unsupported serializer: 0x"+this._options._peer_serializer.toString(16))),this.close();this._emitter.emit("connect");this._setupAutoPing();return this.STATUS.NEGOCIATED};e.prototype._handleHeaderPacket= function(a){var h=a[0]&15;this._msgLen=a.readUIntBE(1,3);switch(h){case this.MSGTYPES.WAMP:return this.STATUS.RXDATA;case this.MSGTYPES.PING:return this.STATUS.RXPING;case this.MSGTYPES.PONG:return this.STATUS.RXPONG;default:return this._emitter.emit("error",new c("Invalid frame type: 0x"+h.toString(16))),this.close()}};e.prototype._handleDataPacket=function(a){var h;try{h=JSON.parse(a.toString("utf8"))}catch(d){return this._emitter.emit("error",new c("Invalid JSON frame")),this.STATUS.RXHEAD}this._emitter.emit("data", h);return this.STATUS.RXHEAD};e.prototype._handlePingPacket=function(a){this.write(a.toString("utf8"),this.MSGTYPES.PONG);return this.STATUS.RXHEAD};e.prototype._handlePongPacket=function(a){this._clearPingTimeout();return this._options.strict_pong&&this._ping_payload!==a.toString("utf8")?(this._emitter.emit("error",new c("PONG response payload doesn't match PING.")),this.close()):this.STATUS.RXHEAD};e.prototype.on=function(a,c){return this._emitter.on(a,c)};e.prototype.once=function(a,c){return this._emitter.once(a, c)};e.prototype.removeListener=function(a,c){return this._emitter.removeListener(a,c)};var c=g.ProtocolError=function(a){Error.apply(this,Array.prototype.splice.call(arguments));Error.captureStackTrace(this,this.constructor);this.message=a;this.name="ProtocolError"};c.prototype=Object.create(Error.prototype);g.Factory=m;g.Protocol=e}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},b("buffer").Buffer)},{"../log.js":6,"../util.js":20, buffer:128,events:324,net:112}],19:[function(b,l,g){(function(n){function f(e){m.assert(void 0!==e.url,"options.url missing");m.assert("string"===typeof e.url,"options.url must be a string");e.serializers?m.assert(Array.isArray(e.serializers),"options.serializers must be an array"):(e.serializers=[new d.JSONSerializer],d.MsgpackSerializer&&e.serializers.push(new d.MsgpackSerializer));e.protocols?m.assert(Array.isArray(e.protocols),"options.protocols must be an array"):(e.protocols=[],e.serializers.forEach(function(d){e.protocols.push("wamp.2."+ d.SERIALIZER_ID)}));this._options=e}var m=b("../util.js"),e=b("../log.js"),d=b("../serializer.js");f.prototype.type="websocket";f.prototype.create=function(){var d=this,k={protocol:void 0,serializer:void 0,send:void 0,close:void 0,onmessage:function(){},onopen:function(){},onclose:function(){}};k.info={type:"websocket",url:d._options.url,protocol:null};n.process&&n.process.versions.node?function(){var c=b("ws"),a,h;d._options.protocols?(h=d._options.protocols,Array.isArray(h)&&(h=h.join(",")),a=new c(d._options.url, {protocol:h})):a=new c(d._options.url);k.send=function(c){c=k.serializer.serialize(c);a.send(c,{binary:k.serializer.BINARY})};k.close=function(c,h){a.close()};a.on("open",function(){var c=a.protocol.split(".")[2],h;for(h in d._options.serializers){var e=d._options.serializers[h];if(e.SERIALIZER_ID==c){k.serializer=e;break}}k.info.protocol=a.protocol;k.onopen()});a.on("message",function(a,c){var h=k.serializer.unserialize(a);k.onmessage(h)});a.on("close",function(a,c){k.onclose({code:a,reason:c,wasClean:1E3=== a})});a.on("error",function(a){k.onclose({code:1006,reason:"",wasClean:!1})})}():function(){var c;if("WebSocket"in n)c=d._options.protocols?new n.WebSocket(d._options.url,d._options.protocols):new n.WebSocket(d._options.url),c.binaryType="arraybuffer";else if("MozWebSocket"in n)c=d._options.protocols?new n.MozWebSocket(d._options.url,d._options.protocols):new n.MozWebSocket(d._options.url);else throw"browser does not support WebSocket or WebSocket in Web workers";c.onmessage=function(a){e.debug("WebSocket transport receive", a.data);a=k.serializer.unserialize(a.data);k.onmessage(a)};c.onopen=function(){var a=c.protocol.split(".")[2],h;for(h in d._options.serializers){var e=d._options.serializers[h];if(e.SERIALIZER_ID==a){k.serializer=e;break}}k.info.protocol=c.protocol;k.onopen()};c.onclose=function(a){k.onclose({code:a.code,reason:a.message,wasClean:a.wasClean})};k.send=function(a){a=k.serializer.serialize(a);e.debug("WebSocket transport send",a);c.send(a)};k.close=function(a,h){c.close(a,h)}}();return k};g.Factory= f}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../log.js":6,"../serializer.js":15,"../util.js":20,ws:94}],20:[function(b,l,g){(function(n){var f=b("./log.js"),m=b("when"),e=function(d,k){if(!d){if(e.useDebugger||"AUTOBAHN_DEBUG"in n&&AUTOBAHN_DEBUG)debugger;throw Error(k||"Assertion failed!");}},d=function(){if(0===arguments.length)return{};var e=arguments[0],k=!1,c=arguments.length;"boolean"===typeof arguments[c-1]&&(k=arguments[c- 1],--c);var a=function(a){var c=b[a];a in e?k&&"object"===typeof c&&"object"===typeof e[a]&&d(e[a],c):e[a]=c},h=1;for(;hc&&(c=4294967296+c),m.writeUInt32LE(c,e+k,!0);switch(d%4){case 3:m[e+k+2]=b[k+2]^f[2];case 2:m[e+k+1]=b[k+1]^f[1];case 1:m[e+ k]=b[k]^f[0]}},unmask:function(b,f){for(var m=f.readUInt32LE(0,!0),e=b.length,d=0,p;dp&&(p=4294967296+p),b.writeUInt32LE(p,d,!0);switch(e%4){case 3:b[d+2]^=f[2];case 2:b[d+1]^=f[1];case 1:b[d]^=f[0]}}}},{}],22:[function(b,l,g){try{l.exports=b("bindings")("bufferutil")}catch(n){l.exports=b("./fallback")}},{"./fallback":21,bindings:23}],23:[function(b,l,g){(function(n,f){var m=b("fs"),e=b("path"),d=e.join,p=e.dirname,k=m.existsSync||e.existsSync,c={arrow:n.env.NODE_BINDINGS_ARROW|| " \u2192 ",compiled:n.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:n.platform,arch:n.arch,version:n.versions.node,bindings:"bindings.node","try":[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],"module_root compiled version platform arch bindings".split(" ")]}; l.exports=g=function(a){"string"==typeof a?a={bindings:a}:a||(a={});a.__proto__=c;a.module_root||(a.module_root=g.getRoot(g.getFileName()));".node"!=e.extname(a.bindings)&&(a.bindings+=".node");for(var h=[],k=0,p=a["try"].length,f,m;kf;f++)b[f]=128>f?f<<1:f<<1^283;for(var m=0,n=0,f=0;256>f;f++){var r=n^n<<1^n<<2^n<<3^n<<4,r=r>>>8^r&255^99;e[m]=r;d[r]=m;var l=b[m],E=b[l],F=b[E],q=257*b[r]^16843008*r;p[m]=q<<24|q>>>8;k[m]=q<<16|q>>>16;c[m]=q<<8|q>>>24;a[m]=q;q=16843009*F^65537*E^257*l^16843008*m;h[r]=q<<24|q>>>8;z[r]=q<<16|q>>>16;g[r]=q<<8|q>>>24;u[r]=q;m?(m=l^b[b[b[F^l]]],n^=b[b[n]]):m=n=1}})();var r=[0,1,2,4,8,16,32,64,128,27,54],m=m.AES=f.extend({_doReset:function(){for(var a= this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),k=this._keySchedule=[],p=0;p>>24]<<24|e[b>>>16&255]<<16|e[b>>>8&255]<<8|e[b&255]):(b=b<<8|b>>>24,b=e[b>>>24]<<24|e[b>>>16&255]<<16|e[b>>>8&255]<<8|e[b&255],b^=r[p/d|0]<<24);k[p]=k[p-d]^b}c=this._invKeySchedule=[];for(d=0;dd||4>=p?b:h[e[b>>>24]]^z[e[b>>>16&255]]^g[e[b>>>8&255]]^u[e[b&255]]},encryptBlock:function(h,d){this._doCryptBlock(h, d,this._keySchedule,p,k,c,a,e)},decryptBlock:function(a,c){var k=a[c+1];a[c+1]=a[c+3];a[c+3]=k;this._doCryptBlock(a,c,this._invKeySchedule,h,z,g,u,d);k=a[c+1];a[c+1]=a[c+3];a[c+3]=k},_doCryptBlock:function(a,c,h,d,k,e,p,b){for(var q=this._nRounds,f=a[c]^h[0],z=a[c+1]^h[1],m=a[c+2]^h[2],n=a[c+3]^h[3],g=4,C=1;C>>24]^k[z>>>16&255]^e[m>>>8&255]^p[n&255]^h[g++],r=d[z>>>24]^k[m>>>16&255]^e[n>>>8&255]^p[f&255]^h[g++],I=d[m>>>24]^k[n>>>16&255]^e[f>>>8&255]^p[z&255]^h[g++],n=d[n>>>24]^k[f>>> 16&255]^e[z>>>8&255]^p[m&255]^h[g++],f=u,z=r,m=I;u=(b[f>>>24]<<24|b[z>>>16&255]<<16|b[m>>>8&255]<<8|b[n&255])^h[g++];r=(b[z>>>24]<<24|b[m>>>16&255]<<16|b[n>>>8&255]<<8|b[f&255])^h[g++];I=(b[m>>>24]<<24|b[n>>>16&255]<<16|b[f>>>8&255]<<8|b[z&255])^h[g++];n=(b[n>>>24]<<24|b[f>>>16&255]<<16|b[z>>>8&255]<<8|b[m&255])^h[g++];a[c]=u;a[c+1]=r;a[c+2]=I;a[c+3]=n},keySize:8});b.AES=f._createHelper(m)})();return b.AES})},{"./cipher-core":25,"./core":26,"./enc-base64":27,"./evpkdf":29,"./md5":34}],25:[function(b, l,g){(function(n,f){"object"===typeof g?l.exports=g=f(b("./core")):f(n.CryptoJS)})(this,function(b){b.lib.Cipher||function(f){var m=b.lib,e=m.Base,d=m.WordArray,p=m.BufferedBlockAlgorithm,k=b.enc.Base64,c=b.algo.EvpKDF,a=m.Cipher=p.extend({cfg:e.extend(),createEncryptor:function(a,c){return this.create(this._ENC_XFORM_MODE,a,c)},createDecryptor:function(a,c){return this.create(this._DEC_XFORM_MODE,a,c)},init:function(a,c,h){this.cfg=this.cfg.extend(h);this._xformMode=a;this._key=c;this.reset()},reset:function(){p.reset.call(this); this._doReset()},process:function(a){this._append(a);return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){return function(a){return{encrypt:function(c,h,d){return("string"==typeof h?B:r).encrypt(a,c,h,d)},decrypt:function(c,h,d){return("string"==typeof h?B:r).decrypt(a,c,h,d)}}}}()});m.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=b.mode= {},z=m.BlockCipherMode=e.extend({createEncryptor:function(a,c){return this.Encryptor.create(a,c)},createDecryptor:function(a,c){return this.Decryptor.create(a,c)},init:function(a,c){this._cipher=a;this._iv=c}}),h=h.CBC=function(){function a(c,h,d){var k=this._iv;k?this._iv=f:k=this._prevBlock;for(var e=0;e>>2]&255}};m.BlockCipher=a.extend({cfg:a.cfg.extend({mode:h,padding:g}),reset:function(){a.reset.call(this);var c=this.cfg,h=c.iv,c=c.mode;if(this._xformMode== this._ENC_XFORM_MODE)var d=c.createEncryptor;else d=c.createDecryptor,this._minBufferSize=1;this._mode=d.call(c,this,h&&h.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!0)}else c=this._process(!0),a.unpad(c);return c},blockSize:4});var u=m.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}), h=(b.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?d.create([1398893684,1701076831]).concat(a).concat(c):c).toString(k)},parse:function(a){a=k.parse(a);var c=a.words;if(1398893684==c[0]&&1701076831==c[1]){var h=d.create(c.slice(2,4));c.splice(0,4);a.sigBytes-=16}return u.create({ciphertext:a,salt:h})}},r=m.SerializableCipher=e.extend({cfg:e.extend({format:h}),encrypt:function(a,c,h,d){d=this.cfg.extend(d);var k=a.createEncryptor(h,d);c=k.finalize(c);k=k.cfg;return u.create({ciphertext:c, key:h,iv:k.iv,algorithm:a,mode:k.mode,padding:k.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,c,h,d){d=this.cfg.extend(d);c=this._parse(c,d.format);return a.createDecryptor(h,d).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),e=(b.kdf={}).OpenSSL={execute:function(a,h,k,e){e||(e=d.random(8));a=c.create({keySize:h+k}).compute(a,e);k=d.create(a.words.slice(h),4*k);a.sigBytes=4*h;return u.create({key:a,iv:k,salt:e})}},B=m.PasswordBasedCipher= r.extend({cfg:r.cfg.extend({kdf:e}),encrypt:function(a,c,h,d){d=this.cfg.extend(d);h=d.kdf.execute(h,a.keySize,a.ivSize);d.iv=h.iv;a=r.encrypt.call(this,a,c,h.key,d);a.mixIn(h);return a},decrypt:function(a,c,h,d){d=this.cfg.extend(d);c=this._parse(c,d.format);h=d.kdf.execute(h,a.keySize,a.ivSize,c.salt);d.iv=h.iv;return r.decrypt.call(this,a,c,h.key,d)}})}()})},{"./core":26}],26:[function(b,l,g){(function(b,f){"object"===typeof g?l.exports=g=f():b.CryptoJS=f()})(this,function(){var b=b||function(b, m){var e={},d=e.lib={},p=d.Base=function(){function a(){}return{extend:function(c){a.prototype=this;var h=new a;c&&h.mixIn(c);h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(), k=d.WordArray=p.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(c){return(c||a).stringify(this)},concat:function(a){var c=this.words,h=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var k=0;k>>2]|=(h[k>>>2]>>>24-k%4*8&255)<<24-(d+k)%4*8;else for(k=0;k>>2]=h[k>>>2];this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<32-c%4*8;a.length=b.ceil(c/4)},clone:function(){var a= p.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],h=function(a){var c=987654321;return function(){c=36969*(c&65535)+(c>>16)&4294967295;a=18E3*(a&65535)+(a>>16)&4294967295;var h=(c<<16)+a&4294967295,h=h/4294967296+.5;return h*(.5>>2]>>>24-d%4*8&255;h.push((k>>>4).toString(16));h.push((k&15).toString(16))}return h.join("")},parse:function(a){for(var c=a.length,h=[],d=0;d>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new k.init(h,c/2)}},h=c.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var h=[],d=0;d>>2]>>>24-d%4*8&255));return h.join("")},parse:function(a){for(var c=a.length,h=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-d%4*8;return new k.init(h, c)}},z=c.Utf8={stringify:function(a){try{return decodeURIComponent(escape(h.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return h.parse(unescape(encodeURIComponent(a)))}},n=d.BufferedBlockAlgorithm=p.extend({reset:function(){this._data=new k.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=z.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,h=c.words,d=c.sigBytes,e=this.blockSize,p=d/(4*e),p=a? b.ceil(p):b.max((p|0)-this._minBufferSize,0);a=p*e;d=b.min(4*a,d);if(a){for(var z=0;z>>2]>>>24-k%4*8&255)<<16|(e[k+1>>>2]>>>24-(k+1)%4*8&255)<<8|e[k+2>>>2]>>>24-(k+2)%4*8&255,a=0;4>a&&k+.75*a>>6*(3-a)&63));if(e=p.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,d=this._map,p=d.charAt(64);p&&(p=b.indexOf(p),-1!=p&&(e=p));for(var p=[],k=0,c=0;c>>6-c%4*2;p[k>>>2]|=(a|h)<<24-k%4*8;k++}return f.create(p, k)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();return b.enc.Base64})},{"./core":26}],28:[function(b,l,g){(function(n,f){"object"===typeof g?l.exports=g=f(b("./core")):f(n.CryptoJS)})(this,function(b){(function(){function f(d){return d<<8&4278255360|d>>>8&16711935}var m=b.lib.WordArray,e=b.enc;e.Utf16=e.Utf16BE={stringify:function(d){var e=d.words;d=d.sigBytes;for(var k=[],c=0;c>>2]>>>16-c%4*8&65535));return k.join("")},parse:function(d){for(var e= d.length,k=[],c=0;c>>1]|=d.charCodeAt(c)<<16-c%2*16;return m.create(k,2*e)}};e.Utf16LE={stringify:function(d){var e=d.words;d=d.sigBytes;for(var k=[],c=0;c>>2]>>>16-c%4*8&65535);k.push(String.fromCharCode(a))}return k.join("")},parse:function(d){for(var e=d.length,k=[],c=0;c>>1]|=f(d.charCodeAt(c)<<16-c%2*16);return m.create(k,2*e)}}})();return b.enc.Utf16})},{"./core":26}],29:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"), b("./sha1"),b("./hmac")):f(n.CryptoJS)})(this,function(b){(function(){var f=b.lib,m=f.Base,e=f.WordArray,f=b.algo,d=f.EvpKDF=m.extend({cfg:m.extend({keySize:4,hasher:f.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,k){for(var c=this.cfg,a=c.hasher.create(),h=e.create(),b=h.words,f=c.keySize,c=c.iterations;b.lengthp&&(e=b.finalize(e));e.clamp();for(var k=this._oKey=e.clone(),c=this._iKey=e.clone(),a=k.words,h=c.words,z=0;z>>2]|= e[k]<<24-k%4*8;m.call(this,b,d)}else m.apply(this,arguments)}).prototype=f}})();return b.lib.WordArray})},{"./core":26}],34:[function(b,l,g){(function(n,f){"object"===typeof g?l.exports=g=f(b("./core")):f(n.CryptoJS)})(this,function(b){(function(f){function m(a,c,h,d,k,e,b){a=a+(c&h|~c&d)+k+b;return(a<>>32-e)+c}function e(a,c,h,d,k,e,b){a=a+(c&d|h&~d)+k+b;return(a<>>32-e)+c}function d(a,c,h,d,k,e,b){a=a+(c^h^d)+k+b;return(a<>>32-e)+c}function p(a,c,h,d,k,e,b){a=a+(h^(c|~d))+k+b;return(a<< e|a>>>32-e)+c}var k=b.lib,c=k.WordArray,a=k.Hasher,k=b.algo,h=[];(function(){for(var a=0;64>a;a++)h[a]=4294967296*f.abs(f.sin(a+1))|0})();k=k.MD5=a.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,c){for(var k=0;16>k;k++){var b=c+k,f=a[b];a[b]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var k=this._hash.words,b=a[c+0],f=a[c+1],n=a[c+2],g=a[c+3],y=a[c+4],l=a[c+5],A=a[c+6],E=a[c+7],F=a[c+8],q=a[c+9],v=a[c+10],w=a[c+11],J= a[c+12],M=a[c+13],H=a[c+14],O=a[c+15],K=k[0],L=k[1],I=k[2],N=k[3],K=m(K,L,I,N,b,7,h[0]),N=m(N,K,L,I,f,12,h[1]),I=m(I,N,K,L,n,17,h[2]),L=m(L,I,N,K,g,22,h[3]),K=m(K,L,I,N,y,7,h[4]),N=m(N,K,L,I,l,12,h[5]),I=m(I,N,K,L,A,17,h[6]),L=m(L,I,N,K,E,22,h[7]),K=m(K,L,I,N,F,7,h[8]),N=m(N,K,L,I,q,12,h[9]),I=m(I,N,K,L,v,17,h[10]),L=m(L,I,N,K,w,22,h[11]),K=m(K,L,I,N,J,7,h[12]),N=m(N,K,L,I,M,12,h[13]),I=m(I,N,K,L,H,17,h[14]),L=m(L,I,N,K,O,22,h[15]),K=e(K,L,I,N,f,5,h[16]),N=e(N,K,L,I,A,9,h[17]),I=e(I,N,K,L,w,14,h[18]), L=e(L,I,N,K,b,20,h[19]),K=e(K,L,I,N,l,5,h[20]),N=e(N,K,L,I,v,9,h[21]),I=e(I,N,K,L,O,14,h[22]),L=e(L,I,N,K,y,20,h[23]),K=e(K,L,I,N,q,5,h[24]),N=e(N,K,L,I,H,9,h[25]),I=e(I,N,K,L,g,14,h[26]),L=e(L,I,N,K,F,20,h[27]),K=e(K,L,I,N,M,5,h[28]),N=e(N,K,L,I,n,9,h[29]),I=e(I,N,K,L,E,14,h[30]),L=e(L,I,N,K,J,20,h[31]),K=d(K,L,I,N,l,4,h[32]),N=d(N,K,L,I,F,11,h[33]),I=d(I,N,K,L,w,16,h[34]),L=d(L,I,N,K,H,23,h[35]),K=d(K,L,I,N,f,4,h[36]),N=d(N,K,L,I,y,11,h[37]),I=d(I,N,K,L,E,16,h[38]),L=d(L,I,N,K,v,23,h[39]),K=d(K, L,I,N,M,4,h[40]),N=d(N,K,L,I,b,11,h[41]),I=d(I,N,K,L,g,16,h[42]),L=d(L,I,N,K,A,23,h[43]),K=d(K,L,I,N,q,4,h[44]),N=d(N,K,L,I,J,11,h[45]),I=d(I,N,K,L,O,16,h[46]),L=d(L,I,N,K,n,23,h[47]),K=p(K,L,I,N,b,6,h[48]),N=p(N,K,L,I,E,10,h[49]),I=p(I,N,K,L,H,15,h[50]),L=p(L,I,N,K,l,21,h[51]),K=p(K,L,I,N,J,6,h[52]),N=p(N,K,L,I,g,10,h[53]),I=p(I,N,K,L,v,15,h[54]),L=p(L,I,N,K,f,21,h[55]),K=p(K,L,I,N,F,6,h[56]),N=p(N,K,L,I,O,10,h[57]),I=p(I,N,K,L,A,15,h[58]),L=p(L,I,N,K,M,21,h[59]),K=p(K,L,I,N,y,6,h[60]),N=p(N,K,L, I,w,10,h[61]),I=p(I,N,K,L,n,15,h[62]),L=p(L,I,N,K,q,21,h[63]);k[0]=k[0]+K|0;k[1]=k[1]+L|0;k[2]=k[2]+I|0;k[3]=k[3]+N|0},_doFinalize:function(){var a=this._data,c=a.words,h=8*this._nDataBytes,d=8*a.sigBytes;c[d>>>5]|=128<<24-d%32;var k=f.floor(h/4294967296);c[(d+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360;c[(d+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;a.sigBytes=4*(c.length+1);this._process();a=this._hash;c=a.words;for(h=0;4>h;h++)d=c[h],c[h]=(d<<8|d>>>24)&16711935| (d<<24|d>>>8)&4278255360;return a},clone:function(){var c=a.clone.call(this);c._hash=this._hash.clone();return c}});b.MD5=a._createHelper(k);b.HmacMD5=a._createHmacHelper(k)})(Math);return b.MD5})},{"./core":26}],35:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){b.mode.CFB=function(){function f(e,d,b,k){var c=this._iv;c?(c=c.slice(0),this._iv=void 0):c=this._prevBlock;k.encryptBlock(c,0);for(k=0;k>24&255)){var e=d>>16&255,k=d>>8&255,c=d&255;255===e?(e=0,255===k?(k=0,255===c?c=0:++c):++k):++e;d=0+(e<<16)+(k<<8);d+=c}else d+=16777216;return d}var m=b.lib.BlockCipherMode.extend(),e=m.Encryptor=m.extend({processBlock:function(d,e){var k=this._cipher,c=k.blockSize,a=this._iv,h=this._counter;a&&(h=this._counter=a.slice(0),this._iv=void 0);a=h;0===(a[0]=f(a[0]))&&(a[1]=f(a[1]));h=h.slice(0);k.encryptBlock(h,0);for(k=0;k>>2]|=d<<24-e%4*8;b.sigBytes+=d},unpad:function(b){b.sigBytes-=b.words[b.sigBytes-1>>>2]&255}};return b.pad.Ansix923})},{"./cipher-core":25,"./core":26}],41:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./cipher-core")):f(n.CryptoJS)})(this, function(b){b.pad.Iso10126={pad:function(f,m){var e=4*m,e=e-f.sigBytes%e;f.concat(b.lib.WordArray.random(e-1)).concat(b.lib.WordArray.create([e<<24],1))},unpad:function(b){b.sigBytes-=b.words[b.sigBytes-1>>>2]&255}};return b.pad.Iso10126})},{"./cipher-core":25,"./core":26}],42:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){b.pad.Iso97971={pad:function(f,m){f.concat(b.lib.WordArray.create([2147483648],1));b.pad.ZeroPadding.pad(f, m)},unpad:function(f){b.pad.ZeroPadding.unpad(f);f.sigBytes--}};return b.pad.Iso97971})},{"./cipher-core":25,"./core":26}],43:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){b.pad.NoPadding={pad:function(){},unpad:function(){}};return b.pad.NoPadding})},{"./cipher-core":25,"./core":26}],44:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){b.pad.ZeroPadding= {pad:function(b,m){var e=4*m;b.clamp();b.sigBytes+=e-(b.sigBytes%e||e)},unpad:function(b){for(var m=b.words,e=b.sigBytes-1;!(m[e>>>2]>>>24-e%4*8&255);)e--;b.sigBytes=e+1}};return b.pad.ZeroPadding})},{"./cipher-core":25,"./core":26}],45:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./sha1"),b("./hmac")):f(n.CryptoJS)})(this,function(b){(function(){var f=b.lib,m=f.Base,e=f.WordArray,f=b.algo,d=f.HMAC,p=f.PBKDF2=m.extend({cfg:m.extend({keySize:4,hasher:f.SHA1,iterations:1}), init:function(d){this.cfg=this.cfg.extend(d)},compute:function(k,c){for(var a=this.cfg,h=d.create(a.hasher,k),b=e.create(),p=e.create([1]),f=b.words,m=p.words,n=a.keySize,a=a.iterations;f.lengthh;h++)d[h]=a[h];a[0]=a[0]+1295307597+this._b|0;a[1]=a[1]+3545052371+(a[0]>>>0>>0?1:0)|0;a[2]=a[2]+886263092+(a[1]>>>0>>0?1:0)|0;a[3]=a[3]+1295307597+(a[2]>>>0>>0?1:0)|0;a[4]=a[4]+3545052371+(a[3]>>>0>>0?1:0)|0;a[5]=a[5]+886263092+ (a[4]>>>0>>0?1:0)|0;a[6]=a[6]+1295307597+(a[5]>>>0>>0?1:0)|0;a[7]=a[7]+3545052371+(a[6]>>>0>>0?1:0)|0;this._b=a[7]>>>0>>0?1:0;for(h=0;8>h;h++){var k=c[h]+a[h],e=k&65535,b=k>>>16;p[h]=((e*e>>>17)+e*b>>>15)+b*b^((k&4294901760)*k|0)+((k&65535)*k|0)}c[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0;c[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0;c[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0;c[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0;c[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)| 0;c[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0;c[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0;c[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}var m=b.lib.StreamCipher,e=[],d=[],p=[],k=b.algo.RabbitLegacy=m.extend({_doReset:function(){for(var c=this._key.words,a=this.cfg.iv,h=this._X=[c[0],c[3]<<16|c[2]>>>16,c[1],c[0]<<16|c[3]>>>16,c[2],c[1]<<16|c[0]>>>16,c[3],c[2]<<16|c[1]>>>16],c=this._C=[c[2]<<16|c[2]>>>16,c[0]&4294901760|c[1]&65535,c[3]<<16|c[3]>>>16,c[1]&4294901760|c[2]&65535,c[0]<<16|c[0]>>>16,c[2]&4294901760| c[3]&65535,c[1]<<16|c[1]>>>16,c[3]&4294901760|c[0]&65535],d=this._b=0;4>d;d++)f.call(this);for(d=0;8>d;d++)c[d]^=h[d+4&7];if(a){var h=a.words,a=h[0],h=h[1],a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,d=a>>>16|h&4294901760,k=h<<16|a&65535;c[0]^=a;c[1]^=d;c[2]^=h;c[3]^=k;c[4]^=a;c[5]^=d;c[6]^=h;c[7]^=k;for(d=0;4>d;d++)f.call(this)}},_doProcessBlock:function(c,a){var h=this._X;f.call(this);e[0]=h[0]^h[5]>>>16^h[3]<<16;e[1]=h[2]^h[7]>>>16^h[5]<< 16;e[2]=h[4]^h[1]>>>16^h[7]<<16;e[3]=h[6]^h[3]>>>16^h[1]<<16;for(h=0;4>h;h++)e[h]=(e[h]<<8|e[h]>>>24)&16711935|(e[h]<<24|e[h]>>>8)&4278255360,c[a+h]^=e[h]},blockSize:4,ivSize:2});b.RabbitLegacy=m._createHelper(k)})();return b.RabbitLegacy})},{"./cipher-core":25,"./core":26,"./enc-base64":27,"./evpkdf":29,"./md5":34}],47:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./enc-base64"),b("./md5"),b("./evpkdf"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){(function(){function f(){for(var c= this._X,a=this._C,h=0;8>h;h++)d[h]=a[h];a[0]=a[0]+1295307597+this._b|0;a[1]=a[1]+3545052371+(a[0]>>>0>>0?1:0)|0;a[2]=a[2]+886263092+(a[1]>>>0>>0?1:0)|0;a[3]=a[3]+1295307597+(a[2]>>>0>>0?1:0)|0;a[4]=a[4]+3545052371+(a[3]>>>0>>0?1:0)|0;a[5]=a[5]+886263092+(a[4]>>>0>>0?1:0)|0;a[6]=a[6]+1295307597+(a[5]>>>0>>0?1:0)|0;a[7]=a[7]+3545052371+(a[6]>>>0>>0?1:0)|0;this._b=a[7]>>>0>>0?1:0;for(h=0;8>h;h++){var k=c[h]+a[h],e=k&65535,b=k>>>16;p[h]=((e*e>>>17)+e*b>>> 15)+b*b^((k&4294901760)*k|0)+((k&65535)*k|0)}c[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0;c[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0;c[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0;c[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0;c[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0;c[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0;c[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0;c[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}var m=b.lib.StreamCipher,e=[],d=[],p=[],k=b.algo.Rabbit=m.extend({_doReset:function(){for(var c= this._key.words,a=this.cfg.iv,h=0;4>h;h++)c[h]=(c[h]<<8|c[h]>>>24)&16711935|(c[h]<<24|c[h]>>>8)&4278255360;for(var d=this._X=[c[0],c[3]<<16|c[2]>>>16,c[1],c[0]<<16|c[3]>>>16,c[2],c[1]<<16|c[0]>>>16,c[3],c[2]<<16|c[1]>>>16],c=this._C=[c[2]<<16|c[2]>>>16,c[0]&4294901760|c[1]&65535,c[3]<<16|c[3]>>>16,c[1]&4294901760|c[2]&65535,c[0]<<16|c[0]>>>16,c[2]&4294901760|c[3]&65535,c[1]<<16|c[1]>>>16,c[3]&4294901760|c[0]&65535],h=this._b=0;4>h;h++)f.call(this);for(h=0;8>h;h++)c[h]^=d[h+4&7];if(a){var h=a.words, a=h[0],h=h[1],a=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,h=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,d=a>>>16|h&4294901760,k=h<<16|a&65535;c[0]^=a;c[1]^=d;c[2]^=h;c[3]^=k;c[4]^=a;c[5]^=d;c[6]^=h;c[7]^=k;for(h=0;4>h;h++)f.call(this)}},_doProcessBlock:function(c,a){var h=this._X;f.call(this);e[0]=h[0]^h[5]>>>16^h[3]<<16;e[1]=h[2]^h[7]>>>16^h[5]<<16;e[2]=h[4]^h[1]>>>16^h[7]<<16;e[3]=h[6]^h[3]>>>16^h[1]<<16;for(h=0;4>h;h++)e[h]=(e[h]<<8|e[h]>>>24)&16711935|(e[h]<<24|e[h]>>>8)&4278255360, c[a+h]^=e[h]},blockSize:4,ivSize:2});b.Rabbit=m._createHelper(k)})();return b.Rabbit})},{"./cipher-core":25,"./core":26,"./enc-base64":27,"./evpkdf":29,"./md5":34}],48:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./enc-base64"),b("./md5"),b("./evpkdf"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){(function(){function f(){for(var d=this._S,k=this._i,c=this._j,a=0,h=0;4>h;h++){var k=(k+1)%256,c=(c+d[k])%256,e=d[k];d[k]=d[c];d[c]=e;a|=d[(d[k]+d[c])%256]<< 24-8*h}this._i=k;this._j=c;return a}var m=b.lib.StreamCipher,e=b.algo,d=e.RC4=m.extend({_doReset:function(){for(var d=this._key,k=d.words,d=d.sigBytes,c=this._S=[],a=0;256>a;a++)c[a]=a;for(var h=a=0;256>a;a++){var e=a%d,h=(h+c[a]+(k[e>>>2]>>>24-e%4*8&255))%256,e=c[a];c[a]=c[h];c[h]=e}this._i=this._j=0},_doProcessBlock:function(d,k){d[k]^=f.call(this)},keySize:8,ivSize:0});b.RC4=m._createHelper(d);e=e.RC4Drop=d.extend({cfg:d.cfg.extend({drop:192}),_doReset:function(){d._doReset.call(this);for(var e= this.cfg.drop;0>>32-c}f=b.lib;var e=f.WordArray,d=f.Hasher;f=b.algo;var p=e.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5, 12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),k=e.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=e.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a= e.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=e.create([0,1518500249,1859775393,2400959708,2840853838]),z=e.create([1352829926,1548603684,1836072691,2053994217,0]);f=f.RIPEMD160=d.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,e){for(var b=0;16>b;b++){var f= e+b,n=d[f];d[f]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var f=this._hash.words,n=h.words,g=z.words,y=p.words,l=k.words,A=c.words,E=a.words,F,q,v,w,J,M,H,O,K,L;M=F=f[0];H=q=f[1];O=v=f[2];K=w=f[3];L=J=f[4];for(var I,b=0;80>b;b+=1)I=F+d[e+y[b]]|0,I=16>b?I+((q^v^w)+n[0]):32>b?I+((q&v|~q&w)+n[1]):48>b?I+(((q|~v)^w)+n[2]):64>b?I+((q&w|v&~w)+n[3]):I+((q^(v|~w))+n[4]),I|=0,I=m(I,A[b]),I=I+J|0,F=J,J=w,w=m(v,10),v=q,q=I,I=M+d[e+l[b]]|0,I=16>b?I+((H^(O|~K))+g[0]):32>b?I+((H&K|O&~K)+g[1]):48>b?I+(((H| ~O)^K)+g[2]):64>b?I+((H&O|~H&K)+g[3]):I+((H^O^K)+g[4]),I|=0,I=m(I,E[b]),I=I+L|0,M=L,L=K,K=m(O,10),O=H,H=I;I=f[1]+v+K|0;f[1]=f[2]+w+L|0;f[2]=f[3]+J+M|0;f[3]=f[4]+F+H|0;f[4]=f[0]+q+O|0;f[0]=I},_doFinalize:function(){var a=this._data,c=a.words,h=8*this._nDataBytes,d=8*a.sigBytes;c[d>>>5]|=128<<24-d%32;c[(d+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;a.sigBytes=4*(c.length+1);this._process();a=this._hash;c=a.words;for(h=0;5>h;h++)d=c[h],c[h]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360; return a},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});b.RIPEMD160=d._createHelper(f);b.HmacRIPEMD160=d._createHmacHelper(f)})(Math);return b.RIPEMD160})},{"./core":26}],50:[function(b,l,g){(function(n,f){"object"===typeof g?l.exports=g=f(b("./core")):f(n.CryptoJS)})(this,function(b){(function(){var f=b.lib,m=f.WordArray,e=f.Hasher,d=[],f=b.algo.SHA1=e.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e, k){for(var c=this._hash.words,a=c[0],h=c[1],b=c[2],f=c[3],m=c[4],n=0;80>n;n++){if(16>n)d[n]=e[k+n]|0;else{var g=d[n-3]^d[n-8]^d[n-14]^d[n-16];d[n]=g<<1|g>>>31}g=(a<<5|a>>>27)+m+d[n];g=20>n?g+((h&b|~h&f)+1518500249):40>n?g+((h^b^f)+1859775393):60>n?g+((h&b|h&f|b&f)-1894007588):g+((h^b^f)-899497514);m=f;f=b;b=h<<30|h>>>2;h=a;a=g}c[0]=c[0]+a|0;c[1]=c[1]+h|0;c[2]=c[2]+b|0;c[3]=c[3]+f|0;c[4]=c[4]+m|0},_doFinalize:function(){var d=this._data,k=d.words,c=8*this._nDataBytes,a=8*d.sigBytes;k[a>>>5]|=128<< 24-a%32;k[(a+64>>>9<<4)+14]=Math.floor(c/4294967296);k[(a+64>>>9<<4)+15]=c;d.sigBytes=4*k.length;this._process();return this._hash},clone:function(){var d=e.clone.call(this);d._hash=this._hash.clone();return d}});b.SHA1=e._createHelper(f);b.HmacSHA1=e._createHmacHelper(f)})();return b.SHA1})},{"./core":26}],51:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./sha256")):f(n.CryptoJS)})(this,function(b){(function(){var f=b.lib.WordArray,m=b.algo,e=m.SHA256,m=m.SHA224= e.extend({_doReset:function(){this._hash=new f.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=e._doFinalize.call(this);d.sigBytes-=4;return d}});b.SHA224=e._createHelper(m);b.HmacSHA224=e._createHmacHelper(m)})();return b.SHA224})},{"./core":26,"./sha256":52}],52:[function(b,l,g){(function(n,f){"object"===typeof g?l.exports=g=f(b("./core")):f(n.CryptoJS)})(this,function(b){(function(f){var m=b.lib,e=m.WordArray,d=m.Hasher, m=b.algo,p=[],k=[];(function(){function a(a){for(var c=f.sqrt(a),h=2;h<=c;h++)if(!(a%h))return!1;return!0}function c(a){return 4294967296*(a-(a|0))|0}for(var d=2,b=0;64>b;)a(d)&&(8>b&&(p[b]=c(f.pow(d,.5))),k[b]=c(f.pow(d,1/3)),b++),d++})();var c=[],m=m.SHA256=d.extend({_doReset:function(){this._hash=new e.init(p.slice(0))},_doProcessBlock:function(a,h){for(var d=this._hash.words,b=d[0],e=d[1],f=d[2],p=d[3],m=d[4],n=d[5],g=d[6],l=d[7],A=0;64>A;A++){if(16>A)c[A]=a[h+A]|0;else{var E=c[A-15],F=c[A-2]; c[A]=((E<<25|E>>>7)^(E<<14|E>>>18)^E>>>3)+c[A-7]+((F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10)+c[A-16]}E=l+((m<<26|m>>>6)^(m<<21|m>>>11)^(m<<7|m>>>25))+(m&n^~m&g)+k[A]+c[A];F=((b<<30|b>>>2)^(b<<19|b>>>13)^(b<<10|b>>>22))+(b&e^b&f^e&f);l=g;g=n;n=m;m=p+E|0;p=f;f=e;e=b;b=E+F|0}d[0]=d[0]+b|0;d[1]=d[1]+e|0;d[2]=d[2]+f|0;d[3]=d[3]+p|0;d[4]=d[4]+m|0;d[5]=d[5]+n|0;d[6]=d[6]+g|0;d[7]=d[7]+l|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,k=8*a.sigBytes;c[k>>>5]|=128<<24-k%32;c[(k+64>>>9<< 4)+14]=f.floor(d/4294967296);c[(k+64>>>9<<4)+15]=d;a.sigBytes=4*c.length;this._process();return this._hash},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a}});b.SHA256=d._createHelper(m);b.HmacSHA256=d._createHmacHelper(m)})(Math);return b.SHA256})},{"./core":26}],53:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./x64-core")):f(n.CryptoJS)})(this,function(b){(function(f){var m=b.lib,e=m.WordArray,d=m.Hasher,p=b.x64.Word,m=b.algo,k= [],c=[],a=[];(function(){for(var h=1,d=0,b=0;24>b;b++){k[h+5*d]=(b+1)*(b+2)/2%64;var e=(2*h+3*d)%5,h=d%5,d=e}for(h=0;5>h;h++)for(d=0;5>d;d++)c[h+5*d]=d+(2*h+3*d)%5*5;h=1;for(d=0;24>d;d++){for(var f=e=b=0;7>f;f++){if(h&1){var m=(1<m?e^=1<a;a++)h[a]=p.create()})();m=m.SHA3=d.extend({cfg:d.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],c=0;25>c;c++)a[c]=new p.init;this.blockSize= (1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(d,b){for(var e=this._state,f=this.blockSize/2,p=0;p>>24)&16711935|(m<<24|m>>>8)&4278255360,n=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,g=e[p];g.high^=n;g.low^=m}for(f=0;24>f;f++){for(p=0;5>p;p++){for(var l=m=0,A=0;5>A;A++)g=e[p+5*A],m^=g.high,l^=g.low;g=h[p];g.high=m;g.low=l}for(p=0;5>p;p++)for(g=h[(p+4)%5],m=h[(p+1)%5],n=m.high,A=m.low,m=g.high^(n<<1|A>>>31),l=g.low^(A<<1|n>>>31),A=0;5> A;A++)g=e[p+5*A],g.high^=m,g.low^=l;for(n=1;25>n;n++)g=e[n],p=g.high,g=g.low,A=k[n],32>A?(m=p<>>32-A,l=g<>>32-A):(m=g<>>64-A,l=p<>>64-A),g=h[c[n]],g.high=m,g.low=l;g=h[0];p=e[0];g.high=p.high;g.low=p.low;for(p=0;5>p;p++)for(A=0;5>A;A++)n=p+5*A,g=e[n],m=h[n],n=h[(p+1)%5+5*A],l=h[(p+2)%5+5*A],g.high=m.high^~n.high&l.high,g.low=m.low^~n.low&l.low;g=e[0];p=a[f];g.high^=p.high;g.low^=p.low}},_doFinalize:function(){var a=this._data,c=a.words,h=8*a.sigBytes,d=32*this.blockSize; c[h>>>5]|=1<<24-h%32;c[(f.ceil((h+1)/d)*d>>>5)-1]|=128;a.sigBytes=4*c.length;this._process();for(var a=this._state,c=this.cfg.outputLength/8,h=c/8,d=[],k=0;k>>24)&16711935|(p<<24|p>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;d.push(b);d.push(p)}return new e.init(d,c)},clone:function(){for(var a=d.clone.call(this),c=a._state=this._state.slice(0),h=0;25>h;h++)c[h]=c[h].clone();return a}});b.SHA3=d._createHelper(m);b.HmacSHA3=d._createHmacHelper(m)})(Math); return b.SHA3})},{"./core":26,"./x64-core":57}],54:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./x64-core"),b("./sha512")):f(n.CryptoJS)})(this,function(b){(function(){var f=b.x64,m=f.Word,e=f.WordArray,f=b.algo,d=f.SHA512,f=f.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new m.init(3418070365,3238371032),new m.init(1654270250,914150663),new m.init(2438529370,812702999),new m.init(355462360,4144912697),new m.init(1731405415,4290775857),new m.init(2394180231, 1750603025),new m.init(3675008525,1694076839),new m.init(1203062813,3204075428)])},_doFinalize:function(){var b=d._doFinalize.call(this);b.sigBytes-=16;return b}});b.SHA384=d._createHelper(f);b.HmacSHA384=d._createHmacHelper(f)})();return b.SHA384})},{"./core":26,"./sha512":55,"./x64-core":57}],55:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./x64-core")):f(n.CryptoJS)})(this,function(b){(function(){function f(){return d.create.apply(d,arguments)}var m=b.lib.Hasher, e=b.x64,d=e.Word,p=e.WordArray,e=b.algo,k=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773), f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037, 344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044), f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],c=[];(function(){for(var a= 0;80>a;a++)c[a]=f()})();e=e.SHA512=m.extend({_doReset:function(){this._hash=new p.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,h){for(var d=this._hash.words,b=d[0],e=d[1],f=d[2],p=d[3],m=d[4],n=d[5],g=d[6],d=d[7],l=b.high,A=b.low,E=e.high,F= e.low,q=f.high,v=f.low,w=p.high,J=p.low,M=m.high,H=m.low,O=n.high,K=n.low,L=g.high,I=g.low,N=d.high,V=d.low,R=l,X=A,na=E,qa=F,ua=q,sa=v,Ga=w,va=J,pa=M,oa=H,wa=O,ra=K,ta=L,ba=I,da=N,P=V,T=0;80>T;T++){var U=c[T];if(16>T)var W=U.high=a[h+2*T]|0,Q=U.low=a[h+2*T+1]|0;else{var W=c[T-15],Q=W.high,Y=W.low,W=(Q>>>1|Y<<31)^(Q>>>8|Y<<24)^Q>>>7,Y=(Y>>>1|Q<<31)^(Y>>>8|Q<<24)^(Y>>>7|Q<<25),aa=c[T-2],Q=aa.high,S=aa.low,aa=(Q>>>19|S<<13)^(Q<<3|S>>>29)^Q>>>6,S=(S>>>19|Q<<13)^(S<<3|Q>>>29)^(S>>>6|Q<<26),Q=c[T-7],ga= Q.high,Z=c[T-16],ca=Z.high,Z=Z.low,Q=Y+Q.low,W=W+ga+(Q>>>0>>0?1:0),Q=Q+S,W=W+aa+(Q>>>0>>0?1:0),Q=Q+Z,W=W+ca+(Q>>>0>>0?1:0);U.high=W;U.low=Q}var ga=pa&wa^~pa&ta,Z=oa&ra^~oa&ba,U=R&na^R&ua^na&ua,fa=X&qa^X&sa^qa&sa,Y=(R>>>28|X<<4)^(R<<30|X>>>2)^(R<<25|X>>>7),aa=(X>>>28|R<<4)^(X<<30|R>>>2)^(X<<25|R>>>7),S=k[T],ka=S.high,ea=S.low,S=P+((oa>>>14|pa<<18)^(oa>>>18|pa<<14)^(oa<<23|pa>>>9)),ca=da+((pa>>>14|oa<<18)^(pa>>>18|oa<<14)^(pa<<23|oa>>>9))+(S>>>0

>>0?1:0),S=S+Z,ca=ca+ga+(S>>>0>>0?1:0), S=S+ea,ca=ca+ka+(S>>>0>>0?1:0),S=S+Q,ca=ca+W+(S>>>0>>0?1:0),Q=aa+fa,U=Y+U+(Q>>>0>>0?1:0),da=ta,P=ba,ta=wa,ba=ra,wa=pa,ra=oa,oa=va+S|0,pa=Ga+ca+(oa>>>0>>0?1:0)|0,Ga=ua,va=sa,ua=na,sa=qa,na=R,qa=X,X=S+Q|0,R=ca+U+(X>>>0>>0?1:0)|0}A=b.low=A+X;b.high=l+R+(A>>>0>>0?1:0);F=e.low=F+qa;e.high=E+na+(F>>>0>>0?1:0);v=f.low=v+sa;f.high=q+ua+(v>>>0>>0?1:0);J=p.low=J+va;p.high=w+Ga+(J>>>0>>0?1:0);H=m.low=H+oa;m.high=M+pa+(H>>>0>>0?1:0);K=n.low=K+ra;n.high=O+wa+(K>>>0>>0? 1:0);I=g.low=I+ba;g.high=L+ta+(I>>>0>>0?1:0);V=d.low=V+P;d.high=N+da+(V>>>0

>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,b=8*a.sigBytes;c[b>>>5]|=128<<24-b%32;c[(b+128>>>10<<5)+30]=Math.floor(d/4294967296);c[(b+128>>>10<<5)+31]=d;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=m.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});b.SHA512=m._createHelper(e);b.HmacSHA512=m._createHmacHelper(e)})();return b.SHA512})}, {"./core":26,"./x64-core":57}],56:[function(b,l,g){(function(n,f,m){"object"===typeof g?l.exports=g=f(b("./core"),b("./enc-base64"),b("./md5"),b("./evpkdf"),b("./cipher-core")):f(n.CryptoJS)})(this,function(b){(function(){function f(a,c){var h=(this._lBlock>>>a^this._rBlock)&c;this._rBlock^=h;this._lBlock^=h<>>a^this._lBlock)&c;this._lBlock^=h;this._rBlock^=h<b;b++){var e=k[b]-1;d[b]=h[e>>>5]>>> 31-e%32&1}h=this._subKeys=[];for(e=0;16>e;e++){for(var f=h[e]=[],p=a[e],b=0;24>b;b++)f[b/6|0]|=d[(c[b]-1+p)%28]<<31-b%6,f[4+(b/6|0)]|=d[28+(c[b+24]-1+p)%28]<<31-b%6;f[0]=f[0]<<1|f[0]>>>31;for(b=1;7>b;b++)f[b]>>>=4*(b-1)+3;f[7]=f[7]<<5|f[7]>>>27}d=this._invSubKeys=[];for(b=0;16>b;b++)d[b]=h[15-b]},encryptBlock:function(a,c){this._doCryptBlock(a,c,this._subKeys)},decryptBlock:function(a,c){this._doCryptBlock(a,c,this._invSubKeys)},_doCryptBlock:function(a,c,d){this._lBlock=a[c];this._rBlock=a[c+1]; f.call(this,4,252645135);f.call(this,16,65535);m.call(this,2,858993459);m.call(this,8,16711935);f.call(this,1,1431655765);for(var b=0;16>b;b++){for(var k=d[b],e=this._lBlock,p=this._rBlock,n=0,C=0;8>C;C++)n|=h[C][((p^k[C])&g[C])>>>0];this._lBlock=p;this._rBlock=e^n}d=this._lBlock;this._lBlock=this._rBlock;this._rBlock=d;f.call(this,1,1431655765);m.call(this,8,16711935);m.call(this,2,858993459);f.call(this,16,65535);f.call(this,4,252645135);a[c]=this._lBlock;a[c+1]=this._rBlock},keySize:2,ivSize:2, blockSize:2});b.DES=e._createHelper(C);p=p.TripleDES=e.extend({_doReset:function(){var a=this._key.words;this._des1=C.createEncryptor(d.create(a.slice(0,2)));this._des2=C.createEncryptor(d.create(a.slice(2,4)));this._des3=C.createEncryptor(d.create(a.slice(4,6)))},encryptBlock:function(a,c){this._des1.encryptBlock(a,c);this._des2.decryptBlock(a,c);this._des3.encryptBlock(a,c)},decryptBlock:function(a,c){this._des3.decryptBlock(a,c);this._des2.encryptBlock(a,c);this._des1.decryptBlock(a,c)},keySize:6, ivSize:2,blockSize:2});b.TripleDES=e._createHelper(p)})();return b.TripleDES})},{"./cipher-core":25,"./core":26,"./enc-base64":27,"./evpkdf":29,"./md5":34}],57:[function(b,l,g){(function(n,f){"object"===typeof g?l.exports=g=f(b("./core")):f(n.CryptoJS)})(this,function(b){(function(f){var m=b.lib,e=m.Base,d=m.WordArray,m=b.x64={};m.Word=e.extend({init:function(d,b){this.high=d;this.low=b}});m.WordArray=e.extend({init:function(d,b){d=this.words=d||[];this.sigBytes=b!=f?b:8*d.length},toX32:function(){for(var b= this.words,k=b.length,c=[],a=0;ac?this[d++]=c:(2048>c? this[d++]=192|c>>6:(this[d++]=224|c>>12,this[d++]=128|c>>6&63),this[d++]=128|c&63)}return d-e};g.readString=function(b,e){var d=b-0||0;e||(e=this.length);var f=e-b;8192h?h:224>h?(h&63)<<6|this[d++]&63:(h&63)<<12|(this[d++]&63)<<6|this[d++]&63;c[a++]=h}ad?1:2048>d?2:3});return e};g.copy=function(b,e,d,f){d||(d=0);f||0===f||(f=this.length);e||(e=0);var k=f-d;if(b===this&&d>>8;b[k++]=d;c.offset=k}}function e(a){return function(c,d){c.reserve(5);var b=c.buffer,k=c.offset;b[k++]=a;b[k++]=d>>>24;b[k++]=d>>>16;b[k++]=d>>>8;b[k++]=d;c.offset=k}}function d(a,c,d,b){return function(k,e){k.reserve(c+1);k.buffer[k.offset++]=a;d.call(k.buffer,e,k.offset,b);k.offset+= c}}var p=b("./buffer-lite"),k=b("./write-uint8").uint8,c="TYPED_ARRAY_SUPPORT"in n&&!n.TYPED_ARRAY_SUPPORT;g.getWriteToken=function(a){if(c||a&&a.safe)return a=k.slice(),a[196]=d(196,1,n.prototype.writeUInt8),a[197]=d(197,2,n.prototype.writeUInt16BE),a[198]=d(198,4,n.prototype.writeUInt32BE),a[199]=d(199,1,n.prototype.writeUInt8),a[200]=d(200,2,n.prototype.writeUInt16BE),a[201]=d(201,4,n.prototype.writeUInt32BE),a[202]=d(202,4,n.prototype.writeFloatBE),a[203]=d(203,8,n.prototype.writeDoubleBE),a[204]= d(204,1,n.prototype.writeUInt8),a[205]=d(205,2,n.prototype.writeUInt16BE),a[206]=d(206,4,n.prototype.writeUInt32BE),a[207]=d(207,8,p.writeUint64BE),a[208]=d(208,1,n.prototype.writeInt8),a[209]=d(209,2,n.prototype.writeInt16BE),a[210]=d(210,4,n.prototype.writeInt32BE),a[211]=d(211,8,p.writeUint64BE),a[217]=d(217,1,n.prototype.writeUInt8),a[218]=d(218,2,n.prototype.writeUInt16BE),a[219]=d(219,4,n.prototype.writeUInt32BE),a[220]=d(220,2,n.prototype.writeUInt16BE),a[221]=d(221,4,n.prototype.writeUInt32BE), a[222]=d(222,2,n.prototype.writeUInt16BE),a[223]=d(223,4,n.prototype.writeUInt32BE),a;a=k.slice();a[196]=f(196);a[197]=m(197);a[198]=e(198);a[199]=f(199);a[200]=m(200);a[201]=e(201);a[202]=d(202,4,n.prototype.writeFloatBE,!0);a[203]=d(203,8,n.prototype.writeDoubleBE,!0);a[204]=f(204);a[205]=m(205);a[206]=e(206);a[207]=d(207,8,p.writeUint64BE);a[208]=f(208);a[209]=m(209);a[210]=e(210);a[211]=d(211,8,p.writeUint64BE);a[217]=f(217);a[218]=m(218);a[219]=e(219);a[220]=m(220);a[221]=e(221);a[222]=m(222); a[223]=e(223);return a}}).call(this,b("buffer").Buffer)},{"./buffer-lite":59,"./write-uint8":63,buffer:128}],62:[function(b,l,g){(function(n){function f(a,c,d,h){h=c+h;d=c+d;z?k.copy.call(a.buffer,a.buffer,h,c,d):a.buffer.copy(a.buffer,h,c,d)}var m=b("isarray"),e=b("int64-buffer"),d=e.Uint64BE,p=e.Int64BE,k=b("./buffer-lite"),c=b("./write-token"),a=b("./write-uint8").uint8,h=b("./ext-buffer").ExtBuffer,z="TYPED_ARRAY_SUPPORT"in n,C=[,212,213,,214,,,,215];C[16]=216;g.getWriteType=function(b){function e(c, b){if(null===b)return g(c,b);if(n.isBuffer(b)){var q=b,k=q.length;D[255>k?196:65535>=k?197:198](c,k);c.send(q)}else if(m(b)){q=b;k=q.length;D[16>k?144+k:65535>=k?220:221](c,k);for(var f=c.codec.encode,x=0;xf?199:65535>=f?200:201)](c,f),a[q.type](c),c.send(k)):z(c,b)}function g(a,c){D[192](a,c)}function z(a, c){var q=Object.keys(c),d=q.length;D[16>d?128+d:65535>=d?222:223](a,d);var h=a.codec.encode;q.forEach(function(q){h(a,q);h(a,c[q])})}function x(a,c){var q=c.length;a.reserve(5+3*q);var d=32>q?1:65535>=q?3:5,h=a.offset+d,q=k.writeString.call(a.buffer,c,h),b=32>q?1:65535>=q?3:5;d!==b&&f(a,h,q,b-d);D[32>q?160+q:65535>=q?218:219](a,q);a.offset+=q}function l(a,c){if(!n.isBuffer(c))return e(a,c);var q=c.length;D[32>q?160+q:65535>=q?218:219](a,q);a.send(c)}var D=c.getWriteToken(b),A={"boolean":function(a, c){D[c?195:194](a,c)},"function":g,number:function(a,c){var q=c|0;if(c!==q)D[203](a,c);else D[-32<=q&&127>=q?q&255:0<=q?255>=q?204:65535>=q?205:206:-128<=q?208:-32768<=q?209:210](a,q)},object:e,string:function(a,c){var q=c.length;a.reserve(5+3*q);var d=32>q?1:255>=q?2:65535>=q?3:5,h=a.offset+d,q=k.writeString.call(a.buffer,c,h),b=32>q?1:255>=q?2:65535>=q?3:5;d!==b&&f(a,h,q,b-d);D[1===b?160+q:3>=b?215+b:219](a,q);a.offset+=q},symbol:g,undefined:g};b&&b.useraw&&(A.object=l,A.string=x);return A}}).call(this, b("buffer").Buffer)},{"./buffer-lite":59,"./ext-buffer":60,"./write-token":61,"./write-uint8":63,buffer:128,"int64-buffer":64,isarray:65}],63:[function(b,l,g){function n(b){return function(m){m.reserve(1);m.buffer[m.offset++]=b}}b=g.uint8=Array(256);for(l=0;255>=l;l++)b[l]=n(l)},{}],64:[function(b,l,g){(function(b){var f,m;!function(e){function d(a,c,d,b,e){l&&x&&(c instanceof x&&(c=new l(c)),b instanceof x&&(b=new l(b)));if(c||d||b||E){if(!p(c,d)){var f=E||Array;e=d;b=c;d=0;c=new f(8)}a.buffer=c; a.offset=d|=0;if("undefined"!==typeof b)if("string"===typeof b){a=c;e=e||10;c=0;var f=b.length,m=0,n=0;"-"===b[0]&&c++;for(var g=c;c=d;e--)a[e]=b&255,b/=256;else if(0>b)for(a=c,b++,e=d+7;e>=d;e--)a[e]=-b&255^255,b/=256;else k(c,d,y,0)}else a.buffer=Array.prototype.slice.call(y, 0,8)}function p(a,c){var d=a&&a.length;c|=0;return d&&c+8<=d&&"string"!==typeof a[c]}function k(a,c,d,h){c|=0;h|=0;for(var b=0;8>b;b++)a[c++]=d[h++]&255}function c(c,d,h,b){var k="",e=a(c,d);c=a(c,d+4);if(b=b&&e&2147483648)e=~e,c=A-c;for(h=h||10;d=e%h*A+c,e=Math.floor(e/h),c=Math.floor(d/h),k=(d%h).toString(h)+k,e||c;);b&&(k="-"+k);return k}function a(a,c){return 16777216*a[c++]+(a[c++]<<16)+(a[c++]<<8)+a[c]}function h(a,c,d){a[c+3]=d&255;d>>=8;a[c+2]=d&255;d>>=8;a[c+1]=d&255;a[c]=d>>8&255}function g(a){return!!a&& "[object Array]"==Object.prototype.toString.call(a)}var C=e.Uint64BE=f=function(a,c,h,b){return this instanceof f?d(this,a,c,h,b):new f(a,c,h,b)};e=e.Int64BE=m=function(a,c,h,b){return this instanceof m?d(this,a,c,h,b):new m(a,c,h,b)};var u=C.prototype,r=e.prototype,B="undefined"!==typeof b&&b,l="undefined"!==typeof Uint8Array&&Uint8Array,x="undefined"!==typeof ArrayBuffer&&ArrayBuffer,y=[0,0,0,0,0,0,0,0],D=Array.isArray||g,A=4294967296,E;u.buffer=r.buffer=void 0;u.offset=r.offset=0;u._isUint64BE= r._isInt64BE=!0;C.isUint64BE=function(a){return!(!a||!a._isUint64BE)};e.isInt64BE=function(a){return!(!a||!a._isInt64BE)};u.toNumber=function(){var c=this.buffer,d=this.offset,h=a(c,d),c=a(c,d+4);return h?h*A+c:c};r.toNumber=function(){var c=this.buffer,d=this.offset,h=a(c,d)|0,c=a(c,d+4);return h?h*A+c:c};u.toArray=r.toArray=function(a){var c=this.buffer,d=this.offset;E=null;return!1!==a&&0===d&&8===c.length&&D(c)?c:Array.prototype.slice.call(c,d,d+8)};B&&(u.toBuffer=r.toBuffer=function(a){var c= this.buffer,d=this.offset;E=B;if(!1!==a&&0===d&&8===c.length&&b.isBuffer(c))return c;a=new B(8);k(a,0,c,d);return a});l&&(u.toArrayBuffer=r.toArrayBuffer=function(a){var c=this.buffer,d=this.offset,h=c.buffer;E=l;if(!1!==a&&0===d&&h instanceof x&&8===h.byteLength)return h;a=new l(8);k(a,0,c,d);return a.buffer});r.toString=function(a){return c(this.buffer,this.offset,a,!0)};u.toString=function(a){return c(this.buffer,this.offset,a,!1)};u.toJSON=u.toNumber;r.toJSON=r.toNumber}("object"===typeof g&& "string"!==typeof g.nodeName?g:this||{})}).call(this,b("buffer").Buffer)},{buffer:128}],65:[function(b,l,g){var n={}.toString;l.exports=Array.isArray||function(b){return"[object Array]"==n.call(b)}},{}],66:[function(b,l,g){l.exports.Validation={isValidUTF8:function(b){return!0}}},{}],67:[function(b,l,g){try{l.exports=b("bindings")("validation")}catch(n){l.exports=b("./fallback")}},{"./fallback":66,bindings:68}],68:[function(b,l,g){(function(n,f){var m=b("fs"),e=b("path"),d=e.join,p=e.dirname,k=m.existsSync|| e.existsSync,c={arrow:n.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:n.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:n.platform,arch:n.arch,version:n.versions.node,bindings:"bindings.node","try":[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build", "default","bindings"],"module_root compiled version platform arch bindings".split(" ")]};l.exports=g=function(a){"string"==typeof a?a={bindings:a}:a||(a={});a.__proto__=c;a.module_root||(a.module_root=g.getRoot(g.getFileName()));".node"!=e.extname(a.bindings)&&(a.bindings+=".node");for(var h=[],k=0,f=a["try"].length,p,m;kc.i)return d(c.f,c.thisArg,c.params,a);e._handler(c.args[c.i]).fold(k,c,void 0,a)}function k(c,a,d){c.params[c.i]=a;--c.i;f(c,d)}2>arguments.length&&(d=m);return function(c,a,h){var b=e._defer(),k= h.length;f({f:c,thisArg:a,args:h,params:Array(k),i:k-1,call:d},b._handler);return b}}function m(b,d,f,k){try{k.resolve(b.apply(d,f))}catch(c){k.reject(c)}}b.tryCatchResolve=m;return b})})(function(b){l.exports=b()})},{}],74:[function(b,l,g){(function(b){b(function(b){var m=b("../state"),e=b("../apply");return function(d){function b(c){var h=d._handler(c);if(0===h.state())return a(c).then(m.fulfilled,m.rejected);h._unreport();return m.inspect(h)}function k(a){return function(d,h,b){return c(a,void 0, [d,h,b])}}var c=e(d),a=d.resolve,h=d.all,f=Array.prototype.reduce,n=Array.prototype.reduceRight,g=Array.prototype.slice;d.any=function(a){function c(a){p=null;this.resolve(a)}function h(a){this.resolved||(p.push(a),0===--f&&this.reject(p))}for(var b=d._defer(),k=b._handler,e=a.length>>>0,f=e,p=[],m,q=0;q>>0,q=0,n,g,z;for(z=0;zq?e.reject(new RangeError("some(): array must contain at least "+c+" item(s), but had "+q)):0===q&&e.resolve(f);for(z=0;zarguments.length?h.call(this,a):"function"!==typeof a?this.ensure(b):h.call(this,d(arguments[1],a))};e.prototype["finally"]=e.prototype.ensure=function(c){return"function"!==typeof c?this:this.then(function(a){return p(c, this,m,a)},function(d){return p(c,this,a,d)})};e.prototype["else"]=e.prototype.orElse=function(a){return this.then(void 0,function(){return a})};e.prototype.yield=function(a){return this.then(function(){return a})};e.prototype.tap=function(a){return this.then(a).yield(this)};return e}})})(function(b){l.exports=b()})},{}],76:[function(b,l,g){(function(b){b(function(){return function(b){b.prototype.fold=function(m,e){var d=this._beget();this._handler.fold(function(d,k,c){b._handler(d).fold(function(a, c,d){d.resolve(m.call(this,c,a))},k,this,c)},e,d._handler.receiver,d._handler);return d};return b}})})(function(b){l.exports=b()})},{}],77:[function(b,l,g){(function(b){b(function(b){var m=b("../state").inspect;return function(b){b.prototype.inspect=function(){return m(b._handler(this))};return b}})})(function(g){l.exports=g(b)})},{"../state":87}],78:[function(b,l,g){(function(b){b(function(){return function(b){function m(d,b,k,c){function a(a,c){return e(k(a)).then(function(){return m(d,b,k,c)})} return e(c).then(function(c){return e(b(c)).then(function(b){return b?c:e(d(c)).spread(a)})})}var e=b.resolve;b.iterate=function(d,b,k,c){return m(function(a){return[a,d(a)]},b,k,c)};b.unfold=m;return b}})})(function(b){l.exports=b()})},{}],79:[function(b,l,g){(function(b){b(function(){return function(b){b.prototype.progress=function(b){return this.then(void 0,void 0,b)};return b}})})(function(b){l.exports=b()})},{}],80:[function(b,l,g){(function(b){b(function(b){function m(d,b,c,a){return e.setTimer(function(){d(c, a,b)},b)}var e=b("../env"),d=b("../TimeoutError");return function(b){function k(a,d,b){m(c,a,d,b)}function c(a,c){c.resolve(a)}function a(a,c,b){a="undefined"===typeof a?new d("timed out after "+b+"ms"):a;c.reject(a)}b.prototype.delay=function(a){var c=this._beget();this._handler.fold(k,a,void 0,c._handler);return c};b.prototype.timeout=function(c,d){var b=this._beget(),k=b._handler,f=m(a,c,d,b._handler);this._handler.visit(k,function(a){e.clearTimer(f);this.resolve(a)},function(a){e.clearTimer(f); this.reject(a)},k.notify);return b};return b}})})(function(g){l.exports=g(b)})},{"../TimeoutError":72,"../env":83}],81:[function(b,l,g){(function(b){b(function(b){function m(d){throw d;}function e(){}var d=b("../env").setTimer,p=b("../format");return function(b){function c(a){a.handled||(G.push(a),g("Potentially unhandled rejection ["+a.id+"] "+p.formatError(a.value)))}function a(a){var c=G.indexOf(a);0<=c&&(G.splice(c,1),n("Handled previous rejection ["+a.id+"] "+p.formatObject(a.value)))}function h(a, c){l.push(a,c);null===x&&(x=d(f,0))}function f(){for(x=null;0>>0,m=Array(p),g=0,n;gb&&h._unreport()}}}function g(a){return a instanceof e?a._handler.join():M(a)?C(a):new y(a)}function C(a){try{var c=a.then;return"function"=== typeof c?new x(c,a):new y(a)}catch(d){return new D(d)}}function u(){}function r(){}function l(a,c){e.createContext(this,c);this.consumers=void 0;this.receiver=a;this.handler=void 0;this.resolved=!1}function G(a){this.handler=a}function x(a,c){l.call(this);N.enqueue(new v(a,c,this))}function y(a){e.createContext(this);this.value=a}function D(a){e.createContext(this);this.id=++na;this.value=a;this.reported=this.handled=!1;this._report()}function A(a,c){this.rejection=a;this.context=c}function E(a){this.rejection= a}function F(a,c){this.continuation=a;this.handler=c}function q(a,c){this.handler=c;this.value=a}function v(a,c,d){this._then=a;this.thenable=c;this.resolver=d}function w(a,c,d,h,b){try{a.call(c,d,h,b)}catch(q){h(q)}}function J(a,c,d,h){this.f=a;this.z=c;this.c=d;this.to=h;this.resolver=X;this.receiver=this}function M(a){return("object"===typeof a||"function"===typeof a)&&null!==a}function H(a,c,d,h){if("function"!==typeof a)return h.become(c);e.enterContext(c);try{h.become(g(a.call(d,c.value)))}catch(b){h.become(new D(b))}e.exitContext()} function O(a,c,d){try{return a(c,d)}catch(h){return k(h)}}function K(a,c){c.prototype=R(a.prototype);c.prototype.constructor=c}function L(a,c){return c}function I(){}var N=f.scheduler,V=function(){return"undefined"!==typeof b&&null!==b&&"function"===typeof b.emit?function(a,c){return"unhandledRejection"===a?b.emit(a,c.value,c):b.emit(a,c)}:"undefined"!==typeof self&&"function"===typeof CustomEvent?function(a,c,d){var h=!1;try{h=new d("unhandledRejection")instanceof d}catch(b){}return h?function(a, h){var b=new d(a,{detail:{reason:h.value,key:h},bubbles:!1,cancelable:!0});return!c.dispatchEvent(b)}:a}(I,self,CustomEvent):I}(),R=Object.create||function(a){function c(){}c.prototype=a;return new c};e.resolve=p;e.reject=k;e.never=function(){return qa};e._defer=function(){return new e(u,new l)};e._handler=g;e.prototype.then=function(a,c,d){var h=this._handler,b=h.join().state();if("function"!==typeof a&&0b)return new this.constructor(u,h);b=this._beget();h.chain(b._handler, h.receiver,a,c,d);return b};e.prototype["catch"]=function(a){return this.then(void 0,a)};e.prototype._beget=function(){var a=this._handler,c=this.constructor,a=new l(a.receiver,a.join().context);return new c(u,a)};e.all=function(a){return c(L,null,a)};e.race=function(a){if("object"!==typeof a||null===a)return k(new TypeError("non-iterable passed to race()"));if(0===a.length)a=qa;else if(1===a.length)a=p(a[0]);else{var c=new l,d,b;for(d=0;darguments.length?h:h.then(c,d,b)}function e(a){return function(){for(var c=0,d=arguments.length,b=Array(d);cthis._buffer.length)this._buffer=new g(this._growStrategy(b)),this._offset=0;this._used+=b;var e=this._buffer.slice(this._offset,this._offset+b);this._offset+=b;return e};f.prototype.reset=function(b){var e= this._shrinkStrategy();ethis._changeFactor)this._changeFactor=0,this._buffer=e?new g(e):null;this._used=this._offset=0};l.exports=f}).call(this,b("buffer").Buffer)},{buffer:128,util:359}],96:[function(b,l,g){l.exports.BufferUtil={merge:function(b,f){for(var m=0,e=0,d=f.length;ec&&(c=4294967296+c);m.writeUInt32LE(c, e+k,!0)}switch(d%4){case 3:m[e+k+2]=b[k+2]^f[2];case 2:m[e+k+1]=b[k+1]^f[1];case 1:m[e+k]=b[k]^f[0]}},unmask:function(b,f){for(var m=f.readUInt32LE(0,!0),e=b.length,d=0;dp&&(p=4294967296+p);b.writeUInt32LE(p,d,!0)}switch(e%4){case 3:b[d+2]^=f[2];case 2:b[d+1]^=f[1];case 1:b[d]^=f[0]}}}},{}],97:[function(b,l,g){try{l.exports=b("bufferutil")}catch(n){l.exports=b("./BufferUtil.fallback")}},{"./BufferUtil.fallback":96,bufferutil:22}],98:[function(b,l,g){l.exports= {isValidErrorCode:function(b){return 1E3<=b&&1011>=b&&1004!=b&&1005!=b&&1006!=b||3E3<=b&&4999>=b},1E3:"normal",1001:"going away",1002:"protocol error",1003:"unsupported data",1004:"reserved",1005:"reserved for extensions",1006:"reserved for extensions",1007:"inconsistent or invalid data",1008:"policy violation",1009:"message too big",1010:"extension handshake missing",1011:"an unexpected condition prevented the request from being fulfilled"}},{}],99:[function(b,l,g){var n=b("util");g.parse=function(b){var m= {};(b||"").split(",").forEach(function(b){b=b.split(";");var d=b.shift().trim(),d=m[d]=m[d]||[],f={};b.forEach(function(d){var c=d.trim().split("=");d=c[0];c=c[1];"undefined"===typeof c?c=!0:('"'===c[0]&&(c=c.slice(1)),'"'===c[c.length-1]&&(c=c.slice(0,c.length-1)));(f[d]=f[d]||[]).push(c)});d.push(f)});return m};g.format=function(b){return Object.keys(b).map(function(m){var e=b[m];n.isArray(e)||(e=[e]);return e.map(function(d){return[m].concat(Object.keys(d).map(function(b){var k=d[b];n.isArray(k)|| (k=[k]);return k.map(function(c){return!0===c?b:b+"="+c}).join("; ")})).join("; ")}).join(", ")}).join(", ")}},{util:359}],100:[function(b,l,g){(function(g){function f(d,b){if(!1===this instanceof f)throw new TypeError("Classes can't be function-called");this._options=d||{};this._isServer=!!b;this.params=this._deflate=this._inflate=null}var m=b("zlib"),e=[8,9,10,11,12,13,14,15];f.extensionName="permessage-deflate";f.prototype.offer=function(){var d={};this._options.serverNoContextTakeover&&(d.server_no_context_takeover= !0);this._options.clientNoContextTakeover&&(d.client_no_context_takeover=!0);this._options.serverMaxWindowBits&&(d.server_max_window_bits=this._options.serverMaxWindowBits);this._options.clientMaxWindowBits?d.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(d.client_max_window_bits=!0);return d};f.prototype.accept=function(d){d=this.normalizeParams(d);return this.params=d=this._isServer?this.acceptAsServer(d):this.acceptAsClient(d)};f.prototype.cleanup= function(){this._inflate&&(this._inflate.writeInProgress?this._inflate.pendingClose=!0:(this._inflate.close&&this._inflate.close(),this._inflate=null));this._deflate&&(this._deflate.writeInProgress?this._deflate.pendingClose=!0:(this._deflate.close&&this._deflate.close(),this._deflate=null))};f.prototype.acceptAsServer=function(d){var b={};if(!d.some(function(d){b={};if(!(!1===this._options.serverNoContextTakeover&&d.server_no_context_takeover||!1===this._options.serverMaxWindowBits&&d.server_max_window_bits|| "number"===typeof this._options.serverMaxWindowBits&&"number"===typeof d.server_max_window_bits&&this._options.serverMaxWindowBits>d.server_max_window_bits||"number"===typeof this._options.clientMaxWindowBits&&!d.client_max_window_bits)){if(this._options.serverNoContextTakeover||d.server_no_context_takeover)b.server_no_context_takeover=!0;this._options.clientNoContextTakeover&&(b.client_no_context_takeover=!0);!1!==this._options.clientNoContextTakeover&&d.client_no_context_takeover&&(b.client_no_context_takeover= !0);"number"===typeof this._options.serverMaxWindowBits?b.server_max_window_bits=this._options.serverMaxWindowBits:"number"===typeof d.server_max_window_bits&&(b.server_max_window_bits=d.server_max_window_bits);"number"===typeof this._options.clientMaxWindowBits?b.client_max_window_bits=this._options.clientMaxWindowBits:!1!==this._options.clientMaxWindowBits&&"number"===typeof d.client_max_window_bits&&(b.client_max_window_bits=d.client_max_window_bits);return!0}},this))throw Error("Doesn't support the offered configuration"); return b};f.prototype.acceptAsClient=function(d){d=d[0];if(null!=this._options.clientNoContextTakeover&&!1===this._options.clientNoContextTakeover&&d.client_no_context_takeover)throw Error('Invalid value for "client_no_context_takeover"');if(null!=this._options.clientMaxWindowBits){if(!1===this._options.clientMaxWindowBits&&d.client_max_window_bits)throw Error('Invalid value for "client_max_window_bits"');if("number"===typeof this._options.clientMaxWindowBits&&(!d.client_max_window_bits||d.client_max_window_bits> this._options.clientMaxWindowBits))throw Error('Invalid value for "client_max_window_bits"');}return d};f.prototype.normalizeParams=function(d){return d.map(function(d){Object.keys(d).forEach(function(b){var c=d[b];if(1=e)return d.buffers.push(b),d.spanLength+=e,d.messageEnd=e,d.parse();d.buffers.push(b)}else{d.buffers.push(b);a:{for(var e=0,k=b.length;eb&& null!=this.state.activeFragmentedOperation){this.error("data frames after the initial data frame must have opcode 0",1002);return}if(8<=b&&c){this.error("control frames cannot have the Per-message Compressed bits",1002);return}this.state.compressed=c;this.state.opcode=b;!1===this.state.lastFragment?(this.state.fragmentedOperation=!0,this.state.activeFragmentedOperation=b):this.state.fragmentedOperation=!1}c=C[this.state.opcode];"undefined"==typeof c?this.error("no handler for opcode "+this.state.opcode, 1002):c.start.call(this,a)};f.prototype.endPacket=function(){this.state.fragmentedOperation?this.state.lastFragment&&this.fragmentedBufferPool.reset(!0):this.unfragmentedBufferPool.reset(!0);this.expectOffset=0;this.expectHandler=this.expectBuffer=null;this.state.lastFragment&&this.state.opcode===this.state.activeFragmentedOperation&&(this.state.activeFragmentedOperation=null);this.state.lastFragment=!1;this.state.opcode=null!=this.state.activeFragmentedOperation?this.state.activeFragmentedOperation: 0;this.state.masked=!1;this.expectHeader(2,this.processPacket)};f.prototype.reset=function(){this.dead||(this.state={activeFragmentedOperation:null,lastFragment:!1,masked:!1,opcode:0,fragmentedOperation:!1},this.fragmentedBufferPool.reset(!0),this.unfragmentedBufferPool.reset(!0),this.expectOffset=0,this.expectHandler=this.expectBuffer=null,this.overflow=[],this.currentMessage=[],this.messageHandlers=[])};f.prototype.unmask=function(a,c,b){null!=a&&null!=c&&h.unmask(c,a);return b?c:null!=c?c.toString("utf8"): ""};f.prototype.concatBuffers=function(a){for(var c=0,b=0,d=a.length;ba?C["1"].getData.call(c,a):126==a?c.expectHeader(2,function(a){C["1"].getData.call(c,m.call(a,0))}):127==a&&c.expectHeader(8,function(a){0!=e.call(a,0)?c.error("packets with length spanning more than 32 bit is currently not supported",1008):C["1"].getData.call(c,e.call(a,4))})},getData:function(a){var c=this;c.state.masked?c.expectHeader(4,function(b){c.expectData(a,function(a){C["1"].finish.call(c, b,a)})}):c.expectData(a,function(a){C["1"].finish.call(c,null,a)})},finish:function(a,c){var b=this,d=this.unmask(a,c,!0)||new g(0),h=p(this.state);this.messageHandlers.push(function(a){b.applyExtensions(d,h.lastFragment,h.compressed,function(c,d){if(c)return b.error(c.message,1007);null!=d&&b.currentMessage.push(d);if(h.lastFragment){var e=b.concatBuffers(b.currentMessage);b.currentMessage=[];if(!k.isValidUTF8(e)){b.error("invalid utf8 sequence",1007);return}b.ontext(e.toString("utf8"),{masked:h.masked, buffer:e})}a()})});this.flush();this.endPacket()}},2:{start:function(a){var c=this;a=a[1]&127;126>a?C["2"].getData.call(c,a):126==a?c.expectHeader(2,function(a){C["2"].getData.call(c,m.call(a,0))}):127==a&&c.expectHeader(8,function(a){0!=e.call(a,0)?c.error("packets with length spanning more than 32 bit is currently not supported",1008):C["2"].getData.call(c,e.call(a,4,!0))})},getData:function(a){var c=this;c.state.masked?c.expectHeader(4,function(b){c.expectData(a,function(a){C["2"].finish.call(c, b,a)})}):c.expectData(a,function(a){C["2"].finish.call(c,null,a)})},finish:function(a,c){var b=this,d=this.unmask(a,c,!0)||new g(0),h=p(this.state);this.messageHandlers.push(function(a){b.applyExtensions(d,h.lastFragment,h.compressed,function(c,d){if(c)return b.error(c.message,1007);null!=d&&b.currentMessage.push(d);if(h.lastFragment){var k=b.concatBuffers(b.currentMessage);b.currentMessage=[];b.onbinary(k,{masked:h.masked,buffer:k})}a()})});this.flush();this.endPacket()}},8:{start:function(a){0== this.state.lastFragment?this.error("fragmented close is not supported",1002):(a=a[1]&127,126>a?C["8"].getData.call(this,a):this.error("control frames cannot have more than 125 bytes of data",1002))},getData:function(a){var c=this;c.state.masked?c.expectHeader(4,function(b){c.expectData(a,function(a){C["8"].finish.call(c,b,a)})}):c.expectData(a,function(a){C["8"].finish.call(c,null,a)})},finish:function(a,b){var d=this;b=d.unmask(a,b,!0);var h=p(this.state);this.messageHandlers.push(function(){if(b&& 1==b.length)d.error("close packets with data must be at least two bytes long",1002);else{var a=b&&1a?C["9"].getData.call(this, a):this.error("control frames cannot have more than 125 bytes of data",1002))},getData:function(a){var c=this;c.state.masked?c.expectHeader(4,function(b){c.expectData(a,function(a){C["9"].finish.call(c,b,a)})}):c.expectData(a,function(a){C["9"].finish.call(c,null,a)})},finish:function(a,c){var b=this;c=this.unmask(a,c,!0);var d=p(this.state);this.messageHandlers.push(function(a){b.onping(c,{masked:d.masked,binary:!0});a()});this.flush();this.endPacket()}},10:{start:function(a){0==this.state.lastFragment? this.error("fragmented pong is not supported",1002):(a=a[1]&127,126>a?C["10"].getData.call(this,a):this.error("control frames cannot have more than 125 bytes of data",1002))},getData:function(a){var c=this;this.state.masked?this.expectHeader(4,function(b){c.expectData(a,function(a){C["10"].finish.call(c,b,a)})}):this.expectData(a,function(a){C["10"].finish.call(c,null,a)})},finish:function(a,c){var b=this;c=b.unmask(a,c,!0);var d=p(this.state);this.messageHandlers.push(function(a){b.onpong(c,{masked:d.masked, binary:!0});a()});this.flush();this.endPacket()}}}}).call(this,b("buffer").Buffer)},{"./BufferPool":95,"./BufferUtil":97,"./ErrorCodes":98,"./PerMessageDeflate":100,"./Validation":106,buffer:128,util:359}],103:[function(b,l,g){(function(g){function f(b){if(!1===this instanceof f)throw new TypeError("Classes can't be function-called");m.EventEmitter.call(this);this.socket=b;this.isClosed=this.continuationFrame=!1}var m=b("events"),e=b("util");l.exports=f;e.inherits(f,m.EventEmitter);f.prototype.send= function(b,e,k){if(!this.isClosed){var c="string"==typeof b,a=c?g.byteLength(b):b.length,h=127>8;this[c+1]=a&255}function e(a,c){this[c]=(a&4278190080)>>24;this[c+1]=(a&16711680)>>16;this[c+2]=(a&65280)>>8;this[c+3]=a&255}function d(a){var c=new Uint8Array(a.buffer|| a),b=a.byteLength||a.length;a=a.byteOffset||0;for(var d=new g(b),h=0;hl||k&&!x,E=new g(x?l+D:D);E[0]=h?c|128:c;f&&(E[0]|=64);switch(A){case 126:m.call(E,l,2);break;case 127:e.call(E,0,2),e.call(E,l,6)}if(k)if(E[1]=A|128,c=this._randomMask||(this._randomMask=new g([~~(255*Math.random()),~~(255*Math.random()),~~(255*Math.random()),~~(255*Math.random())])),E[D-4]=c[0],E[D-3]=c[1],E[D-2]=c[2],E[D-1]=c[3],x){a.mask(b,c,E,D,l);try{this._socket.write(E,"binary",p)}catch(F){"function"== typeof p?p(F):this.emit("error",F)}}else{a.mask(b,c,b,0,l);try{this._socket.write(E,"binary"),this._socket.write(b,"binary",p)}catch(F){"function"==typeof p?p(F):this.emit("error",F)}}else if(E[1]=A,x){b.copy(E,D);try{this._socket.write(E,"binary",p)}catch(F){"function"==typeof p?p(F):this.emit("error",F)}}else try{this._socket.write(E,"binary"),this._socket.write(b,"binary",p)}catch(F){"function"==typeof p?p(F):this.emit("error",F)}}else try{this._socket.write(new g([c|(h?128:0),0|(k?128:0)].concat(k? [0,0,0,0]:[])),"binary",p)}catch(F){"function"==typeof p?p(F):this.emit("error",F)}};f.prototype.flush=function(){if(!this.processing){var a=this.messageHandlers.shift();if(a){this.processing=!0;var c=this;a(function(){c.processing=!1;c.flush()})}}};f.prototype.applyExtensions=function(a,c,b,k){b&&a?((a.buffer||a)instanceof ArrayBuffer&&(a=d(a)),this.extensions[h.extensionName].compress(a,c,k)):k(null,a)};l.exports=f}).call(this,b("buffer").Buffer)},{"./BufferUtil":97,"./ErrorCodes":98,"./PerMessageDeflate":100, buffer:128,events:324,util:359}],105:[function(b,l,g){l.exports.Validation={isValidUTF8:function(b){return!0}}},{}],106:[function(b,l,g){try{l.exports=b("utf-8-validate")}catch(n){l.exports=b("./Validation.fallback")}},{"./Validation.fallback":105,"utf-8-validate":67}],107:[function(b,l,g){(function(g,f){function m(b,d,h){if(!1===this instanceof m)return new m(b,d,h);H.call(this);d&&!Array.isArray(d)&&"object"===typeof d&&(h=d,d=null);"string"===typeof d&&(d=[d]);Array.isArray(d)||(d=[]);this._ultron= this._socket=null;this._closeReceived=!1;this.bytesReceived=0;this.readyState=null;this.supports={};this.extensions={};Array.isArray(b)?c.apply(this,b.concat(h)):a.apply(this,[b,d,h])}function e(a,c,b){this.type="message";this.data=a;this.target=b;this.binary=c}function d(a,c,b){this.type="close";this.wasClean="undefined"===typeof a||1E3===a;this.code=a;this.reason=c;this.target=b}function p(a){this.type="open";this.target=a}function k(a,c,b){var d=c;c&&(a&&443!=b||!a&&80!=b)&&(d=d+":"+b);return d} function c(a,c,b,d){d=(new E({protocolVersion:13,protocol:null,extensions:{}})).merge(d);this.protocol=d.value.protocol;this.protocolVersion=d.value.protocolVersion;this.extensions=d.value.extensions;this.supports.binary="hixie-76"!==this.protocolVersion;this.upgradeReq=a;this.readyState=m.CONNECTING;this._isServer=!0;"hixie-76"===d.value.protocolVersion?h.call(this,w,v,c,b):h.call(this,q,F,c,b)}function a(a,c,b){b=(new E({origin:null,protocolVersion:13,host:null,headers:null,protocol:c.join(","), agent:null,pfx:null,key:null,passphrase:null,cert:null,ca:null,ciphers:null,rejectUnauthorized:null,perMessageDeflate:!0,localAddress:null})).merge(b);if(8!==b.value.protocolVersion&&13!==b.value.protocolVersion)throw Error("unsupported protocol version");c=r.parse(a);var d="ws+unix:"===c.protocol;if(!c.host&&!d)throw Error("invalid url");var e="wss:"===c.protocol||"https:"===c.protocol,p=e?x:G,g=c.port||(e?443:80),n=c.auth,v={},z;b.value.perMessageDeflate&&(z=new M(b.value.perMessageDeflate,!1), v[M.extensionName]=z.offer());this._isServer=!1;this.url=a;this.protocolVersion=b.value.protocolVersion;this.supports.binary="hixie-76"!==this.protocolVersion;a=(new f(b.value.protocolVersion+"-"+Date.now())).toString("base64");var C=y.createHash("sha1");C.update(a+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");var l=C.digest("base64"),w=b.value.agent,e=k(e,c.hostname,g),g={port:g,host:c.hostname,headers:{Connection:"Upgrade",Upgrade:"websocket",Host:e,"Sec-WebSocket-Version":b.value.protocolVersion,"Sec-WebSocket-Key":a}}; n&&(g.headers.Authorization="Basic "+(new f(n)).toString("base64"));b.value.protocol&&(g.headers["Sec-WebSocket-Protocol"]=b.value.protocol);b.value.host&&(g.headers.Host=b.value.host);if(b.value.headers)for(var B in b.value.headers)b.value.headers.hasOwnProperty(B)&&(g.headers[B]=b.value.headers[B]);Object.keys(v).length&&(g.headers["Sec-WebSocket-Extensions"]=J.format(v));if(b.isDefinedAndNonNull("pfx")||b.isDefinedAndNonNull("key")||b.isDefinedAndNonNull("passphrase")||b.isDefinedAndNonNull("cert")|| b.isDefinedAndNonNull("ca")||b.isDefinedAndNonNull("ciphers")||b.isDefinedAndNonNull("rejectUnauthorized"))b.isDefinedAndNonNull("pfx")&&(g.pfx=b.value.pfx),b.isDefinedAndNonNull("key")&&(g.key=b.value.key),b.isDefinedAndNonNull("passphrase")&&(g.passphrase=b.value.passphrase),b.isDefinedAndNonNull("cert")&&(g.cert=b.value.cert),b.isDefinedAndNonNull("ca")&&(g.ca=b.value.ca),b.isDefinedAndNonNull("ciphers")&&(g.ciphers=b.value.ciphers),b.isDefinedAndNonNull("rejectUnauthorized")&&(g.rejectUnauthorized= b.value.rejectUnauthorized),w||(w=new p.Agent(g));g.path=c.path||"/";w&&(g.agent=w);d&&(g.socketPath=c.pathname);b.value.localAddress&&(g.localAddress=b.value.localAddress);b.value.origin&&(13>b.value.protocolVersion?g.headers["Sec-WebSocket-Origin"]=b.value.origin:g.headers.Origin=b.value.origin);var H=this,D=p.request(g);D.on("error",function(a){H.emit("error",a);u.call(H,a)});D.once("response",function(a){var c;H.emit("unexpected-response",D,a)||(c=Error("unexpected server response ("+a.statusCode+ ")"),D.abort(),H.emit("error",c));u.call(H,c)});D.once("upgrade",function(a,c,d){if(H.readyState===m.CLOSED)H.emit("close"),H.removeAllListeners(),c.end();else{var k=a.headers["sec-websocket-accept"];if("undefined"===typeof k||k!==l)H.emit("error","invalid server key"),H.removeAllListeners(),c.end();else{var k=a.headers["sec-websocket-protocol"],e=(b.value.protocol||"").split(/, */),f=null;!b.value.protocol&&k?f="server sent a subprotocol even though none requested":b.value.protocol&&!k?f="server sent no subprotocol even though requested": k&&-1===e.indexOf(k)&&(f="server responded with an invalid protocol");if(f)H.emit("error",f),H.removeAllListeners(),c.end();else{k&&(H.protocol=k);a=J.parse(a.headers["sec-websocket-extensions"]);if(z&&a[M.extensionName]){try{z.accept(a[M.extensionName])}catch(p){H.emit("error","invalid extension parameter");H.removeAllListeners();c.end();return}H.extensions[M.extensionName]=z}h.call(H,q,F,c,d);D.removeAllListeners();w=D=null}}}});D.end();this.readyState=m.CONNECTING}function h(a,c,b,d){function h(a){e|| f.readyState===m.CLOSED||(e=!0,b.removeListener("data",h),k.on("data",q),d&&0g?c.headers["sec-websocket-origin"]:c.headers.origin,n=u.parse(c.headers["sec-websocket-extensions"]),z=this,J=function(a){var q=c.headers["sec-websocket-key"],m=h.createHash("sha1");m.update(q+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");q=m.digest("base64");q=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade","Sec-WebSocket-Accept: "+ q];"undefined"!=typeof a&&q.push("Sec-WebSocket-Protocol: "+a);var J={};try{J=d.call(z,n)}catch(l){p(b,400,"Bad Request");return}if(Object.keys(J).length){var I={};Object.keys(J).forEach(function(a){I[a]=[J[a].params]});q.push("Sec-WebSocket-Extensions: "+u.format(I))}z.emit("headers",q);b.setTimeout(0);b.setNoDelay(!0);try{b.write(q.concat("","").join("\r\n"))}catch(l){try{b.destroy()}catch(r){}return}var N=new C([c,b,k],{protocolVersion:g,protocol:a,extensions:J});z.options.clientTracking&&(z.clients.push(N), N.on("close",function(){var a=z.clients.indexOf(N);-1!=a&&z.clients.splice(a,1)}));b.removeListener("error",f);e(N)},l=function(){if("function"==typeof z.options.handleProtocols){var a=(m||"").split(/, */),c=!1;z.options.handleProtocols(a,function(a,d){c=!0;a?J(d):p(b,401,"Unauthorized")});c||p(b,501,"Could not process protocols")}else"undefined"!==typeof m?J(m.split(/, */)[0]):J()};if("function"==typeof this.options.verifyClient){q={origin:q,secure:"undefined"!==typeof c.connection.authorized||"undefined"!== typeof c.connection.encrypted,req:c};if(2==this.options.verifyClient.length){this.options.verifyClient(q,function(c,d,h){"undefined"===typeof d&&(d=401);"undefined"===typeof h&&(h=a.STATUS_CODES[d]);c?l():p(b,d,h)});return}if(!this.options.verifyClient(q)){p(b,401,"Unauthorized");return}}l()}}else p(b,400,"Bad Request")}function e(c,b,d,k){var e=function(){try{b.destroy()}catch(a){}};b.on("error",e);if(this.options.disableHixie)p(b,401,"Hixie support disabled");else if(c.headers["sec-websocket-key2"]){var f= c.headers.origin,m=this,q=function(){var a=("https"===c.headers["x-forwarded-proto"]||b.encrypted?"wss":"ws")+"://"+(c.headers["x-forwarded-host"]?c.headers["x-forwarded-host"]:c.headers.host)+c.url,q=c.headers["sec-websocket-protocol"],v=function(d,v){var z=c.headers["sec-websocket-key1"],l=c.headers["sec-websocket-key2"],u=h.createHash("md5");[z,l].forEach(function(a){var c=parseInt(a.replace(/[^\d]/g,""));a=a.replace(/[^ ]/g,"").length;0===a||0!==c%a?p(b,400,"Bad Request"):(c/=a,u.update(String.fromCharCode(c>> 24&255,c>>16&255,c>>8&255,c&255)))});u.update(d.toString("binary"));z=["HTTP/1.1 101 Switching Protocols","Upgrade: WebSocket","Connection: Upgrade","Sec-WebSocket-Location: "+a];"undefined"!=typeof q&&z.push("Sec-WebSocket-Protocol: "+q);"undefined"!=typeof f&&z.push("Sec-WebSocket-Origin: "+f);b.setTimeout(0);b.setNoDelay(!0);try{var r=new g(z.concat("","").join("\r\n")),y=new g(u.digest("binary"),"binary"),K=new g(r.length+y.length);r.copy(K,0);y.copy(K,r.length);b.write(K,"binary",function(a){if(!a){var d= new C([c,b,v],{protocolVersion:"hixie-76",protocol:q});m.options.clientTracking&&(m.clients.push(d),d.on("close",function(){var a=m.clients.indexOf(d);-1!=a&&m.clients.splice(a,1)}));b.removeListener("error",e);k(d)}})}catch(B){try{b.destroy()}catch(M){}}};if(d&&8<=d.length){var z=d.slice(0,8),l=8= 1.2.1","crypto-js":">= 3.1.5","utf-8-validate":">= 1.2.1",when:">= 3.7.3",ws:">= 0.8.0","msgpack-lite":">= 0.1.17"},devDependencies:{browserify:">= 11.0.1",nodeunit:">= 0.9.1"},repository:{type:"git",url:"git://github.com/crossbario/autobahn-js.git"}, keywords:["WAMP","WebSocket","RPC","PubSub"],author:"Tavendo GmbH",license:"MIT"}},{}],112:[function(b,l,g){},{}],113:[function(b,l,g){function n(a,c){return h.isUndefined(c)?""+c:h.isNumber(c)&&!isFinite(c)||h.isFunction(c)||h.isRegExp(c)?c.toString():c}function f(a,c){return h.isString(a)?a.length>>16&65535|0;for(var p=0;0!==g;){p=2E3e;e++){b=e;for(var d=0;8>d;d++)b=b&1?3988292384^b>>>1:b>>>1;g[e]=b}return g}();l.exports=function(b,g,e,d){e=d+e;for(b^=-1;d>>8^n[(b^ g[d])&255];return b^-1}},{}],119:[function(b,l,g){function n(a,c){a.msg=E[c];return c}function f(a){for(var c=a.length;0<=--c;)a[c]=0}function m(a){var c=a.state,b=c.pending;b>a.avail_out&&(b=a.avail_out);0!==b&&(x.arraySet(a.output,c.pending_buf,c.pending_out,b,a.next_out),a.next_out+=b,c.pending_out+=b,a.total_out+=b,a.avail_out-=b,c.pending-=b,0===c.pending&&(c.pending_out=0))}function e(a,c){y._tr_flush_block(a,0<=a.block_start?a.block_start:-1,a.strstart-a.block_start,c);a.block_start=a.strstart; m(a.strm)}function d(a,c){a.pending_buf[a.pending++]=c}function p(a,c){a.pending_buf[a.pending++]=c>>>8&255;a.pending_buf[a.pending++]=c&255}function k(a,c){var b=a.max_chain_length,d=a.strstart,h,k=a.prev_length,e=a.nice_match,f=a.strstart>a.w_size-262?a.strstart-(a.w_size-262):0,g=a.window,p=a.w_mask,m=a.prev,n=a.strstart+258,z=g[d+k-1],x=g[d+k];a.prev_length>=a.good_match&&(b>>=2);e>a.lookahead&&(e=a.lookahead);do if(h=c,g[h+k]===x&&g[h+k-1]===z&&g[h]===g[d]&&g[++h]===g[d+1]){d+=2;for(h++;g[++d]=== g[++h]&&g[++d]===g[++h]&&g[++d]===g[++h]&&g[++d]===g[++h]&&g[++d]===g[++h]&&g[++d]===g[++h]&&g[++d]===g[++h]&&g[++d]===g[++h]&&dk){a.match_start=c;k=h;if(h>=e)break;z=g[d+k-1];x=g[d+k]}}while((c=m[c&p])>f&&0!==--b);return k<=a.lookahead?k:a.lookahead}function c(a){var c=a.w_size,b,d,h,k;do{k=a.window_size-a.lookahead-a.strstart;if(a.strstart>=c+(c-262)){x.arraySet(a.window,a.window,c,c,0);a.match_start-=c;a.strstart-=c;a.block_start-=c;b=d=a.hash_size;do h=a.head[--b], a.head[b]=h>=c?h-c:0;while(--d);b=d=c;do h=a.prev[--b],a.prev[b]=h>=c?h-c:0;while(--d);k+=c}if(0===a.strm.avail_in)break;b=a.strm;d=a.window;h=a.strstart+a.lookahead;var e=b.avail_in;e>k&&(e=k);0===e?d=0:(b.avail_in-=e,x.arraySet(d,b.input,b.next_in,e,h),1===b.state.wrap?b.adler=D(b.adler,d,e,h):2===b.state.wrap&&(b.adler=A(b.adler,d,e,h)),b.next_in+=e,b.total_in+=e,d=e);a.lookahead+=d;if(3<=a.lookahead+a.insert)for(k=a.strstart-a.insert,a.ins_h=a.window[k],a.ins_h=(a.ins_h<a.lookahead+a.insert););}while(262>a.lookahead&&0!==a.strm.avail_in)}function a(a,b){for(var d;;){if(262>a.lookahead){c(a);if(262>a.lookahead&&0===b)return 1;if(0===a.lookahead)break}d=0;3<=a.lookahead&&(a.ins_h=(a.ins_h<a.strstart?a.strstart:2;return 4===b?(e(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(e(a,!1),0===a.strm.avail_out)?1:2}function h(a,b){for(var d,h;;){if(262>a.lookahead){c(a);if(262>a.lookahead&&0===b)return 1;if(0===a.lookahead)break}d=0;3<=a.lookahead&&(a.ins_h=(a.ins_h<=a.match_length&&(1===a.strategy||3===a.match_length&&4096a.strstart?a.strstart:2;return 4===b?(e(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(e(a,!1),0===a.strm.avail_out)?1:2}function z(a,b){for(var d,h,k,f=a.window;;){if(258>=a.lookahead){c(a);if(258>=a.lookahead&&0===b)return 1;if(0===a.lookahead)break}a.match_length=0;if(3<=a.lookahead&&0a.lookahead&&(a.match_length=a.lookahead)}3<=a.match_length?(d=y._tr_tally(a,1,a.match_length-3),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(d=y._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++);if(d&&(e(a,!1),0===a.strm.avail_out))return 1}a.insert=0;return 4===b?(e(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(e(a,!1),0===a.strm.avail_out)? 1:2}function C(a,b){for(var d;;){if(0===a.lookahead&&(c(a),0===a.lookahead)){if(0===b)return 1;break}a.match_length=0;d=y._tr_tally(a,0,a.window[a.strstart]);a.lookahead--;a.strstart++;if(d&&(e(a,!1),0===a.strm.avail_out))return 1}a.insert=0;return 4===b?(e(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(e(a,!1),0===a.strm.avail_out)?1:2}function u(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method= 8;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new x.Buf16(1146);this.dyn_dtree=new x.Buf16(122);this.bl_tree= new x.Buf16(78);f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new x.Buf16(16);this.heap=new x.Buf16(573);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new x.Buf16(573);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function r(a){var c;if(!a||!a.state)return n(a,-2);a.total_in=a.total_out=0;a.data_type=2;c=a.state;c.pending=0;c.pending_out= 0;0>c.wrap&&(c.wrap=-c.wrap);c.status=c.wrap?42:113;a.adler=2===c.wrap?0:1;c.last_flush=0;y._tr_init(c);return 0}function B(a){var c=r(a);0===c&&(a=a.state,a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=F[a.level].max_lazy,a.good_match=F[a.level].good_length,a.nice_match=F[a.level].nice_length,a.max_chain_length=F[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0);return c}function G(a,c,b,d,h,k){if(!a)return-2; var e=1;-1===c&&(c=6);0>d?(e=0,d=-d):15h||9d||15c||9k||4>1;f.l_buf=3*f.lit_bufsize;f.level=c;f.strategy=k;f.method=b;return B(a)}var x=b("../utils/common"),y=b("./trees"),D=b("./adler32"),A=b("./crc32"),E=b("./messages");b=function(a,c,b,d,h){this.good_length=a;this.max_lazy=c;this.nice_length=b;this.max_chain=d;this.func=h};var F;F=[new b(0,0,0,0,function(a,b){var d=65535;for(d>a.pending_buf_size-5&&(d=a.pending_buf_size-5);;){if(1>=a.lookahead){c(a);if(0===a.lookahead&&0===b)return 1;if(0===a.lookahead)break}a.strstart+= a.lookahead;a.lookahead=0;var h=a.block_start+d;if(0===a.strstart||a.strstart>=h)if(a.lookahead=a.strstart-h,a.strstart=h,e(a,!1),0===a.strm.avail_out)return 1;if(a.strstart-a.block_start>=a.w_size-262&&(e(a,!1),0===a.strm.avail_out))return 1}a.insert=0;if(4===b)return e(a,!0),0===a.strm.avail_out?3:4;a.strstart>a.block_start&&e(a,!1);return 1}),new b(4,4,8,4,a),new b(4,5,16,8,a),new b(4,6,32,32,a),new b(4,4,16,16,h),new b(8,16,32,32,h),new b(8,16,128,128,h),new b(8,32,128,256,h),new b(32,128,258, 1024,h),new b(32,258,258,4096,h)];g.deflateInit=function(a,c){return G(a,c,8,15,8,0)};g.deflateInit2=G;g.deflateReset=B;g.deflateResetKeep=r;g.deflateSetHeader=function(a,c){if(!a||!a.state||2!==a.state.wrap)return-2;a.state.gzhead=c;return 0};g.deflate=function(a,c){var b,h,k,e;if(!a||!a.state||5c)return a?n(a,-2):-2;h=a.state;if(!a.output||!a.input&&0!==a.avail_in||666===h.status&&4!==c)return n(a,0===a.avail_out?-5:-2);h.strm=a;b=h.last_flush;h.last_flush=c;42===h.status&&(2===h.wrap?(a.adler= 0,d(h,31),d(h,139),d(h,8),h.gzhead?(d(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),d(h,h.gzhead.time&255),d(h,h.gzhead.time>>8&255),d(h,h.gzhead.time>>16&255),d(h,h.gzhead.time>>24&255),d(h,9===h.level?2:2<=h.strategy||2>h.level?4:0),d(h,h.gzhead.os&255),h.gzhead.extra&&h.gzhead.extra.length&&(d(h,h.gzhead.extra.length&255),d(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=A(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status= 69):(d(h,0),d(h,0),d(h,0),d(h,0),d(h,0),d(h,9===h.level?2:2<=h.strategy||2>h.level?4:0),d(h,3),h.status=113)):(k=8+(h.w_bits-8<<4)<<8,e=-1,e=2<=h.strategy||2>h.level?0:6>h.level?1:6===h.level?2:3,k|=e<<6,0!==h.strstart&&(k|=32),h.status=113,p(h,k+(31-k%31)),0!==h.strstart&&(p(h,a.adler>>>16),p(h,a.adler&65535)),a.adler=1));if(69===h.status)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(h.gzhead.extra.length&65535)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=A(a.adler,h.pending_buf, h.pending-k,k)),m(a),k=h.pending,h.pending!==h.pending_buf_size));)d(h,h.gzhead.extra[h.gzindex]&255),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=A(a.adler,h.pending_buf,h.pending-k,k));h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=73)}else h.status=73;if(73===h.status)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=A(a.adler,h.pending_buf,h.pending-k,k)),m(a),k=h.pending,h.pending===h.pending_buf_size)){e=1;break}e=h.gzindex< h.gzhead.name.length?h.gzhead.name.charCodeAt(h.gzindex++)&255:0;d(h,e)}while(0!==e);h.gzhead.hcrc&&h.pending>k&&(a.adler=A(a.adler,h.pending_buf,h.pending-k,k));0===e&&(h.gzindex=0,h.status=91)}else h.status=91;if(91===h.status)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=A(a.adler,h.pending_buf,h.pending-k,k)),m(a),k=h.pending,h.pending===h.pending_buf_size)){e=1;break}e=h.gzindexk&&(a.adler=A(a.adler,h.pending_buf,h.pending-k,k));0===e&&(h.status=103)}else h.status=103;103===h.status&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&m(a),h.pending+2<=h.pending_buf_size&&(d(h,a.adler&255),d(h,a.adler>>8&255),a.adler=0,h.status=113)):h.status=113);if(0!==h.pending){if(m(a),0===a.avail_out)return h.last_flush=-1,0}else if(0===a.avail_in&&(c<<1)-(4=h.wrap)return 1;2===h.wrap?(d(h,a.adler&255),d(h,a.adler>>8&255), d(h,a.adler>>16&255),d(h,a.adler>>24&255),d(h,a.total_in&255),d(h,a.total_in>>8&255),d(h,a.total_in>>16&255),d(h,a.total_in>>24&255)):(p(h,a.adler>>>16),p(h,a.adler&65535));m(a);0B&&(r+=w[e++]<>>24;r>>>=E;B-=E;E=A>>>16&255;if(0=== E)J[p++]=A&65535;else if(E&16){F=A&65535;if(E&=15)B>>=E,B-=E;15>B&&(r+=w[e++]<>>24;r>>>=E;B-=E;E=A>>>16&255;if(E&16){A&=65535;E&=15;Ba){b.msg="invalid distance too far back";g.mode=30;break a}r>>>=E;B-=E;E=p-k;if(A>E){E=A-E;if(E>z&&g.sane){b.msg="invalid distance too far back";g.mode=30;break a}q=0;v=u;if(0===l){if(q+=h-E,E>3;e-=F;B-=F<<3;b.next_in=e;b.next_out=p;b.avail_in=e>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict= !1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new k.Buf16(320);this.work=new k.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function m(a){var c;if(!a||!a.state)return-2;c=a.state;a.total_in=a.total_out=c.total= 0;a.msg="";c.wrap&&(a.adler=c.wrap&1);c.mode=1;c.last=0;c.havedict=0;c.dmax=32768;c.head=null;c.hold=0;c.bits=0;c.lencode=c.lendyn=new k.Buf32(852);c.distcode=c.distdyn=new k.Buf32(592);c.sane=1;c.back=-1;return 0}function e(a){var c;if(!a||!a.state)return-2;c=a.state;c.wsize=0;c.whave=0;c.wnext=0;return m(a)}function d(a,c){var b,d;if(!a||!a.state)return-2;d=a.state;0>c?(b=0,c=-c):(b=(c>>4)+1,48>c&&(c&=15));if(c&&(8>c||15w;){if(0===l)break a;l--;v+=f[p++]<>>8&255;e.check=a(e.check,R,2,0);w=v=0;e.mode=2;break}e.flags=0;e.head&&(e.head.done=!1);if(!(e.wrap&1)||(((v&255)<<8)+(v>>8))%31){b.msg="incorrect header check";e.mode= 30;break}if(8!==(v&15)){b.msg="unknown compression method";e.mode=30;break}v>>>=4;w-=4;O=(v&15)+8;if(0===e.wbits)e.wbits=O;else if(O>e.wbits){b.msg="invalid window size";e.mode=30;break}e.dmax=1<w;){if(0===l)break a;l--;v+=f[p++]<>8&1);e.flags&512&&(R[0]= v&255,R[1]=v>>>8&255,e.check=a(e.check,R,2,0));w=v=0;e.mode=3;case 3:for(;32>w;){if(0===l)break a;l--;v+=f[p++]<>>8&255,R[2]=v>>>16&255,R[3]=v>>>24&255,e.check=a(e.check,R,4,0));w=v=0;e.mode=4;case 4:for(;16>w;){if(0===l)break a;l--;v+=f[p++]<>8);e.flags&512&&(R[0]=v&255,R[1]=v>>>8&255,e.check=a(e.check,R,2,0));w=v=0;e.mode=5;case 5:if(e.flags&1024){for(;16>w;){if(0===l)break a;l--;v+= f[p++]<>>8&255,e.check=a(e.check,R,2,0));w=v=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(e.flags&1024&&(H=e.length,H>l&&(H=l),H&&(e.head&&(O=e.head.extra_len-e.length,e.head.extra||(e.head.extra=Array(e.head.extra_len)),k.arraySet(e.head.extra,f,p,H,O)),e.flags&512&&(e.check=a(e.check,f,H,p)),l-=H,p+=H,e.length-=H),e.length))break a;e.length=0;e.mode=7;case 7:if(e.flags&2048){if(0===l)break a;H=0;do O=f[p+H++], e.head&&O&&65536>e.length&&(e.head.name+=String.fromCharCode(O));while(O&&He.length&&(e.head.comment+=String.fromCharCode(O));while(O&&Hw;){if(0===l)break a;l--;v+= f[p++]<>9&1,e.head.done=!0);b.adler=e.check=0;e.mode=12;break;case 10:for(;32>w;){if(0===l)break a;l--;v+=f[p++]<>>=w&7;w-=w&7;e.mode=27;break}for(;3>w;){if(0=== l)break a;l--;v+=f[p++]<>>=1;--w;switch(v&3){case 0:e.mode=14;break;case 1:H=e;if(C){O=void 0;u=new k.Buf32(512);r=new k.Buf32(32);for(O=0;144>O;)H.lens[O++]=8;for(;256>O;)H.lens[O++]=9;for(;280>O;)H.lens[O++]=7;for(;288>O;)H.lens[O++]=8;z(1,H.lens,0,288,u,0,H.work,{bits:9});for(O=0;32>O;)H.lens[O++]=5;z(2,H.lens,0,32,r,0,H.work,{bits:5});C=!1}H.lencode=u;H.lenbits=9;H.distcode=r;H.distbits=5;e.mode=20;if(6===d){v>>>=2;w-=2;break a}break;case 2:e.mode=17;break;case 3:b.msg="invalid block type", e.mode=30}v>>>=2;w-=2;break;case 14:v>>>=w&7;for(w-=w&7;32>w;){if(0===l)break a;l--;v+=f[p++]<>>16^65535)){b.msg="invalid stored block lengths";e.mode=30;break}e.length=v&65535;w=v=0;e.mode=15;if(6===d)break a;case 15:e.mode=16;case 16:if(H=e.length){H>l&&(H=l);H>q&&(H=q);if(0===H)break a;k.arraySet(g,f,p,H,m);l-=H;p+=H;q-=H;m+=H;e.length-=H;break}e.mode=12;break;case 17:for(;14>w;){if(0===l)break a;l--;v+=f[p++]<>>=5;w-=5;e.ndist=(v&31)+1;v>>>= 5;w-=5;e.ncode=(v&15)+4;v>>>=4;w-=4;if(286w;){if(0===l)break a;l--;v+=f[p++]<>>=3;w-=3}for(;19>e.have;)e.lens[X[e.have++]]=0;e.lencode=e.lendyn;e.lenbits=7;H={bits:e.lenbits};V=z(0,e.lens,0,19,e.lencode,0,e.work,H);e.lenbits=H.bits;if(V){b.msg="invalid code lengths set";e.mode=30;break}e.have=0;e.mode=19;case 19:for(;e.have>>24;L&=65535;if(H<=w)break;if(0===l)break a;l--;v+=f[p++]<L)v>>>=H,w-=H,e.lens[e.have++]=L;else{if(16===L){for(O=H+2;w>>=H;w-=H;if(0===e.have){b.msg="invalid bit length repeat";e.mode=30;break}O=e.lens[e.have-1];H=3+(v&3);v>>>=2;w-=2}else if(17===L){for(O=H+3;w>>=H;w-=H;O=0;H=3+(v&7);v>>>=3;w-=3}else{for(O=H+7;w>>=H;w-=H;O=0;H=11+(v&127);v>>>=7;w-=7}if(e.have+H>e.nlen+e.ndist){b.msg="invalid bit length repeat";e.mode=30;break}for(;H--;)e.lens[e.have++]=O}}if(30===e.mode)break;if(0===e.lens[256]){b.msg="invalid code -- missing end-of-block";e.mode=30;break}e.lenbits=9;H={bits:e.lenbits};V=z(1,e.lens,0,e.nlen,e.lencode,0,e.work,H);e.lenbits=H.bits;if(V){b.msg="invalid literal/lengths set";e.mode=30;break}e.distbits=6;e.distcode=e.distdyn;H={bits:e.distbits};V=z(2,e.lens,e.nlen,e.ndist,e.distcode, 0,e.work,H);e.distbits=H.bits;if(V){b.msg="invalid distances set";e.mode=30;break}e.mode=20;if(6===d)break a;case 20:e.mode=21;case 21:if(6<=l&&258<=q){b.next_out=m;b.avail_out=q;b.next_in=p;b.avail_in=l;e.hold=v;e.bits=w;h(b,M);m=b.next_out;g=b.output;q=b.avail_out;p=b.next_in;f=b.input;l=b.avail_in;v=e.hold;w=e.bits;12===e.mode&&(e.back=-1);break}for(e.back=0;;){L=e.lencode[v&(1<>>24;O=L>>>16&255;L&=65535;if(H<=w)break;if(0===l)break a;l--;v+=f[p++]<>K)];H=L>>>24;O=L>>>16&255;L&=65535;if(K+H<=w)break;if(0===l)break a;l--;v+=f[p++]<>>=K;w-=K;e.back+=K}v>>>=H;w-=H;e.back+=H;e.length=L;if(0===O){e.mode=26;break}if(O&32){e.back=-1;e.mode=12;break}if(O&64){b.msg="invalid literal/length code";e.mode=30;break}e.extra=O&15;e.mode=22;case 22:if(e.extra){for(O=e.extra;w>>=e.extra;w-=e.extra;e.back+=e.extra}e.was=e.length;e.mode= 23;case 23:for(;;){L=e.distcode[v&(1<>>24;O=L>>>16&255;L&=65535;if(H<=w)break;if(0===l)break a;l--;v+=f[p++]<>K)];H=L>>>24;O=L>>>16&255;L&=65535;if(K+H<=w)break;if(0===l)break a;l--;v+=f[p++]<>>=K;w-=K;e.back+=K}v>>>=H;w-=H;e.back+=H;if(O&64){b.msg="invalid distance code";e.mode=30;break}e.offset=L;e.extra=O&15;e.mode=24;case 24:if(e.extra){for(O=e.extra;w>>=e.extra;w-=e.extra;e.back+=e.extra}if(e.offset>e.dmax){b.msg="invalid distance too far back";e.mode=30;break}e.mode=25;case 25:if(0===q)break a;H=M-q;if(e.offset>H){H=e.offset-H;if(H>e.whave&&e.sane){b.msg="invalid distance too far back";e.mode=30;break}H>e.wnext?(H-=e.wnext,O=e.wsize-H):O=e.wnext-H;H>e.length&&(H=e.length);K=e.window}else K=g,O=m-e.offset,H=e.length;H>q&&(H=q);q-=H;e.length-=H;do g[m++]=K[O++];while(--H);0===e.length&&(e.mode=21);break;case 26:if(0=== q)break a;g[m++]=e.length;q--;e.mode=21;break;case 27:if(e.wrap){for(;32>w;){if(0===l)break a;l--;v|=f[p++]<w;){if(0===l)break a;l--;v+=f[p++]<e.mode&&(27>e.mode||4!==d))f=b.output,p=b.next_out,m=M-b.avail_out,q=b.state,null===q.window&&(q.wsize=1<=q.wsize?(k.arraySet(q.window,f,p-q.wsize,q.wsize,0),q.wnext=0,q.whave=q.wsize):(l=q.wsize-q.wnext,l>m&&(l=m),k.arraySet(q.window,f,p-m,l,q.wnext),(m-=l)?(k.arraySet(q.window,f,p- m,m,0),q.wnext=m,q.whave=q.wsize):(q.wnext+=l,q.wnext===q.wsize&&(q.wnext=0),q.whave=B;B++)K[B]=0;for(G=0;Gy&&(D=y);if(0=== y)return h[g++]=20971520,h[g++]=20971520,u.bits=1,0;for(x=1;x=B;B++)if(F<<=1,F-=K[B],0>F)return-1;if(0B;B++)A[B+1]=A[B]+K[B];for(G=0;GO?(V=L[I+l[G]],R=M[H+l[G]]):(V=96,R=0);F=1<< B-E;x=w=1<>E)+w]=N<<24|V<<16|R|0;while(0!==w);for(F=1<>=1;0!==F?(v&=F-1,v+=F):v=0;G++;if(0===--K[B]){if(B===y)break;B=k[c+l[G]]}if(B>D&&(v&a)!==J){0===E&&(E=D);r+=x;A=B-E;for(F=1<=F)break;A++;F<<=1}q+=1<>>8&255}function m(a,c,b){a.bi_valid>16-b?(a.bi_buf|=c<>16-a.bi_valid,a.bi_valid+=b-16):(a.bi_buf|=c<>>= 1,b<<=1;while(0<--c);return b>>>1}function p(a,c,b){var h=Array(16),e=0,k;for(k=1;15>=k;k++)h[k]=e=e+b[k-1]<<1;for(b=0;b<=c;b++)e=a[2*b+1],0!==e&&(a[2*b]=d(h[e]++,e))}function k(a){var c;for(c=0;286>c;c++)a.dyn_ltree[2*c]=0;for(c=0;30>c;c++)a.dyn_dtree[2*c]=0;for(c=0;19>c;c++)a.bl_tree[2*c]=0;a.dyn_ltree[512]=1;a.opt_len=a.static_len=0;a.last_lit=a.matches=0}function c(a){8d?v[d]:v[256+(d>>>7)],e(a,q,b), f=D[q],0!==f&&(d-=M[q],m(a,d,f)));while(ka.heap_len;)g=a.heap[++a.heap_len]=2>f?++f:0,b[2*g]=1,a.depth[g]=0,a.opt_len--,e&&(a.static_len-=d[2*g+1]);c.max_code=f;for(q=a.heap_len>>1;1<=q;q--)h(a,b,q);g=k;do q=a.heap[1],a.heap[1]=a.heap[a.heap_len--],h(a, b,1),d=a.heap[1],a.heap[--a.heap_max]=q,a.heap[--a.heap_max]=d,b[2*g]=b[2*q]+b[2*d],a.depth[g]=(a.depth[q]>=a.depth[d]?a.depth[q]:a.depth[d])+1,b[2*q+1]=b[2*d+1]=g,a.heap[1]=g++,h(a,b,1);while(2<=a.heap_len);a.heap[--a.heap_max]=a.heap[1];q=c.dyn_tree;g=c.max_code;for(var m=c.stat_desc.static_tree,n=c.stat_desc.has_stree,z=c.stat_desc.extra_bits,v=c.stat_desc.extra_base,l=c.stat_desc.max_length,C,I,u=0,k=0;15>=k;k++)a.bl_count[k]=0;q[2*a.heap[a.heap_max]+1]=0;for(d=a.heap_max+1;573>d;d++)e=a.heap[d], k=q[2*q[2*e+1]+1]+1,k>l&&(k=l,u++),q[2*e+1]=k,e>g||(a.bl_count[k]++,C=0,e>=v&&(C=z[e-v]),I=q[2*e],a.opt_len+=I*(k+C),n&&(a.static_len+=I*(m[2*e+1]+C)));if(0!==u){do{for(k=l-1;0===a.bl_count[k];)k--;a.bl_count[k]--;a.bl_count[k+1]+=2;a.bl_count[l]--;u-=2}while(0g||(q[2*m+1]!==k&&(a.opt_len+=(k-q[2*m+1])*q[2*m],q[2*m+1]=k),e--)}p(b,f,a.bl_count)}function u(a,c,b){var d,h=-1,e,k=c[1],q=0,f=7,g=4;0===k&&(f=138,g=3);c[2*(b+1)+1]=65535;for(d= 0;d<=b;d++)e=k,k=c[2*(d+1)+1],++q=q?a.bl_tree[34]++:a.bl_tree[36]++,q=0,h=e,0===k?(f=138,g=3):e===k?(f=6,g=3):(f=7,g=4))}function r(a,c,b){var d,h=-1,k,q=c[1],f=0,g=7,p=4;0===q&&(g=138,p=3);for(d=0;d<=b;d++)if(k=q,q=c[2*(d+1)+1],!(++f=f?(e(a,17,a.bl_tree),m(a,f-3,3)):(e(a,18,a.bl_tree), m(a,f-11,7));f=0;h=k;0===q?(g=138,p=3):k===q?(g=6,p=3):(g=7,p=4)}}function B(a){var c=4093624447,b;for(b=0;31>=b;b++,c>>>=1)if(c&1&&0!==a.dyn_ltree[2*b])return 0;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return 1;for(b=32;256>b;b++)if(0!==a.dyn_ltree[2*b])return 1;return 0}function G(a,b,d,h){m(a,0+(h?1:0),3);c(a);f(a,d);f(a,~d);x.arraySet(a.pending_buf,a.window,b,d,a.pending);a.pending+=d}var x=b("../utils/common"),y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5, 0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=Array(576);n(F);var q=Array(60);n(q);var v=Array(512);n(v);var w=Array(256);n(w);var J=Array(29);n(J);var M=Array(30);n(M);var H=function(a,c,b,d,h){this.static_tree=a;this.extra_bits=c;this.extra_base=b;this.elems=d;this.max_length=h;this.has_stree=a&&a.length},O,K,L,I=function(a,c){this.dyn_tree=a;this.max_code=0;this.stat_desc= c},N=!1;g._tr_init=function(a){if(!N){var c,b,h,e=Array(16);for(h=b=0;28>h;h++)for(J[h]=b,c=0;c<1<h;h++)for(M[h]=b,c=0;c<1<>=7;30>h;h++)for(M[h]=b<<7,c=0;c<1<=c;c++)e[c]=0;for(c=0;143>=c;)F[2*c+1]=8,c++,e[8]++;for(;255>=c;)F[2*c+1]=9,c++,e[9]++;for(;279>=c;)F[2*c+1]=7,c++,e[7]++;for(;287>=c;)F[2*c+1]=8,c++,e[8]++;p(F,287,e);for(c=0;30>c;c++)q[2*c+1]=5,q[2*c]=d(c,5);O=new H(F,y,257,286,15);K=new H(q, D,0,30,15);L=new H([],A,0,19,7);N=!0}a.l_desc=new I(a.dyn_ltree,O);a.d_desc=new I(a.dyn_dtree,K);a.bl_desc=new I(a.bl_tree,L);a.bi_buf=0;a.bi_valid=0;k(a)};g._tr_stored_block=G;g._tr_flush_block=function(a,b,d,h){var e,f,g=0;if(0>>3;f=a.static_len+3+ 7>>>3;f<=e&&(e=f)}else e=f=d+5;if(d+4<=e&&-1!==b)G(a,b,d,h);else if(4===a.strategy||f===e)m(a,2+(h?1:0),3),z(a,F,q);else{m(a,4+(h?1:0),3);b=a.l_desc.max_code+1;d=a.d_desc.max_code+1;g+=1;m(a,b-257,5);m(a,d-1,5);m(a,g-4,4);for(e=0;e>>8&255;a.pending_buf[a.d_buf+2*a.last_lit+1]=c&255;a.pending_buf[a.l_buf+a.last_lit]= b&255;a.last_lit++;0===c?a.dyn_ltree[2*b]++:(a.matches++,c--,a.dyn_ltree[2*(w[b]+256+1)]++,a.dyn_dtree[2*(256>c?v[c]:v[256+(c>>>7)])]++);return a.last_lit===a.lit_bufsize-1};g._tr_align=function(a){m(a,2,3);e(a,256,F);16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):8<=a.bi_valid&&(a.pending_buf[a.pending++]=a.bi_buf&255,a.bi_buf>>=8,a.bi_valid-=8)}},{"../utils/common":115}],125:[function(b,l,g){l.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null; this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],126:[function(b,l,g){(function(n,f){function m(a){if(ag.UNZIP)throw new TypeError("Bad argument");this.mode=a;this.pending_close=this.write_in_progress=this.init_done=!1;this.strategy=this.memLevel=this.level=this.windowBits=0;this.dictionary=null}function e(a,c){for(var b=0;bg.Z_MAX_CHUNK))throw Error("Invalid chunk size: "+a.chunkSize);if(a.windowBits&&(a.windowBitsg.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+ a.windowBits);if(a.level&&(a.levelg.Z_MAX_LEVEL))throw Error("Invalid compression level: "+a.level);if(a.memLevel&&(a.memLevelg.Z_MAX_MEMLEVEL))throw Error("Invalid memLevel: "+a.memLevel);if(a.strategy&&a.strategy!=g.Z_FILTERED&&a.strategy!=g.Z_HUFFMAN_ONLY&&a.strategy!=g.Z_RLE&&a.strategy!=g.Z_FIXED&&a.strategy!=g.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+a.strategy);if(a.dictionary&&!f.isBuffer(a.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance"); this._binding=new r.Zlib(c);var b=this;this._hadError=!1;this._binding.onerror=function(a,c){b._binding=null;b._hadError=!0;var d=Error(a);d.errno=c;d.code=g.codes[c];b.emit("error",d)};var d=g.Z_DEFAULT_COMPRESSION;"number"===typeof a.level&&(d=a.level);var h=g.Z_DEFAULT_STRATEGY;"number"===typeof a.strategy&&(h=a.strategy);this._binding.init(a.windowBits||g.Z_DEFAULT_WINDOWBITS,d,a.memLevel||g.Z_DEFAULT_MEMLEVEL,h,a.dictionary);this._buffer=new f(this._chunkSize);this._offset=0;this._closed=!1; this._level=d;this._strategy=h;this.once("end",this.close)}var u=b("_stream_transform"),r=b("./binding"),B=b("util"),G=b("assert").ok;r.Z_MIN_WINDOWBITS=8;r.Z_MAX_WINDOWBITS=15;r.Z_DEFAULT_WINDOWBITS=15;r.Z_MIN_CHUNK=64;r.Z_MAX_CHUNK=Infinity;r.Z_DEFAULT_CHUNK=16384;r.Z_MIN_MEMLEVEL=1;r.Z_MAX_MEMLEVEL=9;r.Z_DEFAULT_MEMLEVEL=8;r.Z_MIN_LEVEL=-1;r.Z_MAX_LEVEL=9;r.Z_DEFAULT_LEVEL=r.Z_DEFAULT_COMPRESSION;Object.keys(r).forEach(function(a){a.match(/^Z/)&&(g[a]=r[a])});g.codes={Z_OK:r.Z_OK,Z_STREAM_END:r.Z_STREAM_END, Z_NEED_DICT:r.Z_NEED_DICT,Z_ERRNO:r.Z_ERRNO,Z_STREAM_ERROR:r.Z_STREAM_ERROR,Z_DATA_ERROR:r.Z_DATA_ERROR,Z_MEM_ERROR:r.Z_MEM_ERROR,Z_BUF_ERROR:r.Z_BUF_ERROR,Z_VERSION_ERROR:r.Z_VERSION_ERROR};Object.keys(g.codes).forEach(function(a){g.codes[g.codes[a]]=a});g.Deflate=d;g.Inflate=p;g.Gzip=k;g.Gunzip=c;g.DeflateRaw=a;g.InflateRaw=h;g.Unzip=z;g.createDeflate=function(a){return new d(a)};g.createInflate=function(a){return new p(a)};g.createDeflateRaw=function(c){return new a(c)};g.createInflateRaw=function(a){return new h(a)}; g.createGzip=function(a){return new k(a)};g.createGunzip=function(a){return new c(a)};g.createUnzip=function(a){return new z(a)};g.deflate=function(a,c,b){"function"===typeof c&&(b=c,c={});return m(new d(c),a,b)};g.deflateSync=function(a,c){return e(new d(c),a)};g.gzip=function(a,c,b){"function"===typeof c&&(b=c,c={});return m(new k(c),a,b)};g.gzipSync=function(a,c){return e(new k(c),a)};g.deflateRaw=function(c,b,d){"function"===typeof b&&(d=b,b={});return m(new a(b),c,d)};g.deflateRawSync=function(c, b){return e(new a(b),c)};g.unzip=function(a,c,b){"function"===typeof c&&(b=c,c={});return m(new z(c),a,b)};g.unzipSync=function(a,c){return e(new z(c),a)};g.inflate=function(a,c,b){"function"===typeof c&&(b=c,c={});return m(new p(c),a,b)};g.inflateSync=function(a,c){return e(new p(c),a)};g.gunzip=function(a,b,d){"function"===typeof b&&(d=b,b={});return m(new c(b),a,d)};g.gunzipSync=function(a,b){return e(new c(b),a)};g.inflateRaw=function(a,c,b){"function"===typeof c&&(b=c,c={});return m(new h(c), a,b)};g.inflateRawSync=function(a,c){return e(new h(c),a)};B.inherits(l,u);l.prototype.params=function(a,c,b){if(ag.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+a);if(c!=g.Z_FILTERED&&c!=g.Z_HUFFMAN_ONLY&&c!=g.Z_RLE&&c!=g.Z_FIXED&&c!=g.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+c);if(this._level!==a||this._strategy!==c){var d=this;this.flush(r.Z_SYNC_FLUSH,function(){d._binding.params(a,c);d._hadError||(d._level=a,d._strategy=c,b&&b())})}else n.nextTick(b)}; l.prototype.reset=function(){return this._binding.reset()};l.prototype._flush=function(a){this._transform(new f(0),"",a)};l.prototype.flush=function(a,c){var b=this._writableState;if("function"===typeof a||void 0===a&&!c)c=a,a=r.Z_FULL_FLUSH;if(b.ended)c&&n.nextTick(c);else if(b.ending){if(c)this.once("end",c)}else if(b.needDrain){var d=this;this.once("drain",function(){d.flush(c)})}else this._flushFlag=a,this.write(new f(0),"",c)};l.prototype.close=function(a){a&&n.nextTick(a);if(!this._closed){this._closed= !0;this._binding.close();var c=this;n.nextTick(function(){c.emit("close")})}};l.prototype._transform=function(a,c,b){var d=this._writableState;!d.ending&&!d.ended||a&&d.length!==a.length?(c=this._flushFlag,a.length>=d.length&&(this._flushFlag=this._opts.flush||r.Z_NO_FLUSH)):c=r.Z_FINISH;this._processChunk(a,c,b)};l.prototype._processChunk=function(a,c,b){function d(z,l){if(!g._hadError){var I=e-l;G(0<=I,"have should not go down");if(0=g._chunkSize)e=g._chunkSize,g._offset=0,g._buffer=new f(g._chunkSize);if(0===l){k+=h-z;h=z;if(!p)return!0;I=g._binding.write(c,a,k,h,g._buffer,g._offset,g._chunkSize);I.callback=d;I.buffer=a}else{if(!p)return!1;b()}}}var h=a&&a.length,e=this._chunkSize-this._offset,k=0,g=this,p="function"===typeof b;if(!p){var m=[],n=0,z;this.on("error",function(a){z=a});do var l=this._binding.writeSync(c,a,k,h,this._buffer,this._offset,e);while(!this._hadError&& d(l[0],l[1]));if(this._hadError)throw z;l=f.concat(m,n);this.close();return l}l=this._binding.write(c,a,k,h,this._buffer,this._offset,e);l.buffer=a;l.callback=d};B.inherits(d,l);B.inherits(p,l);B.inherits(k,l);B.inherits(c,l);B.inherits(a,l);B.inherits(h,l);B.inherits(z,l)}).call(this,b("_process"),b("buffer").Buffer)},{"./binding":126,_process:329,_stream_transform:346,assert:113,buffer:128,util:359}],128:[function(b,l,g){(function(n){function f(){try{var a=new Uint8Array(1);a.foo=function(){return 42}; return 42===a.foo()&&"function"===typeof a.subarray&&0===a.subarray(1,1).byteLength}catch(c){return!1}}function m(a,c){if((e.TYPED_ARRAY_SUPPORT?2147483647:1073741823)h||d.byteLengthc?0:h(c)|0);if(!e.TYPED_ARRAY_SUPPORT)for(var b=0;b=(e.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ (e.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return a|0}function z(a,c){if(e.isBuffer(a))return a.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(a)||a instanceof ArrayBuffer))return a.byteLength;"string"!==typeof a&&(a=""+a);var b=a.length;if(0===b)return 0;for(var d=!1;;)switch(c){case "ascii":case "binary":case "raw":case "raws":return b;case "utf8":case "utf-8":case void 0:return v(a).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2* b;case "hex":return b>>>1;case "base64":return M.toByteArray(q(a)).length;default:if(d)return v(a).length;c=(""+c).toLowerCase();d=!0}}function l(a,c,b){var d=!1;if(void 0===c||0>c)c=0;if(c>this.length)return"";if(void 0===b||b>this.length)b=this.length;if(0>=b)return"";b>>>=0;c>>>=0;if(b<=c)return"";for(a||(a="utf8");;)switch(a){case "hex":a=c;c=b;b=this.length;if(!a||0>a)a=0;if(!c||0>c||c>b)c=b;d="";for(b=a;bd?"0"+d.toString(16):d.toString(16),d=a+d;return d;case "utf8":case "utf-8":return B(this, c,b);case "ascii":a="";for(b=Math.min(this.length,b);ca.length||2>c.length)return-1;e=2;k/=2;q/=2;b/=2}d=-1;for(var f=0;b+fh&&(e=h);break;case 2:q=a[c+1];128===(q&192)&&(h=(h&31)<<6|q&63,127h||57343h&&(e=h))}}null===e?(e=65533,k=1):65535>>10&1023|55296),e=56320|e&1023);d.push(e);c+=k}a=d.length;if(a<=K)d=String.fromCharCode.apply(String,d);else{b="";for(c=0;ca)throw new RangeError("offset is not uint");if(a+c>b)throw new RangeError("Trying to access beyond buffer length");}function x(a,c,b,d,h,k){if(!e.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>h||ca.length)throw new RangeError("Index out of range");}function y(a,c,b,d){0>c&&(c=65535+c+1);for(var h=0,e=Math.min(a.length-b,2);h>>8*(d?h:1-h)}function D(a,c,b,d){0>c&&(c=4294967295+c+1);for(var h=0,e=Math.min(a.length-b,4);h>>8*(d?h:3-h)&255}function A(a,c,b,d,h,e){if(b+d>a.length)throw new RangeError("Index out of range");if(0>b)throw new RangeError("Index out of range");}function E(a,c,b,d,h){h||A(a,c,b,4,3.4028234663852886E38,-3.4028234663852886E38); H.write(a,c,b,d,23,4);return b+4}function F(a,c,b,d,h){h||A(a,c,b,8,1.7976931348623157E308,-1.7976931348623157E308);H.write(a,c,b,d,52,8);return b+8}function q(a){a=a.trim?a.trim():a.replace(/^\s+|\s+$/g,"");a=a.replace(L,"");if(2>a.length)return"";for(;0!==a.length%4;)a+="=";return a}function v(a,c){c=c||Infinity;for(var b,d=a.length,h=null,e=[],k=0;kb){if(!h){if(56319b){-1<(c-=3)&&e.push(239,191,189);h=b;continue}b=(h-55296<<10|b-56320)+65536}else h&&-1<(c-=3)&&e.push(239,191,189);h=null;if(128>b){if(0>--c)break;e.push(b)}else if(2048>b){if(0>(c-=2))break;e.push(b>>6|192,b&63|128)}else if(65536>b){if(0>(c-=3))break;e.push(b>>12|224,b>>6&63|128,b&63|128)}else if(1114112>b){if(0>(c-=4))break;e.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw Error("Invalid code point");}return e}function w(a){for(var c=[],b=0;b=c.length||h>=a.length);h++)c[h+b]=a[h];return h}var M=b("base64-js"),H=b("ieee754"),O=b("isarray");g.Buffer=e;g.SlowBuffer=function(a){+a!=a&&(a=0);return e.alloc(+a)};g.INSPECT_MAX_BYTES=50;e.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:f();g.kMaxLength=e.TYPED_ARRAY_SUPPORT?2147483647:1073741823;e.poolSize=8192;e._augment=function(a){a.__proto__=e.prototype;return a};e.from=function(a,c,b){return d(null,a,c,b)}; e.TYPED_ARRAY_SUPPORT&&(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,$jscomp.initSymbol(),$jscomp.initSymbol(),$jscomp.initSymbol(),"undefined"!==typeof Symbol&&Symbol.species&&e[Symbol.species]===e&&($jscomp.initSymbol(),Object.defineProperty(e,Symbol.species,{value:null,configurable:!0})));e.alloc=function(a,c,b){p(a);a=0>=a?m(null,a):void 0!==c?"string"===typeof b?m(null,a).fill(c,b):m(null,a).fill(c):m(null,a);return a};e.allocUnsafe=function(a){return k(null,a)};e.allocUnsafeSlow= function(a){return k(null,a)};e.isBuffer=function(a){return!(null==a||!a._isBuffer)};e.compare=function(a,c){if(!e.isBuffer(a)||!e.isBuffer(c))throw new TypeError("Arguments must be Buffers");if(a===c)return 0;for(var b=a.length,d=c.length,h=0,k=Math.min(b,d);hc&&(a+=" ... "));return""};e.prototype.compare=function(a,c,b,d,h){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");void 0===c&&(c=0);void 0===b&&(b=a?a.length:0);void 0===d&&(d=0);void 0===h&&(h=this.length);if(0>c||b>a.length||0>d||h>this.length)throw new RangeError("out of range index");if(d>=h&&c>=b)return 0;if(d>=h)return-1; if(c>=b)return 1;c>>>=0;b>>>=0;d>>>=0;h>>>=0;if(this===a)return 0;var k=h-d,q=b-c,f=Math.min(k,q);d=this.slice(d,h);a=a.slice(c,b);for(c=0;cc&&(c=-2147483648);c>>=0;if(0===this.length||c>=this.length)return-1;0>c&&(c=Math.max(this.length+c,0));"string"===typeof a&&(a=e.from(a,b));if(e.isBuffer(a))return 0===a.length?-1:r(this,a,c, b);if("number"===typeof a)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,c):r(this,[a],c,b);throw new TypeError("val must be string, number or Buffer");};e.prototype.includes=function(a,c,b){return-1!==this.indexOf(a,c,b)};e.prototype.write=function(a,c,b,d){if(void 0===c)d="utf8",b=this.length,c=0;else if(void 0===b&&"string"===typeof c)d=c,b=this.length,c=0;else if(isFinite(c))c|=0,isFinite(b)?(b|=0,void 0===d&&(d="utf8")):(d=b,b= void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var h=this.length-c;if(void 0===b||b>h)b=h;if(0b||0>c)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");d||(d="utf8");for(h=!1;;)switch(d){case "hex":a:{c=Number(c)||0;d=this.length-c;b?(b=Number(b),b>d&&(b=d)):b=d;d=a.length;if(0!==d%2)throw Error("Invalid hex string");b>d/2&&(b=d/2);for(d=0;d(d-=2));f++)e=a.charCodeAt(f),h=e>>8,e%=256,k.push(e),k.push(h);return J(k,this,c,b);default:if(h)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase();h= !0}};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;e.prototype.slice=function(a,c){var b=this.length;a=~~a;c=void 0===c?b:~~c;0>a?(a+=b,0>a&&(a=0)):a>b&&(a=b);0>c?(c+=b,0>c&&(c=0)):c>b&&(c=b);c=128*d&&(b-=Math.pow(2,8*c));return b};e.prototype.readIntBE=function(a,c,b){a|=0;c|=0;b||G(a,c,this.length);b=c;for(var d=1,h=this[a+--b];0=128*d&&(h-= Math.pow(2,8*c));return h};e.prototype.readInt8=function(a,c){c||G(a,1,this.length);return this[a]&128?-1*(255-this[a]+1):this[a]};e.prototype.readInt16LE=function(a,c){c||G(a,2,this.length);var b=this[a]|this[a+1]<<8;return b&32768?b|4294901760:b};e.prototype.readInt16BE=function(a,c){c||G(a,2,this.length);var b=this[a+1]|this[a]<<8;return b&32768?b|4294901760:b};e.prototype.readInt32LE=function(a,c){c||G(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};e.prototype.readInt32BE= function(a,c){c||G(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};e.prototype.readFloatLE=function(a,c){c||G(a,4,this.length);return H.read(this,a,!0,23,4)};e.prototype.readFloatBE=function(a,c){c||G(a,4,this.length);return H.read(this,a,!1,23,4)};e.prototype.readDoubleLE=function(a,c){c||G(a,8,this.length);return H.read(this,a,!0,52,8)};e.prototype.readDoubleBE=function(a,c){c||G(a,8,this.length);return H.read(this,a,!1,52,8)};e.prototype.writeUIntLE=function(a,c,b,d){a= +a;c|=0;b|=0;d||x(this,a,c,b,Math.pow(2,8*b)-1,0);d=1;var h=0;for(this[c]=a&255;++h>>8):y(this,a,c,!0);return c+2};e.prototype.writeUInt16BE=function(a,c,b){a=+a;c|=0;b||x(this,a,c,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[c]=a>>>8,this[c+1]=a&255):y(this,a,c,!1);return c+2};e.prototype.writeUInt32LE=function(a,c,b){a=+a;c|=0;b||x(this,a,c,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[c+3]=a>>>24,this[c+2]=a>>>16,this[c+1]=a>>>8,this[c]=a&255):D(this,a,c,!0);return c+4};e.prototype.writeUInt32BE=function(a,c,b){a=+a;c|= 0;b||x(this,a,c,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[c]=a>>>24,this[c+1]=a>>>16,this[c+2]=a>>>8,this[c+3]=a&255):D(this,a,c,!1);return c+4};e.prototype.writeIntLE=function(a,c,b,d){a=+a;c|=0;d||(d=Math.pow(2,8*b-1),x(this,a,c,b,d-1,-d));d=0;var h=1,e=0;for(this[c]=a&255;++da&&0===e&&0!==this[c+d-1]&&(e=1),this[c+d]=(a/h>>0)-e&255;return c+b};e.prototype.writeIntBE=function(a,c,b,d){a=+a;c|=0;d||(d=Math.pow(2,8*b-1),x(this,a,c,b,d-1,-d));d=b-1;var h=1,e=0;for(this[c+d]=a&255;0<= --d&&(h*=256);)0>a&&0===e&&0!==this[c+d+1]&&(e=1),this[c+d]=(a/h>>0)-e&255;return c+b};e.prototype.writeInt8=function(a,c,b){a=+a;c|=0;b||x(this,a,c,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[c]=a&255;return c+1};e.prototype.writeInt16LE=function(a,c,b){a=+a;c|=0;b||x(this,a,c,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[c]=a&255,this[c+1]=a>>>8):y(this,a,c,!0);return c+2};e.prototype.writeInt16BE=function(a,c,b){a=+a;c|=0;b||x(this,a,c,2,32767,-32768);e.TYPED_ARRAY_SUPPORT? (this[c]=a>>>8,this[c+1]=a&255):y(this,a,c,!1);return c+2};e.prototype.writeInt32LE=function(a,c,b){a=+a;c|=0;b||x(this,a,c,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[c]=a&255,this[c+1]=a>>>8,this[c+2]=a>>>16,this[c+3]=a>>>24):D(this,a,c,!0);return c+4};e.prototype.writeInt32BE=function(a,c,b){a=+a;c|=0;b||x(this,a,c,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[c]=a>>>24,this[c+1]=a>>>16,this[c+2]=a>>>8,this[c+3]=a&255):D(this,a,c,!1);return c+4};e.prototype.writeFloatLE= function(a,c,b){return E(this,a,c,!0,b)};e.prototype.writeFloatBE=function(a,c,b){return E(this,a,c,!1,b)};e.prototype.writeDoubleLE=function(a,c,b){return F(this,a,c,!0,b)};e.prototype.writeDoubleBE=function(a,c,b){return F(this,a,c,!1,b)};e.prototype.copy=function(a,c,b,d){b||(b=0);d||0===d||(d=this.length);c>=a.length&&(c=a.length);c||(c=0);0c)throw new RangeError("targetStart out of bounds");if(0>b||b>=this.length)throw new RangeError("sourceStart out of bounds"); if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length);a.length-ch||!e.TYPED_ARRAY_SUPPORT)for(d=0;dh&&(a=h)}if(void 0!==d&&"string"!==typeof d)throw new TypeError("encoding must be a string");if("string"===typeof d&&!e.isEncoding(d))throw new TypeError("Unknown encoding: "+d);}else"number"===typeof a&&(a&=255);if(0>c||this.length>>=0;b=void 0===b?this.length:b>>>0;a||(a=0);if("number"===typeof a)for(d=c;d>18&63]+f[e>>12&63]+f[e>>6&63]+f[e&63]);return c.join("")}g.toByteArray=function(b){var f,k,c,a,h;f=b.length;if(0g?g:h+16383));1===k?(b=b[e-1],c+=f[b>>2],c+=f[b<<4&63],c+="=="):2===k&&(b=(b[e-2]<<8)+b[e-1],c+=f[b>>10],c+=f[b>>4&63],c+=f[b<<2&63],c+="=");a.push(c);return a.join("")};var f=[],m=[],e="undefined"!==typeof Uint8Array?Uint8Array:Array;(function(){for(var b=0;64>b;++b)f[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[b],m["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)]=b;m[45]=62;m[95]=63})()},{}],130:[function(b,l,g){g.read=function(b, f,g,e,d){var p;p=8*d-e-1;var k=(1<>1,a=-7;d=g?d-1:0;var h=g?-1:1,z=b[f+d];d+=h;g=z&(1<<-a)-1;z>>=-a;for(a+=p;0>=-a;for(a+=e;0>1,z=23===d?Math.pow(2,-24)-Math.pow(2,-77):0;p=e?0:p-1;var l=e?1:-1,u=0>f||0===f&&0>1/f?1:0;f=Math.abs(f);isNaN(f)|| Infinity===f?(f=isNaN(f)?1:0,e=a):(e=Math.floor(Math.log(f)/Math.LN2),1>f*(k=Math.pow(2,-e))&&(e--,k*=2),f=1<=e+h?f+z/k:f+z*Math.pow(2,1-h),2<=f*k&&(e++,k/=2),e+h>=a?(f=0,e=a):1<=e+h?(f=(f*k-1)*Math.pow(2,d),e+=h):(f=f*Math.pow(2,h-1)*Math.pow(2,d),e=0));for(;8<=d;b[g+p]=f&255,p+=l,f/=256,d-=8);e=e<k||0>a?(c=Math.abs(a)%k,0>a?k-c:c):a}function m(a){for(;0c;a=++c)128>a?p.push(a<<1):p.push(a<<1^283);for(g=f=b=0;256>g;++g)a=f^f<<1^f<<2^f<<3^f<<4,a=a>>>8^a&255^99,this.SBOX[b]=a,this.INV_SBOX[a]=b,d=p[b],e=p[d],k=p[e],c=257*p[a]^16843008*a,this.SUB_MIX[0][b]=c<<24|c>>>8,this.SUB_MIX[1][b]=c<<16|c>>>16,this.SUB_MIX[2][b]=c<<8|c>>>24,this.SUB_MIX[3][b]=c,c=16843009*k^65537*e^257*d^16843008*b,this.INV_SUB_MIX[0][a]=c<<24|c>>>8,this.INV_SUB_MIX[1][a]=c<<16|c>>>16,this.INV_SUB_MIX[2][a]=c<<8|c>>>24,this.INV_SUB_MIX[3][a]=c,0===b?b=f=1:(b=d^p[p[p[k^ d]]],f^=p[p[f]]);return!0};var c=new e;p.blockSize=16;p.prototype.blockSize=p.blockSize;p.keySize=32;p.prototype.keySize=p.keySize;p.prototype._doReset=function(){var a,b,d,e,k;b=this._key;a=b.length;this._nRounds=a+6;e=4*(this._nRounds+1);this._keySchedule=[];for(d=0;d>>24,k=c.SBOX[k>>>24]<<24|c.SBOX[k>>>16&255]<<16|c.SBOX[k>>>8&255]<<8|c.SBOX[k&255],k^=c.RCON[d/a|0]<<24):6>>24]<<24|c.SBOX[k>>> 16&255]<<16|c.SBOX[k>>>8&255]<<8|c.SBOX[k&255]:void 0,this._keySchedule[d-a]^k);this._invKeySchedule=[];for(a=0;aa||4>=d?k:c.INV_SUB_MIX[0][c.SBOX[k>>>24]]^c.INV_SUB_MIX[1][c.SBOX[k>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[k>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[k&255]];return!0};p.prototype.encryptBlock=function(a){a=d(new b(a));a=this._doCryptBlock(a,this._keySchedule,c.SUB_MIX,c.SBOX);var h=new b(16);h.writeUInt32BE(a[0],0);h.writeUInt32BE(a[1], 4);h.writeUInt32BE(a[2],8);h.writeUInt32BE(a[3],12);return h};p.prototype.decryptBlock=function(a){a=d(new b(a));var h=[a[3],a[1]];a[1]=h[0];a[3]=h[1];a=this._doCryptBlock(a,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX);h=new b(16);h.writeUInt32BE(a[0],0);h.writeUInt32BE(a[3],4);h.writeUInt32BE(a[2],8);h.writeUInt32BE(a[1],12);return h};p.prototype.scrub=function(){m(this._keySchedule);m(this._invKeySchedule);m(this._key)};p.prototype._doCryptBlock=function(a,c,b,d){var e,k,g,p,m,n,l;e=a[0]^c[0]; k=a[1]^c[1];g=a[2]^c[2];p=a[3]^c[3];a=4;for(var A=1;A>>24]^b[1][k>>>16&255]^b[2][g>>>8&255]^b[3][p&255]^c[a++],n=b[0][k>>>24]^b[1][g>>>16&255]^b[2][p>>>8&255]^b[3][e&255]^c[a++],l=b[0][g>>>24]^b[1][p>>>16&255]^b[2][e>>>8&255]^b[3][k&255]^c[a++],p=b[0][p>>>24]^b[1][e>>>16&255]^b[2][k>>>8&255]^b[3][g&255]^c[a++],e=m,k=n,g=l;m=(d[e>>>24]<<24|d[k>>>16&255]<<16|d[g>>>8&255]<<8|d[p&255])^c[a++];n=(d[k>>>24]<<24|d[g>>>16&255]<<16|d[p>>>8&255]<<8|d[e&255])^c[a++];l=(d[g>>>24]<< 24|d[p>>>16&255]<<16|d[e>>>8&255]<<8|d[k&255])^c[a++];p=(d[p>>>24]<<24|d[e>>>16&255]<<16|d[k>>>8&255]<<8|d[g&255])^c[a++];return[f(m),f(n),f(l),f(p)]};g.AES=p}).call(this,b("buffer").Buffer)},{buffer:128}],135:[function(b,l,g){(function(g){function f(c,a,b,d){if(!(this instanceof f))return new f(c,a,b);e.call(this);this._finID=g.concat([b,new g([0,0,0,1])]);b=g.concat([b,new g([0,0,0,2])]);this._cipher=new m.AES(a);this._prev=new g(b.length);this._cache=new g("");this._secCache=new g("");this._decrypt= d;this._len=this._alen=0;b.copy(this._prev);this._mode=c;c=new g(4);c.fill(0);this._ghash=new p(this._cipher.encryptBlock(c));this._authTag=null;this._called=!1}var m=b("./aes"),e=b("cipher-base"),d=b("inherits"),p=b("./ghash"),k=b("buffer-xor");d(f,e);l.exports=f;f.prototype._update=function(c){if(!this._called&&this._alen){var a=16-this._alen%16;16>a&&(a=new g(a),a.fill(0),this._ghash.update(a))}this._called=!0;a=this._mode.encrypt(this,c);this._decrypt?this._ghash.update(c):this._ghash.update(a); this._len+=c.length;return a};f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw Error("Unsupported state or unable to authenticate data");var c=k(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){var a=this._authTag,b=0;c.length!==a.length&&b++;for(var d=Math.min(c.length,a.length),e=-1;++ep||0>b?(c=Math.abs(b)%p,0>b?p-c:c):b}var d=new b(16);d.fill(0);l.exports=f;f.prototype.ghash=function(b){for(var c=-1;++c++e;){(a=0!==(this.state[~~(e/8)]&1<<7-e%8))&&(c=[c[0]^b[0],c[1]^b[1],c[2]^b[2],c[3]^b[3]]);d=0!==(b[3]&1);for(a=3;0>>1|(b[a-1]&1)<<31;b[0]>>>=1;d&&(b[0]^=-520093696)}this.state=g(c)};f.prototype.update=function(d){for(this.cache=b.concat([this.cache,d]);16<=this.cache.length;)d=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(d)}; f.prototype["final"]=function(e,c){this.cache.length&&this.ghash(b.concat([this.cache,d],16));this.ghash(g([0,e,0,c]));return this.state};var p=Math.pow(2,32)}).call(this,b("buffer").Buffer)},{buffer:128}],140:[function(b,l,g){g["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"};g["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"};g["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"};g["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"}; g["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"};g["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"};g.aes128=g["aes-128-cbc"];g.aes192=g["aes-192-cbc"];g.aes256=g["aes-256-cbc"];g["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"};g["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"};g["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"};g["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"}; g["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"};g["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"};g["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"};g["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"};g["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"};g["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"};g["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"}; g["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"};g["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"};g["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"};g["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"};g["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"};g["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"};g["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],141:[function(b, l,g){var n=b("buffer-xor");g.encrypt=function(b,g){var e=n(g,b._prev);b._prev=b._cipher.encryptBlock(e);return b._prev};g.decrypt=function(b,g){var e=b._prev;b._prev=g;var d=b._cipher.decryptBlock(g);return n(d,e)}},{"buffer-xor":148}],142:[function(b,l,g){(function(n){function f(b,d,f){var k=d.length,c=m(d,b._cache);b._cache=b._cache.slice(k);b._prev=n.concat([b._prev,f?d:c]);return c}var m=b("buffer-xor");g.encrypt=function(b,d,g){for(var k=new n(""),c;d.length;)if(0===b._cache.length&&(b._cache= b._cipher.encryptBlock(b._prev),b._prev=new n("")),b._cache.length<=d.length)c=b._cache.length,k=n.concat([k,f(b,d.slice(0,c),g)]),d=d.slice(c);else{k=n.concat([k,f(b,d,g)]);break}return k}}).call(this,b("buffer").Buffer)},{buffer:128,"buffer-xor":148}],143:[function(b,l,g){(function(b){g.encrypt=function(f,g,e){for(var d=g.length,p=new b(d),k=-1;++k++u;){for(var C=a._cipher.encryptBlock(a._prev),B=h&1<<7-u?128:0,G=C[0]^B,r=r+((G& 128)>>u%8),C=a,x=a._prev,B=l?B:G,G=x.length,y=-1,D=new b(x.length),x=b.concat([x,new b([B])]);++y>7;C._prev=D}p[c]=r}return p}}).call(this,b("buffer").Buffer)},{buffer:128}],144:[function(b,l,g){(function(b){g.encrypt=function(f,g,e){for(var d=g.length,p=new b(d),k=-1;++k>>1],a=e.r28shl(a,g),d=e.r28shl(d,g);e.pc2(a,d,b.keys,f)}};f.prototype._update=function(b,c,a,d){var f=this._desState,g=e.readUInt32BE(b,c);b=e.readUInt32BE(b,c+4);e.ip(g,b,f.tmp,0);g=f.tmp[0];b=f.tmp[1];"encrypt"===this.type?this._encrypt(f,g,b,f.tmp,0):this._decrypt(f,g,b,f.tmp,0);g=f.tmp[0];b=f.tmp[1];e.writeUInt32BE(a,g,d);e.writeUInt32BE(a,b,d+4)};f.prototype._pad=function(b,c){for(var a=b.length-c,d=c;d< b.length;d++)b[d]=a;return!0};f.prototype._unpad=function(b){for(var c=b[b.length-1],a=b.length-c;a>>0;c=m}e.rip(a,c,d,f)};f.prototype._decrypt=function(b,c,a,d,f){for(var g=b.keys.length-2;0<=g;g-=2){var p=b.keys[g],m=b.keys[g+1];e.expand(a,b.tmp, 0);p^=b.tmp[0];m^=b.tmp[1];p=e.substitute(p,m);p=e.permute(p);m=a;a=(c^p)>>>0;c=m}e.rip(a,c,d,f)}},{"../des":154,inherits:326,"minimalistic-assert":160}],158:[function(b,l,g){function n(b,e){m.equal(e.length,24,"Invalid key length");var c=e.slice(0,8),a=e.slice(8,16),h=e.slice(16,24);this.ciphers="encrypt"===b?[d.create({type:"encrypt",key:c}),d.create({type:"decrypt",key:a}),d.create({type:"encrypt",key:h})]:[d.create({type:"decrypt",key:h}),d.create({type:"encrypt",key:a}),d.create({type:"decrypt", key:c})]}function f(b){e.call(this,b);this._edeState=new n(this.type,this.options.key)}var m=b("minimalistic-assert");g=b("inherits");b=b("../des");var e=b.Cipher,d=b.DES;g(f,e);l.exports=f;f.create=function(b){return new f(b)};f.prototype._update=function(b,d,c,a){var h=this._edeState;h.ciphers[0]._update(b,d,c,a);h.ciphers[1]._update(c,a,c,a);h.ciphers[2]._update(c,a,c,a)};f.prototype._pad=d.prototype._pad;f.prototype._unpad=d.prototype._unpad},{"../des":154,inherits:326,"minimalistic-assert":160}], 159:[function(b,l,g){g.readUInt32BE=function(b,d){return(b[0+d]<<24|b[1+d]<<16|b[2+d]<<8|b[3+d])>>>0};g.writeUInt32BE=function(b,d,f){b[0+f]=d>>>24;b[1+f]=d>>>16&255;b[2+f]=d>>>8&255;b[3+f]=d&255};g.ip=function(b,d,f,k){for(var c=0,a=0,h=6;0<=h;h-=2){for(var g=0;24>=g;g+=8)c<<=1,c|=d>>>g+h&1;for(g=0;24>=g;g+=8)c<<=1,c|=b>>>g+h&1}for(h=6;0<=h;h-=2){for(g=1;25>=g;g+=8)a<<=1,a|=d>>>g+h&1;for(g=1;25>=g;g+=8)a<<=1,a|=b>>>g+h&1}f[k+0]=c>>>0;f[k+1]=a>>>0};g.rip=function(b,d,f,k){for(var c=0,a=0,h=0;4>h;h++)for(var g= 24;0<=g;g-=8)c<<=1,c|=d>>>g+h&1,c<<=1,c|=b>>>g+h&1;for(h=4;8>h;h++)for(g=24;0<=g;g-=8)a<<=1,a|=d>>>g+h&1,a<<=1,a|=b>>>g+h&1;f[k+0]=c>>>0;f[k+1]=a>>>0};g.pc1=function(b,d,f,k){for(var c=0,a=0,h=7;5<=h;h--){for(var g=0;24>=g;g+=8)c<<=1,c|=d>>g+h&1;for(g=0;24>=g;g+=8)c<<=1,c|=b>>g+h&1}for(g=0;24>=g;g+=8)c<<=1,c|=d>>g+h&1;for(h=1;3>=h;h++){for(g=0;24>=g;g+=8)a<<=1,a|=d>>g+h&1;for(g=0;24>=g;g+=8)a<<=1,a|=b>>g+h&1}for(g=0;24>=g;g+=8)a<<=1,a|=b>>g+h&1;f[k+0]=c>>>0;f[k+1]=a>>>0};g.r28shl=function(b,d){return b<< d&268435455|b>>>28-d};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];g.pc2=function(b,d,f,k){for(var c=0,a=0,h=n.length>>>1,g=0;g>>n[g]&1;for(g=h;g>>n[g]&1;f[k+0]=c>>>0;f[k+1]=a>>>0};g.expand=function(b,d,f){for(var k=0,c=0,k=(b&1)<<5|b>>>27,a=23;15<=a;a-=4)k<<=6,k|=b>>>a&63;for(a=11;3<=a;a-=4)c|=b>>>a&63,c<<=6;d[f+0]=k>>>0;d[f+1]=(c|(b&31)<<1|b>>>31)>>>0};var f=[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];g.substitute=function(b,d){for(var g=0,k=0;4>k;k++)var c=b>>>18-6*k&63,c=f[64*k+c],g=g<<4,g=g|c;for(k=0;4>k;k++)c=d>>>18-6*k&63,c=f[256+64*k+c],g<<=4,g|=c;return g>>>0};var m=[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];g.permute=function(b){for(var d= 0,f=0;f>>m[f]&1;return d>>>0};g.padSplit=function(b,d,f){for(b=b.toString(2);b.length=h?d|h-49+10:17<=h&&22>=h?d|h-17+10:d|h&15;return d}function k(a,c,b,d){var h=0;for(b=Math.min(a.length,b);c>>26,p=k&67108863,k=Math.min(f,c.length-1),m=Math.max(0,f-a.length+1);m<=k;m++)h=a.words[f-m|0]|0,e=c.words[m]|0,h=h*e+p,g+=h/67108864|0,p=h&67108863;b.words[f]=p|0;k=g|0}0!==k?b.words[f]=k|0:b.length--;return b.strip()}function a(a,c){this.x= a;this.y=c}function h(a,c){this.name=a;this.p=new d(c,16);this.n=this.p.bitLength();this.k=(new d(1)).iushln(this.n).isub(this.p);this.tmp=this._tmp()}function l(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function u(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function r(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")} function B(a){"string"===typeof a?(a=d._prime(a),this.m=a.p,this.prime=a):(m(a.gtn(1),"modulus must be greater than 1"),this.m=a,this.prime=null)}function G(a){B.call(this,a);this.shift=this.m.bitLength();0!==this.shift%26&&(this.shift+=26-this.shift%26);this.r=(new d(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 g?g.exports= d:f.BN=d;d.BN=d;d.wordSize=26;var x;try{x=b("buffer").Buffer}catch(q){}d.isBN=function(a){return null!==a&&"object"===typeof a&&"BN"===a.constructor.name&&Array.isArray(a.words)};d.max=function(a,c){return 0a.cmp(c)?a:c};d.prototype._init=function(a,c,b){if("number"===typeof a)return this._initNumber(a,c,b);if("object"===typeof a)return this._initArray(a,c,b);"hex"===c&&(c=16);m(c===(c|0)&&2<=c&&36>=c);a=a.toString().replace(/\s+/g,"");var d=0;"-"===a[0]&& d++;16===c?this._parseHex(a,d):this._parseBase(a,c,d);"-"===a[0]&&(this.negative=1);this.strip();"le"===b&&this._initArray(this.toArray(),c,b)};d.prototype._initNumber=function(a,c,b){0>a&&(this.negative=1,a=-a);67108864>a?(this.words=[a&67108863],this.length=1):4503599627370496>a?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(m(9007199254740992>a),this.words=[a&67108863,a/67108864&67108863,1],this.length=3);"le"===b&&this._initArray(this.toArray(),c,b)};d.prototype._initArray=function(a, c,b){m("number"===typeof a.length);if(0>=a.length)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3);this.words=Array(this.length);for(c=0;c>>26-h&67108863,h+=24,26<=h&&(h-=26,b++);else if("le"===b)for(b=c=0;c>>26-h&67108863,h+= 24,26<=h&&(h-=26,b++);return this.strip()};d.prototype._parseHex=function(a,c){this.length=Math.ceil((a.length-c)/6);this.words=Array(this.length);for(var b=0;b=c;b-=6)h=p(a,b,b+6),this.words[d]|=h<>>26-e&4194303,e+=24,26<=e&&(e-=26,d++);b+6!==c&&(h=p(a,c,b+6),this.words[d]|=h<>>26-e&4194303);this.strip()};d.prototype._parseBase=function(a,c,b){this.words=[0];this.length= 1;for(var d=0,h=1;67108863>=h;h*=c)d++;d--;for(var h=h/c|0,e=a.length-b,f=e%d,g=Math.min(e,e-f)+b,e=0;bthis.words[0]+e?this.words[0]+=e:this._iaddn(e);if(0!==f){d=1;e=k(a,b,a.length,c);for(b=0;bthis.words[0]+e?this.words[0]+=e:this._iaddn(e)}};d.prototype.copy=function(a){a.words=Array(this.length);for(var c=0;c"};var y=" 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".split(" "), D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],A=[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];d.prototype.toString=function(a,c){a=a||10;c=c|0||1;var b;if(16===a||"hex"===a){b="";for(var d=0,h=0,e=0;e>>24-d&16777215;b=0!==h||e!==this.length-1?y[6-f.length]+f+b:f+b;d+=2;26<=d&&(d-=26,e--)}for(0!==h&&(b=h.toString(16)+b);0!==b.length%c;)b="0"+b;0!==this.negative&&(b="-"+b);return b}if(a===(a|0)&&2<=a&&36>=a){d=D[a];h=A[a];b="";e=this.clone();for(e.negative=0;!e.isZero();)k=e.modn(h).toString(a),e=e.idivn(h),b=e.isZero()?k+b:y[d-k.length]+k+b;for(this.isZero()&&(b="0"+b);0!==b.length%c;)b="0"+b;0!==this.negative&&(b="-"+b);return b}m(!1,"Base should be between 2 and 36")}; d.prototype.toNumber=function(){var a=this.words[0];2===this.length?a+=67108864*this.words[1]:3===this.length&&1===this.words[2]?a+=4503599627370496+67108864*this.words[1]:2>>=13);64<= a&&(c+=7,a>>>=7);8<=a&&(c+=4,a>>>=4);2<=a&&(c+=2,a>>>=2);return c+a};d.prototype._zeroBits=function(a){if(0===a)return 26;var c=0;0===(a&8191)&&(c+=13,a>>>=13);0===(a&127)&&(c+=7,a>>>=7);0===(a&15)&&(c+=4,a>>>=4);0===(a&3)&&(c+=2,a>>>=2);0===(a&1)&&c++;return c};d.prototype.bitLength=function(){var a=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+a};d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,c=0;ca.length?this.clone().ior(a):a.clone().ior(this)};d.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)};d.prototype.iuand=function(a){var c;c=this.length>a.length?a:this;for(var b=0;ba.length?this.clone().iand(a):a.clone().iand(this)};d.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)};d.prototype.iuxor=function(a){var c;this.length>a.length?c=this:(c=a,a=this);for(var b=0;ba.length?this.clone().ixor(a):a.clone().ixor(this)};d.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)};d.prototype.inotn=function(a){m("number"===typeof a&&0<=a);var c=Math.ceil(a/26)|0;a%=26;this._expand(c);0>26-a);return this.strip()};d.prototype.notn=function(a){return this.clone().inotn(a)};d.prototype.setn=function(a,c){m("number"===typeof a&&0<=a);var b=a/26|0,d=a%26;this._expand(b+1);this.words[b]=c?this.words[b]|1<a.length?b=this:(b=a,a=this);for(var d=c=0;d>>=26;for(;0!==c&&d>>=26;this.length=b.length;if(0!==c)this.words[this.length]=c,this.length++;else if(b!==this)for(;da.length?this.clone().iadd(a):a.clone().iadd(this)};d.prototype.isub=function(a){if(0!==a.negative){a.negative=0;var c=this.iadd(a);a.negative=1;return c._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();c=this.cmp(a);if(0===c)return this.negative=0,this.length=1,this.words[0]=0,this;var b;0>26,this.words[h]=c&67108863;for(;0!==d&&h>26,this.words[h]=c&67108863;if(0===d&&h>>13,n=d[1]|0,g=n&8191,l=n>>>13, z=d[2]|0,n=z&8191,C=z>>>13,r=d[3]|0,z=r&8191,u=r>>>13,y=d[4]|0,r=y&8191,x=y>>>13,D=d[5]|0,y=D&8191,G=D>>>13,A=d[6]|0,D=A&8191,B=A>>>13,F=d[7]|0,A=F&8191,E=F>>>13,ba=d[8]|0,F=ba&8191,ba=ba>>>13,da=d[9]|0,d=da&8191,da=da>>>13,P=h[0]|0,T=P&8191,U=P>>>13,W=h[1]|0,P=W&8191,Q=W>>>13,Y=h[2]|0,W=Y&8191,aa=Y>>>13,S=h[3]|0,Y=S&8191,ga=S>>>13,Z=h[4]|0,S=Z&8191,ca=Z>>>13,fa=h[5]|0,Z=fa&8191,ka=fa>>>13,ea=h[6]|0,fa=ea&8191,la=ea>>>13,ha=h[7]|0,ea=ha&8191,ma=ha>>>13,ia=h[8]|0,ha=ia&8191,ia=ia>>>13,ja=h[9]|0,h= ja&8191,ja=ja>>>13;b.negative=a.negative^c.negative;b.length=19;f=Math.imul(p,T);a=Math.imul(p,U);a+=Math.imul(m,T);c=Math.imul(m,U);var xa=k+f+((a&8191)<<13),k=c+(a>>>13)+(xa>>>26),xa=xa&67108863;f=Math.imul(g,T);a=Math.imul(g,U);a+=Math.imul(l,T);c=Math.imul(l,U);f+=Math.imul(p,P);a+=Math.imul(p,Q);a+=Math.imul(m,P);c+=Math.imul(m,Q);var ya=k+f+((a&8191)<<13),k=c+(a>>>13)+(ya>>>26),ya=ya&67108863;f=Math.imul(n,T);a=Math.imul(n,U);a+=Math.imul(C,T);c=Math.imul(C,U);f+=Math.imul(g,P);a+=Math.imul(g, Q);a+=Math.imul(l,P);c+=Math.imul(l,Q);f+=Math.imul(p,W);a+=Math.imul(p,aa);a+=Math.imul(m,W);c+=Math.imul(m,aa);var za=k+f+((a&8191)<<13),k=c+(a>>>13)+(za>>>26),za=za&67108863;f=Math.imul(z,T);a=Math.imul(z,U);a+=Math.imul(u,T);c=Math.imul(u,U);f+=Math.imul(n,P);a+=Math.imul(n,Q);a+=Math.imul(C,P);c+=Math.imul(C,Q);f+=Math.imul(g,W);a+=Math.imul(g,aa);a+=Math.imul(l,W);c+=Math.imul(l,aa);f+=Math.imul(p,Y);a+=Math.imul(p,ga);a+=Math.imul(m,Y);c+=Math.imul(m,ga);var Aa=k+f+((a&8191)<<13),k=c+(a>>> 13)+(Aa>>>26),Aa=Aa&67108863;f=Math.imul(r,T);a=Math.imul(r,U);a+=Math.imul(x,T);c=Math.imul(x,U);f+=Math.imul(z,P);a+=Math.imul(z,Q);a+=Math.imul(u,P);c+=Math.imul(u,Q);f+=Math.imul(n,W);a+=Math.imul(n,aa);a+=Math.imul(C,W);c+=Math.imul(C,aa);f+=Math.imul(g,Y);a+=Math.imul(g,ga);a+=Math.imul(l,Y);c+=Math.imul(l,ga);f+=Math.imul(p,S);a+=Math.imul(p,ca);a+=Math.imul(m,S);c+=Math.imul(m,ca);var Ba=k+f+((a&8191)<<13),k=c+(a>>>13)+(Ba>>>26),Ba=Ba&67108863;f=Math.imul(y,T);a=Math.imul(y,U);a+=Math.imul(G, T);c=Math.imul(G,U);f+=Math.imul(r,P);a+=Math.imul(r,Q);a+=Math.imul(x,P);c+=Math.imul(x,Q);f+=Math.imul(z,W);a+=Math.imul(z,aa);a+=Math.imul(u,W);c+=Math.imul(u,aa);f+=Math.imul(n,Y);a+=Math.imul(n,ga);a+=Math.imul(C,Y);c+=Math.imul(C,ga);f+=Math.imul(g,S);a+=Math.imul(g,ca);a+=Math.imul(l,S);c+=Math.imul(l,ca);f+=Math.imul(p,Z);a+=Math.imul(p,ka);a+=Math.imul(m,Z);c+=Math.imul(m,ka);var Ca=k+f+((a&8191)<<13),k=c+(a>>>13)+(Ca>>>26),Ca=Ca&67108863;f=Math.imul(D,T);a=Math.imul(D,U);a+=Math.imul(B, T);c=Math.imul(B,U);f+=Math.imul(y,P);a+=Math.imul(y,Q);a+=Math.imul(G,P);c+=Math.imul(G,Q);f+=Math.imul(r,W);a+=Math.imul(r,aa);a+=Math.imul(x,W);c+=Math.imul(x,aa);f+=Math.imul(z,Y);a+=Math.imul(z,ga);a+=Math.imul(u,Y);c+=Math.imul(u,ga);f+=Math.imul(n,S);a+=Math.imul(n,ca);a+=Math.imul(C,S);c+=Math.imul(C,ca);f+=Math.imul(g,Z);a+=Math.imul(g,ka);a+=Math.imul(l,Z);c+=Math.imul(l,ka);f+=Math.imul(p,fa);a+=Math.imul(p,la);a+=Math.imul(m,fa);c+=Math.imul(m,la);var Da=k+f+((a&8191)<<13),k=c+(a>>>13)+ (Da>>>26),Da=Da&67108863;f=Math.imul(A,T);a=Math.imul(A,U);a+=Math.imul(E,T);c=Math.imul(E,U);f+=Math.imul(D,P);a+=Math.imul(D,Q);a+=Math.imul(B,P);c+=Math.imul(B,Q);f+=Math.imul(y,W);a+=Math.imul(y,aa);a+=Math.imul(G,W);c+=Math.imul(G,aa);f+=Math.imul(r,Y);a+=Math.imul(r,ga);a+=Math.imul(x,Y);c+=Math.imul(x,ga);f+=Math.imul(z,S);a+=Math.imul(z,ca);a+=Math.imul(u,S);c+=Math.imul(u,ca);f+=Math.imul(n,Z);a+=Math.imul(n,ka);a+=Math.imul(C,Z);c+=Math.imul(C,ka);f+=Math.imul(g,fa);a+=Math.imul(g,la);a+= Math.imul(l,fa);c+=Math.imul(l,la);f+=Math.imul(p,ea);a+=Math.imul(p,ma);a+=Math.imul(m,ea);c+=Math.imul(m,ma);var Ea=k+f+((a&8191)<<13),k=c+(a>>>13)+(Ea>>>26),Ea=Ea&67108863;f=Math.imul(F,T);a=Math.imul(F,U);a+=Math.imul(ba,T);c=Math.imul(ba,U);f+=Math.imul(A,P);a+=Math.imul(A,Q);a+=Math.imul(E,P);c+=Math.imul(E,Q);f+=Math.imul(D,W);a+=Math.imul(D,aa);a+=Math.imul(B,W);c+=Math.imul(B,aa);f+=Math.imul(y,Y);a+=Math.imul(y,ga);a+=Math.imul(G,Y);c+=Math.imul(G,ga);f+=Math.imul(r,S);a+=Math.imul(r,ca); a+=Math.imul(x,S);c+=Math.imul(x,ca);f+=Math.imul(z,Z);a+=Math.imul(z,ka);a+=Math.imul(u,Z);c+=Math.imul(u,ka);f+=Math.imul(n,fa);a+=Math.imul(n,la);a+=Math.imul(C,fa);c+=Math.imul(C,la);f+=Math.imul(g,ea);a+=Math.imul(g,ma);a+=Math.imul(l,ea);c+=Math.imul(l,ma);f+=Math.imul(p,ha);a+=Math.imul(p,ia);a+=Math.imul(m,ha);c+=Math.imul(m,ia);var Fa=k+f+((a&8191)<<13),k=c+(a>>>13)+(Fa>>>26),Fa=Fa&67108863;f=Math.imul(d,T);a=Math.imul(d,U);a+=Math.imul(da,T);c=Math.imul(da,U);f+=Math.imul(F,P);a+=Math.imul(F, Q);a+=Math.imul(ba,P);c+=Math.imul(ba,Q);f+=Math.imul(A,W);a+=Math.imul(A,aa);a+=Math.imul(E,W);c+=Math.imul(E,aa);f+=Math.imul(D,Y);a+=Math.imul(D,ga);a+=Math.imul(B,Y);c+=Math.imul(B,ga);f+=Math.imul(y,S);a+=Math.imul(y,ca);a+=Math.imul(G,S);c+=Math.imul(G,ca);f+=Math.imul(r,Z);a+=Math.imul(r,ka);a+=Math.imul(x,Z);c+=Math.imul(x,ka);f+=Math.imul(z,fa);a+=Math.imul(z,la);a+=Math.imul(u,fa);c+=Math.imul(u,la);f+=Math.imul(n,ea);a+=Math.imul(n,ma);a+=Math.imul(C,ea);c+=Math.imul(C,ma);f+=Math.imul(g, ha);a+=Math.imul(g,ia);a+=Math.imul(l,ha);c+=Math.imul(l,ia);f+=Math.imul(p,h);a+=Math.imul(p,ja);a+=Math.imul(m,h);c+=Math.imul(m,ja);p=k+f+((a&8191)<<13);k=c+(a>>>13)+(p>>>26);p&=67108863;f=Math.imul(d,P);a=Math.imul(d,Q);a+=Math.imul(da,P);c=Math.imul(da,Q);f+=Math.imul(F,W);a+=Math.imul(F,aa);a+=Math.imul(ba,W);c+=Math.imul(ba,aa);f+=Math.imul(A,Y);a+=Math.imul(A,ga);a+=Math.imul(E,Y);c+=Math.imul(E,ga);f+=Math.imul(D,S);a+=Math.imul(D,ca);a+=Math.imul(B,S);c+=Math.imul(B,ca);f+=Math.imul(y,Z); a+=Math.imul(y,ka);a+=Math.imul(G,Z);c+=Math.imul(G,ka);f+=Math.imul(r,fa);a+=Math.imul(r,la);a+=Math.imul(x,fa);c+=Math.imul(x,la);f+=Math.imul(z,ea);a+=Math.imul(z,ma);a+=Math.imul(u,ea);c+=Math.imul(u,ma);f+=Math.imul(n,ha);a+=Math.imul(n,ia);a+=Math.imul(C,ha);c+=Math.imul(C,ia);f+=Math.imul(g,h);a+=Math.imul(g,ja);a+=Math.imul(l,h);c+=Math.imul(l,ja);g=k+f+((a&8191)<<13);k=c+(a>>>13)+(g>>>26);g&=67108863;f=Math.imul(d,W);a=Math.imul(d,aa);a+=Math.imul(da,W);c=Math.imul(da,aa);f+=Math.imul(F, Y);a+=Math.imul(F,ga);a+=Math.imul(ba,Y);c+=Math.imul(ba,ga);f+=Math.imul(A,S);a+=Math.imul(A,ca);a+=Math.imul(E,S);c+=Math.imul(E,ca);f+=Math.imul(D,Z);a+=Math.imul(D,ka);a+=Math.imul(B,Z);c+=Math.imul(B,ka);f+=Math.imul(y,fa);a+=Math.imul(y,la);a+=Math.imul(G,fa);c+=Math.imul(G,la);f+=Math.imul(r,ea);a+=Math.imul(r,ma);a+=Math.imul(x,ea);c+=Math.imul(x,ma);f+=Math.imul(z,ha);a+=Math.imul(z,ia);a+=Math.imul(u,ha);c+=Math.imul(u,ia);f+=Math.imul(n,h);a+=Math.imul(n,ja);a+=Math.imul(C,h);c+=Math.imul(C, ja);n=k+f+((a&8191)<<13);k=c+(a>>>13)+(n>>>26);n&=67108863;f=Math.imul(d,Y);a=Math.imul(d,ga);a+=Math.imul(da,Y);c=Math.imul(da,ga);f+=Math.imul(F,S);a+=Math.imul(F,ca);a+=Math.imul(ba,S);c+=Math.imul(ba,ca);f+=Math.imul(A,Z);a+=Math.imul(A,ka);a+=Math.imul(E,Z);c+=Math.imul(E,ka);f+=Math.imul(D,fa);a+=Math.imul(D,la);a+=Math.imul(B,fa);c+=Math.imul(B,la);f+=Math.imul(y,ea);a+=Math.imul(y,ma);a+=Math.imul(G,ea);c+=Math.imul(G,ma);f+=Math.imul(r,ha);a+=Math.imul(r,ia);a+=Math.imul(x,ha);c+=Math.imul(x, ia);f+=Math.imul(z,h);a+=Math.imul(z,ja);a+=Math.imul(u,h);c+=Math.imul(u,ja);z=k+f+((a&8191)<<13);k=c+(a>>>13)+(z>>>26);z&=67108863;f=Math.imul(d,S);a=Math.imul(d,ca);a+=Math.imul(da,S);c=Math.imul(da,ca);f+=Math.imul(F,Z);a+=Math.imul(F,ka);a+=Math.imul(ba,Z);c+=Math.imul(ba,ka);f+=Math.imul(A,fa);a+=Math.imul(A,la);a+=Math.imul(E,fa);c+=Math.imul(E,la);f+=Math.imul(D,ea);a+=Math.imul(D,ma);a+=Math.imul(B,ea);c+=Math.imul(B,ma);f+=Math.imul(y,ha);a+=Math.imul(y,ia);a+=Math.imul(G,ha);c+=Math.imul(G, ia);f+=Math.imul(r,h);a+=Math.imul(r,ja);a+=Math.imul(x,h);c+=Math.imul(x,ja);r=k+f+((a&8191)<<13);k=c+(a>>>13)+(r>>>26);r&=67108863;f=Math.imul(d,Z);a=Math.imul(d,ka);a+=Math.imul(da,Z);c=Math.imul(da,ka);f+=Math.imul(F,fa);a+=Math.imul(F,la);a+=Math.imul(ba,fa);c+=Math.imul(ba,la);f+=Math.imul(A,ea);a+=Math.imul(A,ma);a+=Math.imul(E,ea);c+=Math.imul(E,ma);f+=Math.imul(D,ha);a+=Math.imul(D,ia);a+=Math.imul(B,ha);c+=Math.imul(B,ia);f+=Math.imul(y,h);a+=Math.imul(y,ja);a+=Math.imul(G,h);c+=Math.imul(G, ja);y=k+f+((a&8191)<<13);k=c+(a>>>13)+(y>>>26);y&=67108863;f=Math.imul(d,fa);a=Math.imul(d,la);a+=Math.imul(da,fa);c=Math.imul(da,la);f+=Math.imul(F,ea);a+=Math.imul(F,ma);a+=Math.imul(ba,ea);c+=Math.imul(ba,ma);f+=Math.imul(A,ha);a+=Math.imul(A,ia);a+=Math.imul(E,ha);c+=Math.imul(E,ia);f+=Math.imul(D,h);a+=Math.imul(D,ja);a+=Math.imul(B,h);c+=Math.imul(B,ja);D=k+f+((a&8191)<<13);k=c+(a>>>13)+(D>>>26);D&=67108863;f=Math.imul(d,ea);a=Math.imul(d,ma);a+=Math.imul(da,ea);c=Math.imul(da,ma);f+=Math.imul(F, ha);a+=Math.imul(F,ia);a+=Math.imul(ba,ha);c+=Math.imul(ba,ia);f+=Math.imul(A,h);a+=Math.imul(A,ja);a+=Math.imul(E,h);c+=Math.imul(E,ja);A=k+f+((a&8191)<<13);k=c+(a>>>13)+(A>>>26);A&=67108863;f=Math.imul(d,ha);a=Math.imul(d,ia);a+=Math.imul(da,ha);c=Math.imul(da,ia);f+=Math.imul(F,h);a+=Math.imul(F,ja);a+=Math.imul(ba,h);c+=Math.imul(ba,ja);F=k+f+((a&8191)<<13);k=c+(a>>>13)+(F>>>26);F&=67108863;f=Math.imul(d,h);a=Math.imul(d,ja);a+=Math.imul(da,h);c=Math.imul(da,ja);m=k+f+((a&8191)<<13);k=c+(a>>> 13)+(m>>>26);e[0]=xa;e[1]=ya;e[2]=za;e[3]=Aa;e[4]=Ba;e[5]=Ca;e[6]=Da;e[7]=Ea;e[8]=Fa;e[9]=p;e[10]=g;e[11]=n;e[12]=z;e[13]=r;e[14]=y;e[15]=D;e[16]=A;e[17]=F;e[18]=m&67108863;0!==k&&(e[19]=k,b.length++);return b};Math.imul||(E=c);d.prototype.mulTo=function(b,d){var h;h=this.length+b.length;if(10===this.length&&10===b.length)h=E(this,b,d);else if(63>h)h=c(this,b,d);else if(1024>h){d.negative=b.negative^this.negative;d.length=this.length+b.length;for(var e=0,k=h=0;k>>26)|0;h+=f>>>26;f&=67108863}d.words[k]=e;e=f}0!==e?d.words[k]=e:d.length--;h=d.strip()}else h=(new a).mulp(this,b,d);return h};a.prototype.makeRBT=function(a){for(var c=Array(a),b=d.prototype._countBits(a)-1,h=0;h>=1;return b};a.prototype.permute=function(a,c,b,d,h,e){for(var k=0;k>>=1)h++;return 1<=b))for(var d=0;db?0:b/67108864|0;return a};a.prototype.convert13b=function(a,c,b,d){for(var h=0,e=0;e>>=13, b[2*e+1]=h&8191,h>>>=13;for(e=2*c;ea);for(var c=0,b=0;b>26,c=c+(d/67108864|0),c=c+(h>>>26);this.words[b]=h&67108863}0!==c&&(this.words[b]=c,this.length++);return this};d.prototype.muln=function(a){return this.clone().imuln(a)};d.prototype.sqr=function(){return this.mul(this)};d.prototype.isqr=function(){return this.imul(this.clone())};d.prototype.pow=function(a){for(var c=Array(a.bitLength()), b=0;b>>h}if(0===c.length)return new d(1);a=this;for(b=0;b>>26-c<<26-c,d;if(0!==c){var h=0;for(d=0;d>>26-c}h&&(this.words[d]=h,this.length++)}if(0!== a){for(d=this.length-1;0<=d;d--)this.words[d+a]=this.words[d];for(d=0;d>>d<h)for(this.length-=h,e=0;e=c);e--){var k=this.words[e]|0;this.words[e]=h<<26-d|k>>>d;h=k&a}b&&0!==h&&(b.words[b.length++]=h);0===this.length&&(this.words[0]=0,this.length=1);return this.strip()};d.prototype.ishrn=function(a,c,b){m(0===this.negative);return this.iushrn(a,c,b)};d.prototype.shln=function(a){return this.clone().ishln(a)};d.prototype.ushln=function(a){return this.clone().iushln(a)};d.prototype.shrn=function(a){return this.clone().ishrn(a)}; d.prototype.ushrn=function(a){return this.clone().iushrn(a)};d.prototype.testn=function(a){m("number"===typeof a&&0<=a);var c=a%26;a=(a-c)/26;return this.length<=a?!1:!!(this.words[a]&1<>>c<a);if(0>a)return this.isubn(-a);if(0!==this.negative){if(1===this.length&&(this.words[0]|0)a);if(0>a)return this.iaddn(-a);if(0!==this.negative)return this.negative=0,this.iaddn(a),this.negative=1,this;this.words[0]-=a;if(1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(a=0;athis.words[a];a++)this.words[a]+=67108864,--this.words[a+1];return this.strip()};d.prototype.addn=function(a){return this.clone().iaddn(a)};d.prototype.subn=function(a){return this.clone().isubn(a)}; d.prototype.iabs=function(){this.negative=0;return this};d.prototype.abs=function(){return this.clone().iabs()};d.prototype._ishlnsubmul=function(a,c,b){var d;this._expand(a.length+b);var h,e=0;for(d=0;d>26)-(e/67108864|0),this.words[d+b]=h&67108863;for(;d>26,this.words[d+b]=h&67108863;if(0===e)return this.strip();m(-1===e);for(d=e=0;d>26,this.words[d]=h&67108863;this.negative=1;return this.strip()};d.prototype._wordDiv=function(a,c){var b=this.length-a.length,h=this.clone(),e=a,k=e.words[e.length-1]|0,b=26-this._countBits(k);0!==b&&(e=e.ushln(b),h.iushln(b),k=e.words[e.length-1]|0);var f=h.length-e.length,g;if("mod"!==c){g=new d(null);g.length=f+1;g.words=Array(g.length);for(var p=0;pthis.length||0>this.cmp(a)?{div:new d(0),mod:this}:1===a.length?"div"===c?{div:this.divn(a.words[0]),mod:null}:"mod"===c?{div:null,mod:new d(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new d(this.modn(a.words[0]))}: this._wordDiv(a,c)};d.prototype.div=function(a){return this.divmod(a,"div",!1).div};d.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod};d.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod};d.prototype.divRound=function(a){var c=this.divmod(a);if(c.mod.isZero())return c.div;var b=0!==c.div.negative?c.mod.isub(a):c.mod,d=a.ushrn(1);a=a.andln(1);b=b.cmp(d);return 0>b||1===a&&0===b?c.div:0!==c.div.negative?c.div.isubn(1):c.div.iaddn(1)};d.prototype.modn=function(a){m(67108863>= a);for(var c=67108864%a,b=0,d=this.length-1;0<=d;d--)b=(c*b+(this.words[d]|0))%a;return b};d.prototype.idivn=function(a){m(67108863>=a);for(var c=0,b=this.length-1;0<=b;b--)c=(this.words[b]|0)+67108864*c,this.words[b]=c/a|0,c%=a;return this.strip()};d.prototype.divn=function(a){return this.clone().idivn(a)};d.prototype.egcd=function(a){m(0===a.negative);m(!a.isZero());var c=this,b=a.clone(),c=0!==c.negative?c.umod(a):c.clone();a=new d(1);for(var h=new d(0),e=new d(0),k=new d(1),f=0;c.isEven()&&b.isEven();)c.iushrn(1), b.iushrn(1),++f;for(var g=b.clone(),p=c.clone();!c.isZero();){for(var n=0,l=1;0===(c.words[0]&l)&&26>n;++n,l<<=1);if(0n;++n,l<<=1);if(0f;++f,g<<=1);if(0f;++f,g<<=1);if(0c.cmpn(0)&&c.iadd(a);return c};d.prototype.gcd= function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var c=this.clone();a=a.clone();c.negative=0;for(var b=a.negative=0;c.isEven()&&a.isEven();b++)c.iushrn(1),a.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;a.isEven();)a.iushrn(1);var d=c.cmp(a);if(0>d)d=c,c=a,a=d;else if(0===d||0===a.cmpn(1))break;c.isub(a)}while(1);return a.iushln(b)};d.prototype.invm=function(a){return this.egcd(a).a.umod(a)};d.prototype.isEven=function(){return 0===(this.words[0]&1)};d.prototype.isOdd= function(){return 1===(this.words[0]&1)};d.prototype.andln=function(a){return this.words[0]&a};d.prototype.bincn=function(a){m("number"===typeof a);var c=a%26;a=(a-c)/26;c=1<>>26,b=b&67108863;this.words[a]=b}0!==c&&(this.words[a]=c,this.length++);return this};d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]};d.prototype.cmpn=function(a){var c=0> a;if(0!==this.negative&&!c)return-1;if(0===this.negative&&c)return 1;this.strip();1=a,"Number is too big"),c=this.words[0]|0,a=c===a?0:ca.length)return 1;if(this.lengthh&&(c=1);break}}return c};d.prototype.gtn=function(a){return 1===this.cmpn(a)};d.prototype.gt=function(a){return 1===this.cmp(a)};d.prototype.gten=function(a){return 0<=this.cmpn(a)};d.prototype.gte=function(a){return 0<=this.cmp(a)};d.prototype.ltn=function(a){return-1===this.cmpn(a)};d.prototype.lt=function(a){return-1===this.cmp(a)};d.prototype.lten=function(a){return 0>=this.cmpn(a)};d.prototype.lte=function(a){return 0>=this.cmp(a)}; d.prototype.eqn=function(a){return 0===this.cmpn(a)};d.prototype.eq=function(a){return 0===this.cmp(a)};d.red=function(a){return new B(a)};d.prototype.toRed=function(a){m(!this.red,"Already a number in reduction context");m(0===this.negative,"red works only with positives");return a.convertTo(this)._forceRed(a)};d.prototype.fromRed=function(){m(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};d.prototype._forceRed=function(a){this.red=a;return this}; d.prototype.forceRed=function(a){m(!this.red,"Already a number in reduction context");return this._forceRed(a)};d.prototype.redAdd=function(a){m(this.red,"redAdd works only with red numbers");return this.red.add(this,a)};d.prototype.redIAdd=function(a){m(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,a)};d.prototype.redSub=function(a){m(this.red,"redSub works only with red numbers");return this.red.sub(this,a)};d.prototype.redISub=function(a){m(this.red,"redISub works only with red numbers"); return this.red.isub(this,a)};d.prototype.redShl=function(a){m(this.red,"redShl works only with red numbers");return this.red.shl(this,a)};d.prototype.redMul=function(a){m(this.red,"redMul works only with red numbers");this.red._verify2(this,a);return this.red.mul(this,a)};d.prototype.redIMul=function(a){m(this.red,"redMul works only with red numbers");this.red._verify2(this,a);return this.red.imul(this,a)};d.prototype.redSqr=function(){m(this.red,"redSqr works only with red numbers");this.red._verify1(this); return this.red.sqr(this)};d.prototype.redISqr=function(){m(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};d.prototype.redSqrt=function(){m(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};d.prototype.redInvm=function(){m(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};d.prototype.redNeg=function(){m(this.red,"redNeg works only with red numbers"); this.red._verify1(this);return this.red.neg(this)};d.prototype.redPow=function(a){m(this.red&&!a.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,a)};var F={k256:null,p224:null,p192:null,p25519:null};h.prototype._tmp=function(){var a=new d(null);a.words=Array(Math.ceil(this.n/13));return a};h.prototype.ireduce=function(a){var c;do this.split(a,this.tmp),a=this.imulK(a),a=a.iadd(this.tmp),c=a.bitLength();while(c>this.n);c=c=a.length)a.words[0]=0,a.length=1;else{b=a.words[9];c.words[c.length++]=b&4194303;for(d=10;d>>22;b=h}b>>>=22;a.words[d-10]=b;a.length=0===b&&10>>26;a.words[b]=d}0!==c&&(a.words[a.length++]=c);return a};d._prime=function(a){if(F[a])return F[a]; var c;if("k256"===a)c=new l;else if("p224"===a)c=new C;else if("p192"===a)c=new u;else if("p25519"===a)c=new r;else throw Error("Unknown prime "+a);return F[a]=c};B.prototype._verify1=function(a){m(0===a.negative,"red works only with positives");m(a.red,"red works only with red numbers")};B.prototype._verify2=function(a,c){m(0===(a.negative|c.negative),"red works only with positives");m(a.red&&a.red===c.red,"red works only with red numbers")};B.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this): a.umod(this.m)._forceRed(this)};B.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)};B.prototype.add=function(a,c){this._verify2(a,c);var b=a.add(c);0<=b.cmp(this.m)&&b.isub(this.m);return b._forceRed(this)};B.prototype.iadd=function(a,c){this._verify2(a,c);var b=a.iadd(c);0<=b.cmp(this.m)&&b.isub(this.m);return b};B.prototype.sub=function(a,c){this._verify2(a,c);var b=a.sub(c);0>b.cmpn(0)&&b.iadd(this.m);return b._forceRed(this)};B.prototype.isub=function(a,c){this._verify2(a, c);var b=a.isub(c);0>b.cmpn(0)&&b.iadd(this.m);return b};B.prototype.shl=function(a,c){this._verify1(a);return this.imod(a.ushln(c))};B.prototype.imul=function(a,c){this._verify2(a,c);return this.imod(a.imul(c))};B.prototype.mul=function(a,c){this._verify2(a,c);return this.imod(a.mul(c))};B.prototype.isqr=function(a){return this.imul(a,a.clone())};B.prototype.sqr=function(a){return this.mul(a,a)};B.prototype.sqrt=function(a){if(a.isZero())return a.clone();var c=this.m.andln(3);m(1===c%2);if(3===c)return c= this.m.add(new d(1)).iushrn(2),this.pow(a,c);for(var b=this.m.subn(1),h=0;!b.isZero()&&0===b.andln(1);)h++,b.iushrn(1);m(!b.isZero());for(var c=(new d(1)).toRed(this),e=c.redNeg(),k=this.m.subn(1).iushrn(1),f=this.m.bitLength(),f=(new d(2*f*f)).toRed(this);0!==this.pow(f,k).cmp(e);)f.redIAdd(e);k=this.pow(f,b);e=this.pow(a,b.addn(1).iushrn(1));a=this.pow(a,b);for(b=h;0!==a.cmp(c);){f=a;for(h=0;0!==f.cmp(c);h++)f=f.redSqr();m(h>g&1;e!==b[0]&&(e=this.sqr(e));if(0=== m&&0===k)f=0;else if(k<<=1,k|=m,f++,4===f||0===h&&0===g)e=this.mul(e,b[k]),k=f=0}g=26}return e};B.prototype.convertTo=function(a){var c=a.umod(this.m);return c===a?c.clone():c};B.prototype.convertFrom=function(a){a=a.clone();a.red=null;return a};d.mont=function(a){return new G(a)};e(G,B);G.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))};G.prototype.convertFrom=function(a){a=this.imod(a.mul(this.rinv));a.red=null;return a};G.prototype.imul=function(a,c){if(a.isZero()||c.isZero())return a.words[0]= 0,a.length=1,a;var b=a.imul(c),d=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),d=b=b.isub(d).iushrn(this.shift);0<=b.cmp(this.m)?d=b.isub(this.m):0>b.cmpn(0)&&(d=b.iadd(this.m));return d._forceRed(this)};G.prototype.mul=function(a,c){if(a.isZero()||c.isZero())return(new d(0))._forceRed(this);var b=a.mul(c),h=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=b=b.isub(h).iushrn(this.shift);0<=b.cmp(this.m)?h=b.isub(this.m):0>b.cmpn(0)&&(h=b.iadd(this.m));return h._forceRed(this)}; G.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}})("undefined"===typeof l||l,this)},{}],166:[function(b,l,g){(function(g){function f(b,d){var c,a;a=m(d);c=a.toRed(e.mont(d.modulus)).redPow(new e(d.publicExponent)).fromRed();a=a.invm(d.modulus);var h=d.modulus.byteLength();e.mont(d.modulus);c=(new e(b)).mul(c).umod(d.modulus);var f=c.toRed(e.mont(d.prime1)),l=c.toRed(e.mont(d.prime2)),u=d.coefficient,r=d.prime1;c=d.prime2;f=f.redPow(d.exponent1);l=l.redPow(d.exponent2); f=f.fromRed();l=l.fromRed();u=f.isub(l).imul(u).umod(r);u.imul(c);l.iadd(u);return new g(l.imul(a).umod(d.modulus).toArray(!1,h))}function m(b){for(var k=b.modulus.byteLength(),c=new e(d(k));0<=c.cmp(b.modulus)||!c.umod(b.prime1)||!c.umod(b.prime2);)c=new e(d(k));return c}var e=b("bn.js"),d=b("randombytes");l.exports=f;f.getr=m}).call(this,b("buffer").Buffer)},{"bn.js":165,buffer:128,randombytes:323}],167:[function(b,l,g){g.version=b("../package.json").version;g.utils=b("./elliptic/utils");g.rand= b("brorand");g.hmacDRBG=b("./elliptic/hmac-drbg");g.curve=b("./elliptic/curve");g.curves=b("./elliptic/curves");g.ec=b("./elliptic/ec");g.eddsa=b("./elliptic/eddsa")},{"../package.json":190,"./elliptic/curve":170,"./elliptic/curves":173,"./elliptic/ec":174,"./elliptic/eddsa":177,"./elliptic/hmac-drbg":180,"./elliptic/utils":182,brorand:183}],168:[function(b,l,g){function n(c,a){this.type=c;this.p=new m(a.p,16);this.red=a.prime?m.red(a.prime):m.mont(this.p);this.zero=(new m(0)).toRed(this.red);this.one= (new m(1)).toRed(this.red);this.two=(new m(2)).toRed(this.red);this.n=a.n&&new m(a.n,16);this.g=a.g&&this.pointFromJSON(a.g,a.gRed);this._wnafT1=Array(4);this._wnafT2=Array(4);this._wnafT3=Array(4);this._wnafT4=Array(4)}function f(c,a){this.curve=c;this.type=a;this.precomputed=null}var m=b("bn.js"),e=b("../../elliptic").utils,d=e.getNAF,p=e.getJSF,k=e.assert;l.exports=n;n.prototype.point=function(){throw Error("Not implemented");};n.prototype.validate=function(){throw Error("Not implemented");};n.prototype._fixedNafMul= function(c,a){k(c.precomputed);for(var b=c._getDoubles(),e=d(a,1),f=(1<=p;a--)m=(m<<1)+e[a];g.push(m)}for(var e=this.jpoint(null,null,null),n=this.jpoint(null,null,null);0g)break;var p=b[g];k(0!==p);f="affine"===c.type?0>1]):f.mixedAdd(e[-p-1>>1].neg()):0>1]):f.add(e[-p-1>>1].neg())}return"affine"===c.type?f.toP():f};n.prototype._wnafMulAdd=function(c,a,b,e){for(var k=this._wnafT1,f=this._wnafT2,g=this._wnafT3,m=0,n=0;nn)break;for(c=0;c>1]:0>m&&(l=f[c][-m-1>>1].neg()),a="affine"===l.type?a.mixedAdd(l):a.add(l))}for(n=0;n=Math.ceil((c.bitLength()+1)/a.step):!1};f.prototype._getDoubles= function(c,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var b=[this],d=this,e=0;e":""};f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)};f.prototype._extDbl=function(){var b=this.x.redSqr(),c=this.y.redSqr(),a=this.z.redSqr(),a=a.redIAdd(a),d=this.curve._mulA(b), e=this.x.redAdd(this.y).redSqr().redISub(b).redISub(c),b=d.redAdd(c),a=b.redSub(a),f=d.redSub(c),c=e.redMul(a),d=b.redMul(f),e=e.redMul(f),b=a.redMul(b);return this.curve.point(c,d,b,e)};f.prototype._projDbl=function(){var b=this.x.redAdd(this.y).redSqr(),c=this.x.redSqr(),a=this.y.redSqr(),d;if(this.curve.twisted){d=this.curve._mulA(c);var e=d.redAdd(a);if(this.zOne)b=b.redSub(c).redSub(a).redMul(e.redSub(this.curve.two)),c=e.redMul(d.redSub(a)),d=e.redSqr().redSub(e).redSub(e);else{var f=this.z.redSqr(), f=e.redSub(f).redISub(f),b=b.redSub(c).redISub(a).redMul(f),c=e.redMul(d.redSub(a));d=e.redMul(f)}}else d=c.redAdd(a),f=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=d.redSub(f).redSub(f),b=this.curve._mulC(b.redISub(d)).redMul(f),c=this.curve._mulC(d).redMul(c.redISub(a)),d=d.redMul(f);return this.curve.point(b,c,d)};f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};f.prototype._extAdd=function(b){var c=this.y.redSub(this.x).redMul(b.y.redSub(b.x)), a=this.y.redAdd(this.x).redMul(b.y.redAdd(b.x)),d=this.t.redMul(this.curve.dd).redMul(b.t),e=this.z.redMul(b.z.redAdd(b.z)),f=a.redSub(c);b=e.redSub(d);d=e.redAdd(d);e=a.redAdd(c);c=f.redMul(b);a=d.redMul(e);f=f.redMul(e);b=b.redMul(d);return this.curve.point(c,a,b,f)};f.prototype._projAdd=function(b){var c=this.z.redMul(b.z),a=c.redSqr(),d=this.x.redMul(b.x),e=this.y.redMul(b.y),f=this.curve.d.redMul(d).redMul(e),g=a.redSub(f),a=a.redAdd(f);b=this.x.redAdd(this.y).redMul(b.x.redAdd(b.y)).redISub(d).redISub(e); b=c.redMul(g).redMul(b);this.curve.twisted?(c=c.redMul(a).redMul(e.redSub(this.curve._mulA(d))),g=g.redMul(a)):(c=c.redMul(a).redMul(e.redSub(d)),g=this.curve._mulC(g).redMul(a));return this.curve.point(b,c,g)};f.prototype.add=function(b){return this.isInfinity()?b:b.isInfinity()?this:this.curve.extended?this._extAdd(b):this._projAdd(b)};f.prototype.mul=function(b){return this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve._wnafMul(this,b)};f.prototype.mulAdd=function(b,c,a){return this.curve._wnafMulAdd(1, [this,c],[b,a],2)};f.prototype.normalize=function(){if(this.zOne)return this;var b=this.z.redInvm();this.x=this.x.redMul(b);this.y=this.y.redMul(b);this.t&&(this.t=this.t.redMul(b));this.z=this.curve.one;this.zOne=!0;return this};f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};f.prototype.getX=function(){this.normalize();return this.x.fromRed()};f.prototype.getY=function(){this.normalize();return this.y.fromRed()};f.prototype.eq=function(b){return this=== b||0===this.getX().cmp(b.getX())&&0===this.getY().cmp(b.getY())};f.prototype.toP=f.prototype.normalize;f.prototype.mixedAdd=f.prototype.add},{"../../elliptic":167,"../curve":170,"bn.js":165,inherits:326}],170:[function(b,l,g){g.base=b("./base");g["short"]=b("./short");g.mont=b("./mont");g.edwards=b("./edwards")},{"./base":168,"./edwards":169,"./mont":171,"./short":172}],171:[function(b,l,g){function n(b){d.call(this,"mont",b);this.a=(new m(b.a,16)).toRed(this.red);this.b=(new m(b.b,16)).toRed(this.red); this.i4=(new m(4)).toRed(this.red).redInvm();this.two=(new m(2)).toRed(this.red);this.a24=this.i4.redMul(this.a.redAdd(this.two))}function f(b,c,a){d.BasePoint.call(this,b,"projective");null===c&&null===a?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new m(c,16),this.z=new m(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}g=b("../curve");var m=b("bn.js"),e=b("inherits"),d=g.base,p=b("../../elliptic").utils;e(n,d);l.exports=n;n.prototype.validate= function(b){b=b.normalize().x;var c=b.redSqr();b=c.redMul(b).redAdd(c.redMul(this.a)).redAdd(b);return 0===b.redSqrt().redSqr().cmp(b)};e(f,d.BasePoint);n.prototype.decodePoint=function(b,c){return this.point(p.toArray(b,c),1)};n.prototype.point=function(b,c){return new f(this,b,c)};n.prototype.pointFromJSON=function(b){return f.fromJSON(this,b)};f.prototype.precompute=function(){};f.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};f.fromJSON=function(b,c){return new f(b, c[0],c[1]||b.one)};f.prototype.inspect=function(){return this.isInfinity()?"":""};f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};f.prototype.dbl=function(){var b=this.x.redAdd(this.z).redSqr(),c=this.x.redSub(this.z).redSqr(),a=b.redSub(c),b=b.redMul(c),c=a.redMul(c.redAdd(this.curve.a24.redMul(a)));return this.curve.point(b,c)};f.prototype.add=function(){throw Error("Not supported on Montgomery curve"); };f.prototype.diffAdd=function(b,c){var a=this.x.redAdd(this.z),d=this.x.redSub(this.z),e=b.x.redAdd(b.z),a=b.x.redSub(b.z).redMul(a),e=e.redMul(d),d=c.z.redMul(a.redAdd(e).redSqr()),a=c.x.redMul(a.redISub(e).redSqr());return this.curve.point(d,a)};f.prototype.mul=function(b){var c=b.clone();b=this;for(var a=this.curve.point(null,null),d=[];0!==c.cmpn(0);c.iushrn(1))d.push(c.andln(1));for(c=d.length-1;0<=c;c--)0===d[c]?(b=b.diffAdd(a,this),a=a.dbl()):(a=b.diffAdd(a,this),b=b.dbl());return a};f.prototype.mulAdd= function(){throw Error("Not supported on Montgomery curve");};f.prototype.eq=function(b){return 0===this.getX().cmp(b.getX())};f.prototype.normalize=function(){this.x=this.x.redMul(this.z.redInvm());this.z=this.curve.one;return this};f.prototype.getX=function(){this.normalize();return this.x.fromRed()}},{"../../elliptic":167,"../curve":170,"bn.js":165,inherits:326}],172:[function(b,l,g){function n(c){p.call(this,"short",c);this.a=(new d(c.a,16)).toRed(this.red);this.b=(new d(c.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(c);this._endoWnafT1=Array(4);this._endoWnafT2=Array(4)}function f(c,a,b,e){p.BasePoint.call(this,c,"affine");null===a&&null===b?(this.y=this.x=null,this.inf=!0):(this.x=new d(a,16),this.y=new d(b,16),e&&(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 m(c,a,b,e){p.BasePoint.call(this,c,"jacobian");null===a&&null===b&&null===e?(this.y=this.x=this.curve.one,this.z=new d(0)):(this.x=new d(a,16),this.y=new d(b,16),this.z=new d(e,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}g=b("../curve");var e=b("../../elliptic"),d=b("bn.js");b=b("inherits");var p=g.base,k=e.utils.assert;b(n,p);l.exports= n;n.prototype._getEndomorphism=function(c){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var a,b;c.beta?a=(new d(c.beta,16)).toRed(this.red):(a=this._getEndoRoots(this.p),a=0>a[0].cmp(a[1])?a[0]:a[1],a=a.toRed(this.red));c.lambda?b=new d(c.lambda,16):(b=this._getEndoRoots(this.n),0===this.g.mul(b[0]).x.cmp(this.g.x.redMul(a))?b=b[0]:(b=b[1],k(0===this.g.mul(b).x.cmp(this.g.x.redMul(a)))));c=c.basis?c.basis.map(function(a){return{a:new d(a.a,16),b:new d(a.b,16)}}):this._getEndoBasis(b);return{beta:a, lambda:b,basis:c}}};n.prototype._getEndoRoots=function(c){var a=c===this.p?this.red:d.mont(c),b=(new d(2)).toRed(a).redInvm();c=b.redNeg();b=(new d(3)).toRed(a).redNeg().redSqrt().redMul(b);a=c.redAdd(b).fromRed();c=c.redSub(b).fromRed();return[a,c]};n.prototype._getEndoBasis=function(c){for(var a=this.n.ushrn(Math.floor(this.n.bitLength()/2)),b=this.n.clone(),e=new d(1),f=new d(0),k=new d(0),g=new d(1),p,m,n,l,D,A,E=0,F;0!==c.cmpn(0);){var q=b.div(c);F=b.sub(q.mul(c));D=k.sub(q.mul(e));q=g.sub(q.mul(f)); if(!n&&0>F.cmp(a))p=A.neg(),m=e,n=F.neg(),l=D;else if(n&&2===++E)break;A=F;b=c;c=F;k=e;e=D;g=f;f=q}a=F.neg();A=n.sqr().add(l.sqr());0<=a.sqr().add(D.sqr()).cmp(A)&&(a=p,D=m);n.negative&&(n=n.neg(),l=l.neg());a.negative&&(a=a.neg(),D=D.neg());return[{a:n,b:l},{a:a,b:D}]};n.prototype._endoSplit=function(c){var a=this.endo.basis,b=a[0],d=a[1],e=d.b.mul(c).divRound(this.n),f=b.b.neg().mul(c).divRound(this.n),a=e.mul(b.a),k=f.mul(d.a),b=e.mul(b.b),d=f.mul(d.b);c=c.sub(a).sub(k);a=b.add(d).neg();return{k1:c, k2:a}};n.prototype.pointFromX=function(c,a){c=new d(c,16);c.red||(c=c.toRed(this.red));var b=c.redSqr().redMul(c).redIAdd(c.redMul(this.a)).redIAdd(this.b),e=b.redSqrt();if(0!==e.redSqr().redSub(b).cmp(this.zero))throw Error("invalid point");b=e.fromRed().isOdd();if(a&&!b||!a&&b)e=e.redNeg();return this.point(c,e)};n.prototype.validate=function(c){if(c.inf)return!0;var a=c.x;c=c.y;var b=this.a.redMul(a),a=a.redSqr().redMul(a).redIAdd(b).redIAdd(this.b);return 0===c.redSqr().redISub(a).cmpn(0)};n.prototype._endoWnafMulAdd= function(c,a){for(var b=this._endoWnafT1,d=this._endoWnafT2,e=0;e":""};f.prototype.isInfinity=function(){return this.inf};f.prototype.add=function(c){if(this.inf)return c;if(c.inf)return this;if(this.eq(c))return this.dbl();if(this.neg().eq(c)||0===this.x.cmp(c.x))return this.curve.point(null,null);var a=this.y.redSub(c.y);0!==a.cmpn(0)&&(a=a.redMul(this.x.redSub(c.x).redInvm()));c=a.redSqr().redISub(this.x).redISub(c.x); a=a.redMul(this.x.redSub(c)).redISub(this.y);return this.curve.point(c,a)};f.prototype.dbl=function(){if(this.inf)return this;var c=this.y.redAdd(this.y);if(0===c.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,b=this.x.redSqr(),c=c.redInvm(),b=b.redAdd(b).redIAdd(b).redIAdd(a).redMul(c),a=b.redSqr().redISub(this.x.redAdd(this.x)),b=b.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,b)};f.prototype.getX=function(){return this.x.fromRed()};f.prototype.getY=function(){return this.y.fromRed()}; f.prototype.mul=function(c){c=new d(c,16);return this._hasDoubles(c)?this.curve._fixedNafMul(this,c):this.curve.endo?this.curve._endoWnafMulAdd([this],[c]):this.curve._wnafMul(this,c)};f.prototype.mulAdd=function(c,a,b){a=[this,a];c=[c,b];return this.curve.endo?this.curve._endoWnafMulAdd(a,c):this.curve._wnafMulAdd(1,a,c,2)};f.prototype.eq=function(c){return this===c||this.inf===c.inf&&(this.inf||0===this.x.cmp(c.x)&&0===this.y.cmp(c.y))};f.prototype.neg=function(c){if(this.inf)return this;var a= this.curve.point(this.x,this.y.redNeg());if(c&&this.precomputed){c=this.precomputed;var b=function(a){return a.neg()};a.precomputed={naf:c.naf&&{wnd:c.naf.wnd,points:c.naf.points.map(b)},doubles:c.doubles&&{step:c.doubles.step,points:c.doubles.points.map(b)}}}return a};f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)};b(m,p.BasePoint);n.prototype.jpoint=function(c,a,b){return new m(this,c,a,b)};m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null, null);var c=this.z.redInvm(),a=c.redSqr(),b=this.x.redMul(a),c=this.y.redMul(a).redMul(c);return this.curve.point(b,c)};m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};m.prototype.add=function(c){if(this.isInfinity())return c;if(c.isInfinity())return this;var a=c.z.redSqr(),b=this.z.redSqr(),d=this.x.redMul(a),e=c.x.redMul(b),a=this.y.redMul(a.redMul(c.z)),b=c.y.redMul(b.redMul(this.z)),e=d.redSub(e),b=a.redSub(b);if(0===e.cmpn(0))return 0!==b.cmpn(0)?this.curve.jpoint(null, null,null):this.dbl();var f=e.redSqr(),k=f.redMul(e),f=d.redMul(f),d=b.redSqr().redIAdd(k).redISub(f).redISub(f),a=b.redMul(f.redISub(d)).redISub(a.redMul(k));c=this.z.redMul(c.z).redMul(e);return this.curve.jpoint(d,a,c)};m.prototype.mixedAdd=function(c){if(this.isInfinity())return c.toJ();if(c.isInfinity())return this;var a=this.z.redSqr(),b=this.x,d=c.x.redMul(a),e=this.y;c=c.y.redMul(a).redMul(this.z);d=b.redSub(d);c=e.redSub(c);if(0===d.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null, null):this.dbl();var f=d.redSqr(),a=f.redMul(d),f=b.redMul(f),b=c.redSqr().redIAdd(a).redISub(f).redISub(f),e=c.redMul(f.redISub(b)).redISub(e.redMul(a)),d=this.z.redMul(d);return this.curve.jpoint(b,e,d)};m.prototype.dblp=function(c){if(0===c||this.isInfinity())return this;if(!c)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var a=this,b=0;b":""};m.prototype.isInfinity=function(){return 0=== this.z.cmpn(0)}},{"../../elliptic":167,"../curve":170,"bn.js":165,inherits:326}],173:[function(b,l,g){function n(b){this.curve="short"===b.type?new e.curve["short"](b):"edwards"===b.type?new e.curve.edwards(b):new e.curve.mont(b);this.g=this.curve.g;this.n=this.curve.n;this.hash=b.hash;d(this.g.validate(),"Invalid curve");d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(b,c){Object.defineProperty(m,b,{configurable:!0,enumerable:!0,get:function(){var a=new n(c);Object.defineProperty(m, b,{configurable:!0,enumerable:!0,value:a});return a}})}var m=g;l=b("hash.js");var e=b("../elliptic"),d=e.utils.assert;m.PresetCurve=n;f("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:l.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}); f("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:l.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});f("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:l.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});f("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:l.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"]}); f("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:l.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"]});f("curve25519", {type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:l.sha256,gRed:!1,g:["9"]});f("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:l.sha256, gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var p;try{p=b("./precomputed/secp256k1")}catch(k){p=void 0}f("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:l.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee", lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",p]})},{"../elliptic":167,"./precomputed/secp256k1":181,"hash.js":184}],174:[function(b,l,g){function n(b){if(!(this instanceof n))return new n(b);"string"===typeof b&&(e(m.curves.hasOwnProperty(b),"Unknown curve "+b),b=m.curves[b]);b instanceof m.curves.PresetCurve&&(b={curve:b});this.curve=b.curve.curve;this.n=this.curve.n;this.nh=this.n.ushrn(1);this.g=this.curve.g;this.g=b.curve.g;this.g.precompute(b.curve.n.bitLength()+1);this.hash=b.hash||b.curve.hash}var f=b("bn.js"),m=b("../../elliptic"),e=m.utils.assert,d=b("./key"),p=b("./signature");l.exports=n;n.prototype.keyPair=function(b){return new d(this,b)};n.prototype.keyFromPrivate= function(b,c){return d.fromPrivate(this,b,c)};n.prototype.keyFromPublic=function(b,c){return d.fromPublic(this,b,c)};n.prototype.genKeyPair=function(b){b||(b={});b=new m.hmacDRBG({hash:this.hash,pers:b.pers,entropy:b.entropy||m.rand(this.hash.hmacStrength),nonce:this.n.toArray()});var c=this.n.byteLength(),a=this.n.sub(new f(2));do{var d=new f(b.generate(c));if(!(0=l.cmpn(1)|| 0<=l.cmp(g))){var B=this.g.mul(l);if(!B.isInfinity()){var G=B.getX();a=G.umod(this.n);if(0!==a.cmpn(0)&&(l=l.invm(this.n).mul(a.mul(c.getPrivate()).iadd(b)),l=l.umod(this.n),0!==l.cmpn(0)))return b=(B.getY().isOdd()?1:0)|(0!==G.cmp(a)?2:0),d.canonical&&0d.cmpn(1)||0<=d.cmp(this.n)||0>c.cmpn(1)|| 0<=c.cmp(this.n))return!1;c=c.invm(this.n);b=c.mul(b).umod(this.n);c=c.mul(d).umod(this.n);a=this.g.mulAdd(b,a.getPublic(),c);return a.isInfinity()?!1:0===a.getX().umod(this.n).cmp(d)};n.prototype.recoverPubKey=function(b,c,a,d){e((3&a)===a,"The recovery param is more than two bits");c=new p(c,d);d=this.n;var g=new f(b);b=c.r;var m=c.s,n=a&1;a>>=1;if(0<=b.cmp(this.curve.p.umod(this.curve.n))&&a)throw Error("Unable to find sencond key candinate");b=a?this.curve.pointFromX(b.add(this.curve.n),n):this.curve.pointFromX(b, n);a=d.sub(g);c=c.r.invm(d);return this.g.mulAdd(a,b,m).mul(c)};n.prototype.getKeyRecoveryParam=function(b,c,a,d){c=new p(c,d);if(null!==c.recoveryParam)return c.recoveryParam;for(d=0;4>d;d++){var e;try{e=this.recoverPubKey(b,c,d)}catch(f){continue}if(e.eq(a))return d}throw Error("Unable to find valid recovery factor");}},{"../../elliptic":167,"./key":175,"./signature":176,"bn.js":165}],175:[function(b,l,g){function n(b,e){this.ec=b;this.pub=this.priv=null;e.priv&&this._importPrivate(e.priv,e.privEnc); e.pub&&this._importPublic(e.pub,e.pubEnc)}var f=b("bn.js");l.exports=n;n.fromPublic=function(b,e,d){return e instanceof n?e:new n(b,{pub:e,pubEnc:d})};n.fromPrivate=function(b,e,d){return e instanceof n?e:new n(b,{priv:e,privEnc:d})};n.prototype.validate=function(){var b=this.getPublic();return b.isInfinity()?{result:!1,reason:"Invalid public key"}:b.validate()?b.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(b,e){"string"===typeof b&&(e=b,b=null);this.pub||(this.pub=this.ec.g.mul(this.priv));return e?this.pub.encode(e,b):this.pub};n.prototype.getPrivate=function(b){return"hex"===b?this.priv.toString(16,2):this.priv};n.prototype._importPrivate=function(b,e){this.priv=new f(b,e||16);this.priv=this.priv.umod(this.ec.curve.n)};n.prototype._importPublic=function(b,e){this.pub=b.x||b.y?this.ec.curve.point(b.x,b.y):this.ec.curve.decodePoint(b,e)};n.prototype.derive=function(b){return b.mul(this.priv).getX()}; n.prototype.sign=function(b,e,d){return this.ec.sign(b,this,e,d)};n.prototype.verify=function(b,e){return this.ec.verify(b,e,this)};n.prototype.inspect=function(){return""}},{"bn.js":165}],176:[function(b,l,g){function n(a,b){if(a instanceof n)return a;this._importDER(a,b)||(c(a.r&&a.s,"Signature without r or s"),this.r=new p(a.r,16),this.s=new p(a.s,16),this.recoveryParam=void 0===a.recoveryParam?null:a.recoveryParam)} function f(){this.place=0}function m(a,c){var b=a[c.place++];if(!(b&128))return b;for(var b=b&15,d=0,e=0,f=c.place;ec)){var b=1+(Math.log(c)/Math.LN2>>>3);for(a.push(b|128);--b;)a.push(c>>>(b<<3)&255)}a.push(c)}var p=b("bn.js"),k=b("../../elliptic").utils,c=k.assert;l.exports=n;n.prototype._importDER=function(a,c){a=k.toArray(a,c);var b= new f;if(48!==a[b.place++]||m(a,b)+b.place!==a.length||2!==a[b.place++])return!1;var d=m(a,b),e=a.slice(b.place,d+b.place);b.place+=d;if(2!==a[b.place++])return!1;d=m(a,b);if(a.length!==d+b.place)return!1;b=a.slice(b.place,d+b.place);0===e[0]&&e[1]&128&&(e=e.slice(1));0===b[0]&&b[1]&128&&(b=b.slice(1));this.r=new p(e);this.s=new p(b);this.recoveryParam=null;return!0};n.prototype.toDER=function(a){var c=this.r.toArray(),b=this.s.toArray();c[0]&128&&(c=[0].concat(c));b[0]&128&&(b=[0].concat(b));c=e(c); for(b=e(b);!(b[0]||b[1]&128);)b=b.slice(1);var f=[2];d(f,c.length);f=f.concat(c);f.push(2);d(f,b.length);c=f.concat(b);b=[48];d(b,c.length);b=b.concat(c);return k.encode(b,a)}},{"../../elliptic":167,"bn.js":165}],177:[function(b,l,g){function n(a){d("ed25519"===a,"only tested with ed25519 so far");if(!(this instanceof n))return new n(a);this.curve=a=m.curves[a].curve;this.g=a.g;this.g.precompute(a.n.bitLength()+1);this.pointClass=a.point().constructor;this.encodingLength=Math.ceil(a.n.bitLength()/ 8);this.hash=f.sha512}var f=b("hash.js"),m=b("../../elliptic"),e=m.utils,d=e.assert,p=e.parseBytes,k=b("./key"),c=b("./signature");l.exports=n;n.prototype.sign=function(a,c){a=p(a);var b=this.keyFromSecret(c),d=this.hashInt(b.messagePrefix(),a),e=this.g.mul(d),f=this.encodePoint(e),b=this.hashInt(f,b.pubBytes(),a).mul(b.priv()),d=d.add(b).umod(this.curve.n);return this.makeSignature({R:e,S:d,Rencoded:f})};n.prototype.verify=function(a,c,b){a=p(a);c=this.makeSignature(c);b=this.keyFromPublic(b);a= this.hashInt(c.Rencoded(),b.pubBytes(),a);var d=this.g.mul(c.S());return c.R().add(b.pub().mul(a)).eq(d)};n.prototype.hashInt=function(){for(var a=this.hash(),c=0;c=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._init(f,k,b)}var f=b("hash.js"),m=b("../elliptic").utils,e=m.assert;l.exports=n;n.prototype._init=function(b,e,f){b=b.concat(e).concat(f);this.K=Array(this.outLen/8);this.V=Array(this.outLen/8);for(e=0;e=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits");this._update(b.concat(k|| []));this.reseed=1};n.prototype.generate=function(b,e,f,c){if(this.reseed>this.reseedInterval)throw Error("Reseed is required");"string"!==typeof e&&(c=f,f=e,e=null);f&&(f=m.toArray(f,c),this._update(f));for(c=[];c.length>8,c=c&255;a?f.push(a,c):f.push(c)}else if("hex"===d)for(b=b.replace(/[^a-z0-9]+/ig, ""),0!==b.length%2&&(b="0"+b),k=0;k(k>>1)-1?(k>>1)-a:a,c.isubn(a)):a=0;f.push(a);a=0!==c.cmpn(0)&&0===c.andln(k-1)?d+1:1;for(var h=1;h=this._delta8){b=this.pending;var g=b.length%this._delta8;this.pending=b.slice(b.length-g,b.length);0===this.pending.length&&(this.pending=null);b=f.join32(b,0,b.length-g,this.endian);for(g=0;g>>24&255;d[k++]=b>>>16&255;d[k++]=b>>>8&255;d[k++]=b&255}else for(d[k++]=b&255,d[k++]=b>>>8&255,d[k++]=b>>>16&255,d[k++]=b>>>24&255,d[k++]=0,d[k++]=0,d[k++]=0,d[k++]=0,f=8;fthis.blockSize&&(b=(new this.Hash).update(b).digest());m(b.length<=this.blockSize);for(var d=b.length;d=a?c^b^d:31>=a?c&b|~c&d:47>=a?(c|~b)^d:63>=a?c& d|b&~d:c^(b|~d)}b=b("../hash");var m=b.utils,e=m.rotl32,d=m.sum32,p=m.sum32_3,k=m.sum32_4,c=b.common.BlockHash;m.inherits(n,c);g.ripemd160=n;n.blockSize=512;n.outSize=160;n.hmacStrength=192;n.padLength=64;n.prototype._update=function(c,b){for(var g=this.h[0],m=this.h[1],n=this.h[2],l=this.h[3],D=this.h[4],A=g,E=m,F=n,q=l,v=D,w=0;80>w;w++)var J=d(e(k(g,f(w,m,n,l),c[a[w]+b],15>=w?0:31>=w?1518500249:47>=w?1859775393:63>=w?2400959708:2840853838),z[w]),D),g=D,D=l,l=e(n,10),n=m,m=J,J=d(e(k(A,f(79-w,E,F, q),c[h[w]+b],15>=w?1352829926:31>=w?1548603684:47>=w?1836072691:63>=w?2053994217:0),C[w]),v),A=v,v=q,q=e(F,10),F=E,E=J;J=p(this.h[1],n,q);this.h[1]=p(this.h[2],l,v);this.h[2]=p(this.h[3],D,A);this.h[3]=p(this.h[4],g,E);this.h[4]=p(this.h[0],m,F);this.h[0]=J};n.prototype._digest=function(a){return"hex"===a?m.toHex32(this.h,"little"):m.split32(this.h,"little")};var a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4, 13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],z=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],C=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9, 13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"../hash":184}],188:[function(b,l,g){function n(){if(!(this instanceof n))return new n;v.call(this);this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];this.k=w;this.W=Array(64)}function f(){if(!(this instanceof f))return new f;n.call(this);this.h=[3238371032,914150663,812702999,4144912697,4290775857, 1750603025,1694076839,3204075428]}function m(){if(!(this instanceof m))return new m;v.call(this);this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209];this.k=J;this.W=Array(160)}function e(){if(!(this instanceof e))return new e;m.call(this);this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025, 3675008525,1694076839,1203062813,3204075428]}function d(){if(!(this instanceof d))return new d;v.call(this);this.h=[1732584193,4023233417,2562383102,271733878,3285377520];this.W=Array(80)}b=b("../hash");var p=b.utils,k=p.assert,c=p.rotr32,a=p.rotl32,h=p.sum32,z=p.sum32_4,C=p.sum32_5,u=p.rotr64_hi,r=p.rotr64_lo,B=p.shr64_hi,G=p.shr64_lo,x=p.sum64,y=p.sum64_hi,D=p.sum64_lo,A=p.sum64_4_hi,E=p.sum64_4_lo,F=p.sum64_5_hi,q=p.sum64_5_lo,v=b.common.BlockHash,w=[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],J=[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],M=[1518500249,1859775393,2400959708,3395469782];p.inherits(n,v);g.sha256=n;n.blockSize=512;n.outSize=256;n.hmacStrength=192;n.padLength=64;n.prototype._update= function(a,b){for(var d=this.W,e=0;16>e;e++)d[e]=a[b+e];for(;e>>10;var m=d[e-7],p;p=d[e-15];p=c(p,7)^c(p,18)^p>>>3;d[f]=z(g,m,p,d[e-16])}f=this.h[0];g=this.h[1];m=this.h[2];p=this.h[3];var n=this.h[4],l=this.h[5],q=this.h[6],r=this.h[7];k(this.k.length===d.length);for(e=0;ed;d++)c[d]=a[b+d];for(;dh&&(h+=4294967296);var f=c[d-4],g=c[d-3],k=r(f,g,19),e=r(g,f,29),f=G(f,g,6),k=k^e^f;0>k&&(k+=4294967296);var e=c[d-14],f=c[d-13],m=c[d-30],p=c[d-29],g=u(m,p,1),n=u(m,p,8),m=B(m,p,7),g=g^n^m;0>g&&(g+=4294967296);var p=c[d-30],l=c[d-29],n=r(p,l,1), m=r(p,l,8),p=G(p,l,7),n=n^m^p;0>n&&(n+=4294967296);m=c[d-32];p=c[d-31];c[d]=A(h,k,e,f,g,n,m,p);c[d+1]=E(h,k,e,f,g,n,m,p)}};m.prototype._update=function(a,c){this._prepareBlock(a,c);var b=this.W,d=this.h[0],e=this.h[1],h=this.h[2],f=this.h[3],g=this.h[4],m=this.h[5],p=this.h[6],n=this.h[7],l=this.h[8],z=this.h[9],C=this.h[10],A=this.h[11],J=this.h[12],v=this.h[13],G=this.h[14],w=this.h[15];k(this.k.length===b.length);for(var B=0;BP&&(P+=4294967296);M=P;var E=l,U=z,P=r(E,U,14),T=r(E,U,18),E=r(U,E,9),P=P^T^E;0>P&&(P+=4294967296);E=P;P=l&C^~l&J;0>P&&(P+=4294967296);T=P;P=z&A^~z&v;0>P&&(P+=4294967296);var U=P,W=this.k[B],Q=this.k[B+1],Y=b[B],aa=b[B+1],P=F(G,w,M,E,T,U,W,Q,Y,aa),T=q(G,w,M,E,T,U,W,Q,Y,aa);M=d;E=e;G=u(M,E,28);w=u(E,M,2);M=u(E,M,7);G=G^w^M;0>G&&(G+=4294967296);E=d;U=e;w=r(E,U,28);M=r(U,E,2);E=r(U,E,7);w=w^M^E;0>w&&(w+=4294967296);M=d&h^d&g^h&g;0>M&&(M+=4294967296);E=e&f^e&m^f&m;0>E&&(E+=4294967296);U=y(G, w,M,E);M=D(G,w,M,E);G=J;w=v;J=C;v=A;C=l;A=z;l=y(p,n,P,T);z=D(n,n,P,T);p=g;n=m;g=h;m=f;h=d;f=e;d=y(P,T,U,M);e=D(P,T,U,M)}x(this.h,0,d,e);x(this.h,2,h,f);x(this.h,4,g,m);x(this.h,6,p,n);x(this.h,8,l,z);x(this.h,10,C,A);x(this.h,12,J,v);x(this.h,14,G,w)};m.prototype._digest=function(a){return"hex"===a?p.toHex32(this.h,"big"):p.split32(this.h,"big")};p.inherits(e,m);g.sha384=e;e.blockSize=1024;e.outSize=384;e.hmacStrength=192;e.padLength=128;e.prototype._digest=function(a){return"hex"===a?p.toHex32(this.h.slice(0, 12),"big"):p.split32(this.h.slice(0,12),"big")};p.inherits(d,v);g.sha1=d;d.blockSize=512;d.outSize=160;d.hmacStrength=80;d.padLength=64;d.prototype._update=function(c,b){for(var d=this.W,e=0;16>e;e++)d[e]=c[b+e];for(;e>>24|b>>>8&65280|b<<8&16711680|(b&255)<<24)>>>0}function f(b){return 1===b.length?"0"+b:b}function m(b){return 7===b.length?"0"+b:6===b.length?"00"+b:5===b.length?"000"+b:4===b.length?"0000"+b:3===b.length? "00000"+b:2===b.length?"000000"+b:1===b.length?"0000000"+b:b}function e(b,e){if(!b)throw Error(e||"Assertion failed");}b=b("inherits");g.toArray=function(b,e){if(Array.isArray(b))return b.slice();if(!b)return[];var f=[];if("string"===typeof b)if(!e)for(var c=0;c>8,a=a&255;h?f.push(h,a):f.push(a)}else{if("hex"===e)for(b=b.replace(/[^a-z0-9]+/ig,""),0!==b.length%2&&(b="0"+b),c=0;c>>0;return k};g.split32=function(b,e){for(var f=Array(4*b.length),c= 0,a=0;c>>24,f[a+1]=h>>>16&255,f[a+2]=h>>>8&255,f[a+3]=h&255):(f[a+3]=h>>>24,f[a+2]=h>>>16&255,f[a+1]=h>>>8&255,f[a]=h&255)}return f};g.rotr32=function(b,e){return b>>>e|b<<32-e};g.rotl32=function(b,e){return b<>>32-e};g.sum32=function(b,e){return b+e>>>0};g.sum32_3=function(b,e,f){return b+e+f>>>0};g.sum32_4=function(b,e,f,c){return b+e+f+c>>>0};g.sum32_5=function(b,e,f,c,a){return b+e+f+c+a>>>0};g.assert=e;g.inherits=b;g.sum64=function(b,e,f, c){var a=c+b[e+1]>>>0;b[e]=(a>>0;b[e+1]=a};g.sum64_hi=function(b,e,f,c){return(e+c>>>0>>0};g.sum64_lo=function(b,e,f,c){return e+c>>>0};g.sum64_4_hi=function(b,e,f,c,a,h,g,m){c=e+c>>>0;e=0+(c>>0;e+=c>>0>>0};g.sum64_4_lo=function(b,e,f,c,a,h,g,m){return e+c+h+m>>>0};g.sum64_5_hi=function(b,e,f,c,a,h,g,m,n,l){c=e+c>>>0;e=0+(c>>0;e+=c>>0;e+=c>>0>>0};g.sum64_5_lo= function(b,e,f,c,a,h,g,m,n,l){return e+c+h+m+l>>>0};g.rotr64_hi=function(b,e,f){return(e<<32-f|b>>>f)>>>0};g.rotr64_lo=function(b,e,f){return(b<<32-f|e>>>f)>>>0};g.shr64_hi=function(b,e,f){return b>>>f};g.shr64_lo=function(b,e,f){return(b<<32-f|e>>>f)>>>0}},{inherits:326}],190:[function(b,l,g){l.exports={name:"elliptic",version:"6.2.3",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{coverage:"npm run unit --coverage",coveralls:"npm run coverage && cat ./coverage/lcov.info | coveralls", jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/*.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/*-test.js"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"}, homepage:"https://github.com/indutny/elliptic",devDependencies:{coveralls:"^2.11.3",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.0.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},gitHead:"c32f20b22b420eb6af3c6dda28963deb7facf823",_id:"elliptic@6.2.3",_shasum:"18e46d7306b0951275a2d42063270a14b74ebe99",_from:"elliptic@>=6.0.0 <7.0.0",_npmVersion:"3.3.12",_nodeVersion:"5.4.1",_npmUser:{name:"indutny",email:"fedor@indutny.com"},dist:{shasum:"18e46d7306b0951275a2d42063270a14b74ebe99", tarball:"http://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz"},maintainers:[{name:"indutny",email:"fedor@indutny.com"}],directories:{},_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.2.3.tgz",readme:"ERROR: No README data found!"}},{}],191:[function(b,l,g){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc", "2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],192:[function(b,l,g){b=b("asn1.js");l=b.define("RSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("modulus")["int"](),this.key("publicExponent")["int"](),this.key("privateExponent")["int"](),this.key("prime1")["int"](),this.key("prime2")["int"](), this.key("exponent1")["int"](),this.key("exponent2")["int"](),this.key("coefficient")["int"]())});g.RSAPrivateKey=l;l=b.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus")["int"](),this.key("publicExponent")["int"]())});g.RSAPublicKey=l;l=b.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(n),this.key("subjectPublicKey").bitstr())});g.PublicKey=l;var n=b.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(), this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"]()).optional())});l=b.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version")["int"](),this.key("algorithm").use(n),this.key("subjectPrivateKey").octstr())});g.PrivateKey=l;l=b.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(), this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters")["int"]())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});g.EncryptedPrivateKey=l;l=b.define("DSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"](),this.key("pub_key")["int"](),this.key("priv_key")["int"]())});g.DSAPrivateKey=l;g.DSAparam=b.define("DSAparam",function(){this["int"]()}); l=b.define("ECPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});g.ECPrivateKey=l;var f=b.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});g.signature=b.define("signature",function(){this.seq().obj(this.key("r")["int"](),this.key("s")["int"]())})},{"asn1.js":195}],193:[function(b,l,g){(function(g){var f=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m, m=/^-----BEGIN (.*) KEY-----\r?\n/m,e=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m,d=b("evp_bytestokey"),p=b("browserify-aes");l.exports=function(b,c){var a=b.toString(),h=a.match(f),l;if(h){var C="aes"+h[1],u=new g(h[2],"hex");l=new g(h[3].replace(/\r?\n/g,""),"base64");var r=d(c,u.slice(0,8),parseInt(h[1],10)).key,h=[],C=p.createDecipheriv(C,r,u);h.push(C.update(l));h.push(C["final"]());l=g.concat(h)}else l=a.match(e),l=new g(l[2].replace(/\r?\n/g,""),"base64"); return{tag:a.match(m)[1]+" KEY",data:l}}}).call(this,b("buffer").Buffer)},{"browserify-aes":212,buffer:128,evp_bytestokey:227}],194:[function(b,l,g){(function(g){function f(b){var a;"object"!==typeof b||g.isBuffer(b)||(a=b.passphrase,b=b.key);"string"===typeof b&&(b=new g(b));var h=d(b,a);b=h.tag;h=h.data;switch(b){case "PUBLIC KEY":a=m.PublicKey.decode(h,"der");b=a.algorithm.algorithm.join(".");switch(b){case "1.2.840.113549.1.1.1":return m.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case "1.2.840.10045.2.1":return a.subjectPrivateKey= a.subjectPublicKey,{type:"ec",data:a};case "1.2.840.10040.4.1":return a.algorithm.params.pub_key=m.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw Error("unknown key id "+b);}throw Error("unknown key type "+b);case "ENCRYPTED PRIVATE KEY":b=h=m.EncryptedPrivateKey.decode(h,"der");var f=a,l=b.algorithm.decrypt.kde.kdeparams.salt,u=parseInt(b.algorithm.decrypt.kde.kdeparams.iters.toString(),10);a=e[b.algorithm.decrypt.cipher.algo.join(".")];h=b.algorithm.decrypt.cipher.iv; b=b.subjectPrivateKey;var r=parseInt(a.split("-")[1],10)/8,f=k.pbkdf2Sync(f,l,u,r);a=p.createDecipheriv(a,f,h);h=[];h.push(a.update(b));h.push(a["final"]());h=g.concat(h);case "PRIVATE KEY":a=m.PrivateKey.decode(h,"der");b=a.algorithm.algorithm.join(".");switch(b){case "1.2.840.113549.1.1.1":return m.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case "1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:m.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case "1.2.840.10040.4.1":return a.algorithm.params.priv_key= m.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw Error("unknown key id "+b);}throw Error("unknown key type "+b);case "RSA PUBLIC KEY":return m.RSAPublicKey.decode(h,"der");case "RSA PRIVATE KEY":return m.RSAPrivateKey.decode(h,"der");case "DSA PRIVATE KEY":return{type:"dsa",params:m.DSAPrivateKey.decode(h,"der")};case "EC PRIVATE KEY":return h=m.ECPrivateKey.decode(h,"der"),{curve:h.parameters.value,privateKey:h.privateKey};default:throw Error("unknown key type "+ b);}}var m=b("./asn1"),e=b("./aesid.json"),d=b("./fixProc"),p=b("browserify-aes"),k=b("pbkdf2");l.exports=f;f.signature=m.signature}).call(this,b("buffer").Buffer)},{"./aesid.json":191,"./asn1":192,"./fixProc":193,"browserify-aes":212,buffer:128,pbkdf2:277}],195:[function(b,l,g){g.bignum=b("bn.js");g.define=b("./asn1/api").define;g.base=b("./asn1/base");g.constants=b("./asn1/constants");g.decoders=b("./asn1/decoders");g.encoders=b("./asn1/encoders")},{"./asn1/api":196,"./asn1/base":198,"./asn1/constants":202, "./asn1/decoders":204,"./asn1/encoders":207,"bn.js":165}],196:[function(b,l,g){function n(b,d){this.name=b;this.body=d;this.decoders={};this.encoders={}}var f=b("../asn1"),m=b("inherits");g.define=function(b,d){return new n(b,d)};n.prototype._createNamed=function(e){var d;try{d=b("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(f){d=function(b){this._initNamed(b)}}m(d,e);d.prototype._initNamed=function(b){e.call(this,b)};return new d(this)};n.prototype._getDecoder= function(b){b=b||"der";this.decoders.hasOwnProperty(b)||(this.decoders[b]=this._createNamed(f.decoders[b]));return this.decoders[b]};n.prototype.decode=function(b,d,f){return this._getDecoder(d).decode(b,f)};n.prototype._getEncoder=function(b){b=b||"der";this.encoders.hasOwnProperty(b)||(this.encoders[b]=this._createNamed(f.encoders[b]));return this.encoders[b]};n.prototype.encode=function(b,d,f){return this._getEncoder(d).encode(b,f)}},{"../asn1":195,inherits:326,vm:360}],197:[function(b,l,g){function n(b, f){m.call(this,f);e.isBuffer(b)?(this.base=b,this.offset=0,this.length=b.length):this.error("Input not Buffer")}function f(b,g){if(Array.isArray(b))this.length=0,this.value=b.map(function(b){b instanceof f||(b=new f(b,g));this.length+=b.length;return b},this);else if("number"===typeof b){if(!(0<=b&&255>=b))return g.error("non-byte EncoderBuffer value");this.value=b;this.length=1}else if("string"===typeof b)this.value=b,this.length=e.byteLength(b);else if(e.isBuffer(b))this.value=b,this.length=b.length; else return g.error("Unsupported type: "+typeof b)}l=b("inherits");var m=b("../base").Reporter,e=b("buffer").Buffer;l(n,m);g.DecoderBuffer=n;n.prototype.save=function(){return{offset:this.offset,reporter:m.prototype.save.call(this)}};n.prototype.restore=function(b){var e=new n(this.base);e.offset=b.offset;e.length=this.offset;this.offset=b.offset;m.prototype.restore.call(this,b.reporter);return e};n.prototype.isEmpty=function(){return this.offset===this.length};n.prototype.readUInt8=function(b){return this.offset+ 1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(b||"DecoderBuffer overrun")};n.prototype.skip=function(b,e){if(!(this.offset+b<=this.length))return this.error(e||"DecoderBuffer overrun");var f=new n(this.base);f._reporterState=this._reporterState;f.offset=this.offset;f.length=this.offset+b;this.offset+=b;return f};n.prototype.raw=function(b){return this.base.slice(b?b.offset:this.offset,this.length)};g.EncoderBuffer=f;f.prototype.join=function(b,f){b||(b=new e(this.length));f||(f= 0);if(0===this.length)return b;Array.isArray(this.value)?this.value.forEach(function(e){e.join(b,f);f+=e.length}):("number"===typeof this.value?b[f]=this.value:"string"===typeof this.value?b.write(this.value,f):e.isBuffer(this.value)&&this.value.copy(b,f),f+=this.length);return b}},{"../base":198,buffer:128,inherits:326}],198:[function(b,l,g){g.Reporter=b("./reporter").Reporter;g.DecoderBuffer=b("./buffer").DecoderBuffer;g.EncoderBuffer=b("./buffer").EncoderBuffer;g.Node=b("./node")},{"./buffer":197, "./node":199,"./reporter":200}],199:[function(b,l,g){function n(b,a){var d={};this._baseState=d;d.enc=b;d.parent=a||null;d.children=null;d.tag=null;d.args=null;d.reverseArgs=null;d.choice=null;d.optional=!1;d.any=!1;d.obj=!1;d.use=null;d.useDecoder=null;d.key=null;d["default"]=null;d.explicit=null;d.implicit=null;d.contains=null;d.parent||(d.children=[],this._wrap())}var f=b("../base").Reporter,m=b("../base").EncoderBuffer,e=b("../base").DecoderBuffer,d=b("minimalistic-assert");b="seq seqof set setof objid bool gentime utctime null_ enum int bitstr bmpstr charstr genstr graphstr ia5str iso646str numstr octstr printstr t61str unistr utf8str videostr".split(" "); var p="key obj use optional explicit implicit def choice any contains".split(" ").concat(b);l.exports=n;var k="enc parent children tag args reverseArgs choice optional any obj use alteredUse key default explicit implicit".split(" ");n.prototype.clone=function(){var b=this._baseState,a={};k.forEach(function(d){a[d]=b[d]});var d=new this.constructor(a.parent);d._baseState=a;return d};n.prototype._wrap=function(){var b=this._baseState;p.forEach(function(a){this[a]=function(){var d=new this.constructor(this); b.children.push(d);return d[a].apply(d,arguments)}},this)};n.prototype._init=function(b){var a=this._baseState;d(null===a.parent);b.call(this);a.children=a.children.filter(function(a){return a._baseState.parent===this},this);d.equal(a.children.length,1,"Root node can have only one child")};n.prototype._useArgs=function(b){var a=this._baseState,e=b.filter(function(a){return a instanceof this.constructor},this);b=b.filter(function(a){return!(a instanceof this.constructor)},this);0!==e.length&&(d(null=== a.children),a.children=e,e.forEach(function(a){a._baseState.parent=this},this));0!==b.length&&(d(null===a.args),a.args=b,a.reverseArgs=b.map(function(a){if("object"!==typeof a||a.constructor!==Object)return a;var b={};Object.keys(a).forEach(function(c){c==(c|0)&&(c|=0);b[a[c]]=c});return b}))};"_peekTag _decodeTag _use _decodeStr _decodeObjid _decodeTime _decodeNull _decodeInt _decodeBool _decodeList _encodeComposite _encodeStr _encodeObjid _encodeTime _encodeNull _encodeInt _encodeBool".split(" ").forEach(function(b){n.prototype[b]= function(){throw Error(b+" not implemented for encoding: "+this._baseState.enc);}});b.forEach(function(b){n.prototype[b]=function(){var a=this._baseState,e=Array.prototype.slice.call(arguments);d(null===a.tag);a.tag=b;this._useArgs(e);return this}});n.prototype.use=function(b){var a=this._baseState;d(null===a.use);a.use=b;return this};n.prototype.optional=function(){this._baseState.optional=!0;return this};n.prototype.def=function(b){var a=this._baseState;d(null===a["default"]);a["default"]=b;a.optional= !0;return this};n.prototype.explicit=function(b){var a=this._baseState;d(null===a.explicit&&null===a.implicit);a.explicit=b;return this};n.prototype.implicit=function(b){var a=this._baseState;d(null===a.explicit&&null===a.implicit);a.implicit=b;return this};n.prototype.obj=function(){var b=this._baseState,a=Array.prototype.slice.call(arguments);b.obj=!0;0!==a.length&&this._useArgs(a);return this};n.prototype.key=function(b){var a=this._baseState;d(null===a.key);a.key=b;return this};n.prototype.any= function(){this._baseState.any=!0;return this};n.prototype.choice=function(b){var a=this._baseState;d(null===a.choice);a.choice=b;this._useArgs(Object.keys(b).map(function(a){return b[a]}));return this};n.prototype.contains=function(b){var a=this._baseState;d(null===a.use);a.contains=b;return this};n.prototype._decode=function(b){var a=this._baseState;if(null===a.parent)return b.wrapResult(a.children[0]._decode(b));var d=a["default"],f=!0,k;null!==a.key&&(k=b.enterKey(a.key));if(a.optional){var g= null;null!==a.explicit?g=a.explicit:null!==a.implicit?g=a.implicit:null!==a.tag&&(g=a.tag);if(null!==g||a.any){if(f=this._peekTag(b,g,a.any),b.isError(f))return f}else{var m=b.save();try{null===a.choice?this._decodeGeneric(a.tag,b):this._decodeChoice(b),f=!0}catch(p){f=!1}b.restore(m)}}var n;a.obj&&f&&(n=b.enterObject());if(f){if(null!==a.explicit){g=this._decodeTag(b,a.explicit);if(b.isError(g))return g;b=g}if(null===a.use&&null===a.choice){a.any&&(m=b.save());g=this._decodeTag(b,null!==a.implicit? a.implicit:a.tag,a.any);if(b.isError(g))return g;a.any?d=b.raw(m):b=g}a.any||(d=null===a.choice?this._decodeGeneric(a.tag,b):this._decodeChoice(b));if(b.isError(d))return d;a.any||null!==a.choice||null===a.children||a.children.forEach(function(a){a._decode(b)});!a.contains||"octstr"!==a.tag&&"bitstr"!==a.tag||(d=new e(d),d=this._getUse(a.contains,b._reporterState.obj)._decode(d))}a.obj&&f&&(d=b.leaveObject(n));null===a.key||null===d&&!0!==f||b.leaveKey(k,a.key,d);return d};n.prototype._decodeGeneric= function(b,a){var d=this._baseState;return"seq"===b||"set"===b?null:"seqof"===b||"setof"===b?this._decodeList(a,b,d.args[0]):/str$/.test(b)?this._decodeStr(a,b):"objid"===b&&d.args?this._decodeObjid(a,d.args[0],d.args[1]):"objid"===b?this._decodeObjid(a,null,null):"gentime"===b||"utctime"===b?this._decodeTime(a,b):"null_"===b?this._decodeNull(a):"bool"===b?this._decodeBool(a):"int"===b||"enum"===b?this._decodeInt(a,d.args&&d.args[0]):null!==d.use?this._getUse(d.use,a._reporterState.obj)._decode(a): a.error("unknown tag: "+b)};n.prototype._getUse=function(b,a){var e=this._baseState;e.useDecoder=this._use(b,a);d(null===e.useDecoder._baseState.parent);e.useDecoder=e.useDecoder._baseState.children[0];e.implicit!==e.useDecoder._baseState.implicit&&(e.useDecoder=e.useDecoder.clone(),e.useDecoder._baseState.implicit=e.implicit);return e.useDecoder};n.prototype._decodeChoice=function(b){var a=this._baseState,d=null,e=!1;Object.keys(a.choice).some(function(f){var k=b.save(),g=a.choice[f];try{var m=g._decode(b); if(b.isError(m))return!1;d={type:f,value:m};e=!0}catch(p){return b.restore(k),!1}return!0},this);return e?d:b.error("Choice not matched")};n.prototype._createEncoderBuffer=function(b){return new m(b,this.reporter)};n.prototype._encode=function(b,a,d){var e=this._baseState;if(null===e["default"]||e["default"]!==b)if(b=this._encodeValue(b,a,d),void 0!==b&&!this._skipDefault(b,a,d))return b};n.prototype._encodeValue=function(b,a,d){var e=this._baseState;if(null===e.parent)return e.children[0]._encode(b, a||new f);var k=null;this.reporter=a;if(e.optional&&void 0===b)if(null!==e["default"])b=e["default"];else return;var g=null,m=!1;if(e.any)k=this._createEncoderBuffer(b);else if(e.choice)k=this._encodeChoice(b,a);else if(e.contains)g=this._getUse(e.contains,d)._encode(b,a),m=!0;else if(e.children)g=e.children.map(function(d){if("null_"===d._baseState.tag)return d._encode(null,a,b);if(null===d._baseState.key)return a.error("Child should have a key");var e=a.enterKey(d._baseState.key);if("object"!== typeof b)return a.error("Child expected, but input is not object");d=d._encode(b[d._baseState.key],a,b);a.leaveKey(e);return d},this).filter(function(a){return a}),g=this._createEncoderBuffer(g);else if("seqof"===e.tag||"setof"===e.tag){if(!e.args||1!==e.args.length)return a.error("Too many args for : "+e.tag);if(!Array.isArray(b))return a.error("seqof/setof, but data is not Array");g=this.clone();g._baseState.implicit=null;g=this._createEncoderBuffer(b.map(function(d){return this._getUse(this._baseState.args[0], b)._encode(d,a)},g))}else null!==e.use?k=this._getUse(e.use,d)._encode(b,a):(g=this._encodePrimitive(e.tag,b),m=!0);if(!e.any&&null===e.choice){d=null!==e.implicit?e.implicit:e.tag;var p=null===e.implicit?"universal":"context";null===d?null===e.use&&a.error("Tag could be ommited only for .use()"):null===e.use&&(k=this._encodeComposite(d,m,p,g))}null!==e.explicit&&(k=this._encodeComposite(e.explicit,!1,"context",k));return k};n.prototype._encodeChoice=function(b,a){var e=this._baseState,f=e.choice[b.type]; f||d(!1,b.type+" not found in "+JSON.stringify(Object.keys(e.choice)));return f._encode(b.value,a)};n.prototype._encodePrimitive=function(b,a){var d=this._baseState;if(/str$/.test(b))return this._encodeStr(a,b);if("objid"===b&&d.args)return this._encodeObjid(a,d.reverseArgs[0],d.args[1]);if("objid"===b)return this._encodeObjid(a,null,null);if("gentime"===b||"utctime"===b)return this._encodeTime(a,b);if("null_"===b)return this._encodeNull();if("int"===b||"enum"===b)return this._encodeInt(a,d.args&& d.reverseArgs[0]);if("bool"===b)return this._encodeBool(a);throw Error("Unsupported tag: "+b);};n.prototype._isNumstr=function(b){return/^[0-9 ]*$/.test(b)};n.prototype._isPrintstr=function(b){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(b)}},{"../base":198,"minimalistic-assert":209}],200:[function(b,l,g){function n(b){this._reporterState={obj:null,path:[],options:b||{},errors:[]}}function f(b,e){this.path=b;this.rethrow(e)}b=b("inherits");g.Reporter=n;n.prototype.isError=function(b){return b instanceof f};n.prototype.save=function(){var b=this._reporterState;return{obj:b.obj,pathLen:b.path.length}};n.prototype.restore=function(b){var e=this._reporterState;e.obj=b.obj;e.path=e.path.slice(0,b.pathLen)};n.prototype.enterKey=function(b){return this._reporterState.path.push(b)};n.prototype.leaveKey=function(b,e,d){var f=this._reporterState;f.path=f.path.slice(0,b-1);null!==f.obj&&(f.obj[e]=d)};n.prototype.enterObject=function(){var b=this._reporterState,e=b.obj;b.obj={};return e};n.prototype.leaveObject= function(b){var e=this._reporterState,d=e.obj;e.obj=b;return d};n.prototype.error=function(b){var e=this._reporterState,d=b instanceof f;b=d?b:new f(e.path.map(function(b){return"["+JSON.stringify(b)+"]"}).join(""),b.message||b,b.stack);if(!e.options.partial)throw b;d||e.errors.push(b);return b};n.prototype.wrapResult=function(b){var e=this._reporterState;return e.options.partial?{result:this.isError(b)?null:b,errors:e.errors}:b};b(f,Error);f.prototype.rethrow=function(b){this.message=b+" at: "+(this.path|| "(shallow)");Error.captureStackTrace(this,f);return this}},{inherits:326}],201:[function(b,l,g){b=b("../constants");g.tagClass={0:"universal",1:"application",2:"context",3:"private"};g.tagClassByName=b._reverse(g.tagClass);g.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr", 26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};g.tagByName=b._reverse(g.tag)},{"../constants":202}],202:[function(b,l,g){g._reverse=function(b){var f={};Object.keys(b).forEach(function(g){(g|0)==g&&(g|=0);f[b[g]]=g});return f};g.der=b("./der")},{"./der":201}],203:[function(b,l,g){function n(b){this.enc="der";this.name=b.name;this.entity=b;this.tree=new f;this.tree._init(b.body)}function f(b){d.Node.call(this,"der",b)}function m(b,a){var d=b.readUInt8(a);if(b.isError(d))return d; var e=k.tagClass[d>>6],f=0===(d&32);if(31===(d&31))for(var g=d,d=0;128===(g&128);){g=b.readUInt8(a);if(b.isError(g))return g;d<<=7;d|=g&127}else d&=31;return{cls:e,primitive:f,tag:d,tagStr:k.tag[d]}}function e(b,a,d){var e=b.readUInt8(d);if(b.isError(e))return e;if(!a&&128===e)return null;if(0===(e&128))return e;a=e&127;if(4<=a)return b.error("length octect is too long");for(var f=e=0;fe?2E3+e:1900+e;else return b.error("Decoding "+a+" time is not supported yet");return Date.UTC(e,f-1,g,k,m,d,0)};f.prototype._decodeNull=function(b){return null};f.prototype._decodeBool=function(b){var a=b.readUInt8();return b.isError(a)?a:0!==a};f.prototype._decodeInt=function(b,a){var d=b.raw(),d=new p(d);a&&(d=a[d.toString(10)]||d);return d}; f.prototype._use=function(b,a){"function"===typeof b&&(b=b(a));return b._getDecoder("der").tree}},{"../../asn1":195,inherits:326}],204:[function(b,l,g){g.der=b("./der");g.pem=b("./pem")},{"./der":203,"./pem":205}],205:[function(b,l,g){function n(b){m.call(this,b);this.enc="pem"}g=b("inherits");var f=b("buffer").Buffer,m=b("./der");g(n,m);l.exports=n;n.prototype.decode=function(b,d){for(var g=b.toString().split(/[\r\n]+/g),k=d.label.toUpperCase(),c=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,h=-1,n=0;n< g.length;n++){var l=g[n].match(c);if(null!==l&&l[2]===k)if(-1===a){if("BEGIN"!==l[1])break;a=n}else{if("END"!==l[1])break;h=n;break}}if(-1===a||-1===h)throw Error("PEM section not found for: "+k);g=g.slice(a+1,h).join("");g.replace(/[^a-z0-9\+\/=]+/gi,"");g=new f(g,"base64");return m.prototype.decode.call(this,g,d)}},{"./der":203,buffer:128,inherits:326}],206:[function(b,l,g){function n(b){this.enc="der";this.name=b.name;this.entity=b;this.tree=new f;this.tree._init(b.body)}function f(b){d.Node.call(this, "der",b)}function m(b){return 10>b?"0"+b:b}g=b("inherits");var e=b("buffer").Buffer;b=b("../../asn1");var d=b.base,p=b.constants.der;l.exports=n;n.prototype.encode=function(b,c){return this.tree._encode(b,c).join()};g(f,d.Node);f.prototype._encodeComposite=function(b,c,a,d){a:{var f=b;b=this.reporter;"seqof"===f?f="seq":"setof"===f&&(f="set");if(p.tagByName.hasOwnProperty(f))f=p.tagByName[f];else if("number"!==typeof f||(f|0)!==f){b=b.error("Unknown tag: "+f);break a}31<=f?b=b.error("Multi-octet tag encoding unsupported"): (c||(f|=32),b=f|=p.tagClassByName[a||"universal"]<<6)}if(128>d.length)return c=new e(2),c[0]=b,c[1]=d.length,this._createEncoderBuffer([c,d]);f=1;for(a=d.length;256<=a;a>>=8)f++;c=new e(2+f);c[0]=b;c[1]=128|f;a=1+f;for(b=d.length;0>=8)c[a]=b&255;return this._createEncoderBuffer([c,d])};f.prototype._encodeStr=function(b,c){if("bitstr"===c)return this._createEncoderBuffer([b.unused|0,b.data]);if("bmpstr"===c){for(var a=new e(2*b.length),d=0;d>=7)d++;var d=new e(d),f=d.length-1;for(c=b.length-1;0<=c;c--)for(a=b[c],d[f--]=a&127;0<(a>>=7);)d[f--]=128|a&127;return this._createEncoderBuffer(d)};f.prototype._encodeTime=function(b,c){var a,d=new Date(b);"gentime"===c?a=[m(d.getFullYear()),m(d.getUTCMonth()+1),m(d.getUTCDate()),m(d.getUTCHours()),m(d.getUTCMinutes()), m(d.getUTCSeconds()),"Z"].join(""):"utctime"===c?a=[m(d.getFullYear()%100),m(d.getUTCMonth()+1),m(d.getUTCDate()),m(d.getUTCHours()),m(d.getUTCMinutes()),m(d.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+c+" time is not supported yet");return this._encodeStr(a,"octstr")};f.prototype._encodeNull=function(){return this._createEncoderBuffer("")};f.prototype._encodeInt=function(b,c){if("string"===typeof b){if(!c)return this.reporter.error("String int or enum given, but no values map"); if(!c.hasOwnProperty(b))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(b));b=c[b]}if("number"!==typeof b&&!e.isBuffer(b)){var a=b.toArray();!b.sign&&a[0]&128&&a.unshift(0);b=new e(a)}if(e.isBuffer(b)){var d=b.length;0===b.length&&d++;d=new e(d);b.copy(d);0===b.length&&(d[0]=0);return this._createEncoderBuffer(d)}if(128>b)return this._createEncoderBuffer(b);if(256>b)return this._createEncoderBuffer([0,b]);d=1;for(a=b;256<=a;a>>=8)d++;d=Array(d);for(a=d.length-1;0<=a;a--)d[a]= b&255,b>>=8;d[0]&128&&d.unshift(0);return this._createEncoderBuffer(new e(d))};f.prototype._encodeBool=function(b){return this._createEncoderBuffer(b?255:0)};f.prototype._use=function(b,c){"function"===typeof b&&(b=b(c));return b._getEncoder("der").tree};f.prototype._skipDefault=function(b,c,a){var d=this._baseState;if(null===d["default"])return!1;b=b.join();void 0===d.defaultBuffer&&(d.defaultBuffer=this._encodeValue(d["default"],c,a).join());if(b.length!==d.defaultBuffer.length)return!1;for(c=0;c< b.length;c++)if(b[c]!==d.defaultBuffer[c])return!1;return!0}},{"../../asn1":195,buffer:128,inherits:326}],207:[function(b,l,g){g.der=b("./der");g.pem=b("./pem")},{"./der":206,"./pem":208}],208:[function(b,l,g){function n(b){f.call(this,b);this.enc="pem"}g=b("inherits");var f=b("./der");g(n,f);l.exports=n;n.prototype.encode=function(b,e){for(var d=f.prototype.encode.call(this,b).toString("base64"),g=["-----BEGIN "+e.label+"-----"],k=0;k=b.cmpn(0))throw Error("invalid sig"); if(b.cmp(a)>=a)throw Error("invalid sig");}var m=b("./curves"),e=b("elliptic"),d=b("parse-asn1"),p=b("bn.js"),k=e.ec;l.exports=function(b,a,e,l){e=d(e);if("ec"===e.type){if("ecdsa"!==l)throw Error("wrong public key type");l=m[e.data.algorithm.curve.join(".")];if(!l)throw Error("unknown curve "+e.data.algorithm.curve.join("."));return(new k(l)).verify(a,b,e.data.subjectPrivateKey.data)}if("dsa"===e.type){if("dsa"!==l)throw Error("wrong public key type");l=e.data.p;var C=e.data.q,u=e.data.g;e=e.data.pub_key; var r=d.signature.decode(b,"der");b=r.s;r=r.r;f(b,C);f(r,C);var B=p.mont(l);b=b.invm(C);return!u.toRed(B).redPow((new p(a)).mul(b).mod(C)).fromRed().mul(e.toRed(B).redPow(r.mul(b).mod(C)).fromRed()).mod(l).mod(C).cmp(r)}if("rsa"!==l)throw Error("wrong public key type");u=e.modulus.byteLength();l=[1];for(C=0;a.length+l.length+2C&&(a=1);u=Math.min(b.length,l.length);b.length!==l.length&&(a=1);for(r=-1;++r>5]|=128<>>9<<4)+14]=a;for(var h=1732584193,g=-271733879,k=-1732584194,n=271733878,l=0;l>>32-f,d)}function m(b,a,d,e,g,k,m){return f(a&d|~a&e,b,a,g,k,m)}function e(b,a,d,e,g,k,m){return f(a&e|d&~e,b,a,g,k,m)}function d(b,a,d,e,g,k,m){return f(d^(a|~e),b,a,g,k,m)}function p(b,a){var d=(b&65535)+(a&65535);return(b>>16)+(a>>16)+(d>>16)<<16|d&65535}var k=b("./helpers");l.exports=function(b){return k.hash(b,n,16)}},{"./helpers":257}],259:[function(b,l,g){arguments[4][149][0].apply(g, arguments)},{buffer:128,dup:149,inherits:326,stream:348,string_decoder:355}],260:[function(b,l,g){(function(b){function f(a,b){return a<>>32-b}var g=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],e=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14, 12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],k=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926, 1548603684,1836072691,2053994217,0];l.exports=function(a){var h=[1732584193,4023233417,2562383102,271733878,3285377520];"string"===typeof a&&(a=new b(a,"utf8"));for(var l=a,C=[],u=0,r=0;u>>5]|=l[u]<<24-r%32;l=8*a.length;a=8*a.length;C[l>>>5]|=128<<24-l%32;C[(l+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;for(a=0;aB;B++){var G=r+B,x=u[G];u[G]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}for(var y=x=G=void 0,D=void 0, A=void 0,E=void 0,F=void 0,q=void 0,v=void 0,w=void 0,E=G=l[0],F=x=l[1],q=y=l[2],v=D=l[3],w=A=l[4],J=void 0,B=0;80>B;B+=1)J=G+u[r+g[B]]|0,J=16>B?J+((x^y^D)+k[0]):32>B?J+((x&y|~x&D)+k[1]):48>B?J+(((x|~y)^D)+k[2]):64>B?J+((x&D|y&~D)+k[3]):J+((x^(y|~D))+k[4]),J|=0,J=f(J,d[B]),J=J+A|0,G=A,A=D,D=f(y,10),y=x,x=J,J=E+u[r+e[B]]|0,J=16>B?J+((F^(q|~v))+c[0]):32>B?J+((F&v|q&~v)+c[1]):48>B?J+(((F|~q)^v)+c[2]):64>B?J+((F&q|~F&v)+c[3]):J+((F^q^v)+c[4]),J|=0,J=f(J,p[B]),J=J+w|0,E=w,w=v,v=f(q,10),q=F,F=J;J=l[1]+ y+v|0;l[1]=l[2]+D+w|0;l[2]=l[3]+A+E|0;l[3]=l[4]+G+F|0;l[4]=l[0]+x+q|0;l[0]=J}for(a=0;5>a;a++)C=h[a],h[a]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360;C=[];for(a=0;a<32*h.length;a+=8)C.push(h[a>>>5]>>>24-a%32&255);return new b(C)}}).call(this,b("buffer").Buffer)},{buffer:128}],261:[function(b,l,g){(function(b){function f(f,e){this._block=new b(f);this._finalSize=e;this._blockSize=f;this._s=this._len=0}f.prototype.update=function(f,e){"string"===typeof f&&(f=new b(f,e||"utf8"));for(var d=this._len+= f.length,g=this._s||0,k=0,c=this._block;g=8*this._finalSize&&(this._update(this._block),this._block.fill(0));this._block.writeInt32BE(e,this._blockSize-4); e=this._update(this._block)||this._hash();return b?e.toString(b):e};f.prototype._update=function(){throw Error("_update must be implemented by subclass");};l.exports=f}).call(this,b("buffer").Buffer)},{buffer:128}],262:[function(b,l,g){g=l.exports=function(b){b=b.toLowerCase();var f=g[b];if(!f)throw Error(b+" is not supported (we accept pull requests)");return new f};g.sha=b("./sha");g.sha1=b("./sha1");g.sha224=b("./sha224");g.sha256=b("./sha256");g.sha384=b("./sha384");g.sha512=b("./sha512")},{"./sha":263, "./sha1":264,"./sha224":265,"./sha256":266,"./sha384":267,"./sha512":268}],263:[function(b,l,g){(function(g){function f(){this.init();this._w=p;e.call(this,64,56)}var m=b("inherits"),e=b("./hash"),d=[1518500249,1859775393,-1894007588,-899497514],p=Array(80);m(f,e);f.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};f.prototype._update=function(b){for(var c=this._w,a=this._a|0,e=this._b|0,f=this._c|0,g=this._d|0,m=this._e| 0,n=0;16>n;++n)c[n]=b.readInt32BE(4*n);for(;80>n;++n)c[n]=c[n-3]^c[n-8]^c[n-14]^c[n-16];for(b=0;80>b;++b){var n=~~(b/20),p=a<<5|a>>>27,l;l=0===n?e&f|~e&g:2===n?e&f|e&g|f&g:e^f^g;n=p+l+m+c[b]+d[n]|0;m=g;g=f;f=e<<30|e>>>2;e=a;a=n}this._a=a+this._a|0;this._b=e+this._b|0;this._c=f+this._c|0;this._d=g+this._d|0;this._e=m+this._e|0};f.prototype._hash=function(){var b=new g(20);b.writeInt32BE(this._a|0,0);b.writeInt32BE(this._b|0,4);b.writeInt32BE(this._c|0,8);b.writeInt32BE(this._d|0,12);b.writeInt32BE(this._e| 0,16);return b};l.exports=f}).call(this,b("buffer").Buffer)},{"./hash":261,buffer:128,inherits:326}],264:[function(b,l,g){(function(g){function f(){this.init();this._w=p;e.call(this,64,56)}var m=b("inherits"),e=b("./hash"),d=[1518500249,1859775393,-1894007588,-899497514],p=Array(80);m(f,e);f.prototype.init=function(){this._a=1732584193;this._b=4023233417;this._c=2562383102;this._d=271733878;this._e=3285377520;return this};f.prototype._update=function(b){for(var c=this._w,a=this._a|0,e=this._b|0,f= this._c|0,g=this._d|0,m=this._e|0,n=0;16>n;++n)c[n]=b.readInt32BE(4*n);for(;80>n;++n)b=c[n-3]^c[n-8]^c[n-14]^c[n-16],c[n]=b<<1|b>>>31;for(n=0;80>n;++n){b=~~(n/20);var p=a<<5|a>>>27,l;l=0===b?e&f|~e&g:2===b?e&f|e&g|f&g:e^f^g;b=p+l+m+c[n]+d[b]|0;m=g;g=f;f=e<<30|e>>>2;e=a;a=b}this._a=a+this._a|0;this._b=e+this._b|0;this._c=f+this._c|0;this._d=g+this._d|0;this._e=m+this._e|0};f.prototype._hash=function(){var b=new g(20);b.writeInt32BE(this._a|0,0);b.writeInt32BE(this._b|0,4);b.writeInt32BE(this._c|0, 8);b.writeInt32BE(this._d|0,12);b.writeInt32BE(this._e|0,16);return b};l.exports=f}).call(this,b("buffer").Buffer)},{"./hash":261,buffer:128,inherits:326}],265:[function(b,l,g){(function(g){function f(){this.init();this._w=p;d.call(this,64,56)}var m=b("inherits"),e=b("./sha256"),d=b("./hash"),p=Array(64);m(f,e);f.prototype.init=function(){this._a=3238371032;this._b=914150663;this._c=812702999;this._d=4144912697;this._e=4290775857;this._f=1750603025;this._g=1694076839;this._h=3204075428;return this}; f.prototype._hash=function(){var b=new g(28);b.writeInt32BE(this._a,0);b.writeInt32BE(this._b,4);b.writeInt32BE(this._c,8);b.writeInt32BE(this._d,12);b.writeInt32BE(this._e,16);b.writeInt32BE(this._f,20);b.writeInt32BE(this._g,24);return b};l.exports=f}).call(this,b("buffer").Buffer)},{"./hash":261,"./sha256":266,buffer:128,inherits:326}],266:[function(b,l,g){(function(g){function f(){this.init();this._w=p;e.call(this,64,56)}var m=b("inherits"),e=b("./hash"),d=[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],p=Array(64);m(f,e);f.prototype.init=function(){this._a=1779033703;this._b=3144134277;this._c=1013904242;this._d=2773480762;this._e=1359893119;this._f=2600822924;this._g=528734635;this._h=1541459225;return this};f.prototype._update=function(b){for(var c=this._w,a=this._a|0,e=this._b|0,f=this._c|0,g=this._d|0,m=this._e|0,n=this._f|0,p=this._g|0,l=this._h|0,x= 0;16>x;++x)c[x]=b.readInt32BE(4*x);for(;64>x;++x){b=c[x-2];var y=c[x-15];c[x]=((b>>>17|b<<15)^(b>>>19|b<<13)^b>>>10)+c[x-7]+((y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3)+c[x-16]|0}for(x=0;64>x;++x)b=l+((m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(p^m&(n^p))+d[x]+c[x]|0,y=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&e|f&(a|e))|0,l=p,p=n,n=m,m=g+b|0,g=f,f=e,e=a,a=b+y|0;this._a=a+this._a|0;this._b=e+this._b|0;this._c=f+this._c|0;this._d=g+this._d|0;this._e=m+this._e|0;this._f=n+this._f|0;this._g=p+this._g| 0;this._h=l+this._h|0};f.prototype._hash=function(){var b=new g(32);b.writeInt32BE(this._a,0);b.writeInt32BE(this._b,4);b.writeInt32BE(this._c,8);b.writeInt32BE(this._d,12);b.writeInt32BE(this._e,16);b.writeInt32BE(this._f,20);b.writeInt32BE(this._g,24);b.writeInt32BE(this._h,28);return b};l.exports=f}).call(this,b("buffer").Buffer)},{"./hash":261,buffer:128,inherits:326}],267:[function(b,l,g){(function(g){function f(){this.init();this._w=p;d.call(this,128,112)}var m=b("inherits"),e=b("./sha512"), d=b("./hash"),p=Array(160);m(f,e);f.prototype.init=function(){this._ah=3418070365;this._bh=1654270250;this._ch=2438529370;this._dh=355462360;this._eh=1731405415;this._fh=2394180231;this._gh=3675008525;this._hh=1203062813;this._al=3238371032;this._bl=914150663;this._cl=812702999;this._dl=4144912697;this._el=4290775857;this._fl=1750603025;this._gl=1694076839;this._hl=3204075428;return this};f.prototype._hash=function(){function b(a,d,e){c.writeInt32BE(a,e);c.writeInt32BE(d,e+4)}var c=new g(48);b(this._ah, this._al,0);b(this._bh,this._bl,8);b(this._ch,this._cl,16);b(this._dh,this._dl,24);b(this._eh,this._el,32);b(this._fh,this._fl,40);return c};l.exports=f}).call(this,b("buffer").Buffer)},{"./hash":261,"./sha512":268,buffer:128,inherits:326}],268:[function(b,l,g){(function(g){function f(){this.init();this._w=k;d.call(this,128,112)}function m(b,a){return b>>>0>>0?1:0}var e=b("inherits"),d=b("./hash"),p=[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],k=Array(160);e(f,d);f.prototype.init=function(){this._ah=1779033703;this._bh=3144134277;this._ch=1013904242;this._dh=2773480762;this._eh=1359893119;this._fh=2600822924;this._gh=528734635;this._hh=1541459225;this._al=4089235720;this._bl=2227873595;this._cl=4271175723;this._dl=1595750129;this._el=2917565137;this._fl=725511199;this._gl=4215389547;this._hl=327033209;return this};f.prototype._update= function(b){for(var a=this._w,d=this._ah|0,e=this._bh|0,f=this._ch|0,g=this._dh|0,k=this._eh|0,n=this._fh|0,l=this._gh|0,x=this._hh|0,y=this._al|0,D=this._bl|0,A=this._cl|0,E=this._dl|0,F=this._el|0,q=this._fl|0,v=this._gl|0,w=this._hl|0,J=0;32>J;J+=2)a[J]=b.readInt32BE(4*J),a[J+1]=b.readInt32BE(4*J+4);for(;160>J;J+=2){b=a[J-30];var M=a[J-30+1],H=(b>>>1|M<<31)^(b>>>8|M<<24)^b>>>7,O=(M>>>1|b<<31)^(M>>>8|b<<24)^(M>>>7|b<<25);b=a[J-4];var M=a[J-4+1],K=(b>>>19|M<<13)^(M>>>29|b<<3)^b>>>6,M=(M>>>19|b<< 13)^(b>>>29|M<<3)^(M>>>6|b<<26),L=a[J-32],I=a[J-32+1];b=O+a[J-14+1]|0;H=H+a[J-14]+m(b,O)|0;b=b+M|0;H=H+K+m(b,M)|0;b=b+I|0;H=H+L+m(b,I)|0;a[J]=H;a[J+1]=b}for(J=0;160>J;J+=2){H=a[J];b=a[J+1];var M=d&e|f&(d|e),N=y&D|A&(y|D),L=(d>>>28|y<<4)^(y>>>2|d<<30)^(y>>>7|d<<25),I=(y>>>28|d<<4)^(d>>>2|y<<30)^(d>>>7|y<<25),V=p[J],R=p[J+1],X=l^k&(n^l),na=v^F&(q^v),K=w+((F>>>14|k<<18)^(F>>>18|k<<14)^(k>>>9|F<<23))|0,O=x+((k>>>14|F<<18)^(k>>>18|F<<14)^(F>>>9|k<<23))+m(K,w)|0,K=K+na|0,O=O+X+m(K,na)|0,K=K+R|0,O=O+V+m(K, R)|0,K=K+b|0,O=O+H+m(K,b)|0;b=I+N|0;H=L+M+m(b,I)|0;x=l;w=v;l=n;v=q;n=k;q=F;F=E+K|0;k=g+O+m(F,E)|0;g=f;E=A;f=e;A=D;e=d;D=y;y=K+b|0;d=O+H+m(y,K)|0}this._al=this._al+y|0;this._bl=this._bl+D|0;this._cl=this._cl+A|0;this._dl=this._dl+E|0;this._el=this._el+F|0;this._fl=this._fl+q|0;this._gl=this._gl+v|0;this._hl=this._hl+w|0;this._ah=this._ah+d+m(this._al,y)|0;this._bh=this._bh+e+m(this._bl,D)|0;this._ch=this._ch+f+m(this._cl,A)|0;this._dh=this._dh+g+m(this._dl,E)|0;this._eh=this._eh+k+m(this._el,F)|0; this._fh=this._fh+n+m(this._fl,q)|0;this._gh=this._gh+l+m(this._gl,v)|0;this._hh=this._hh+x+m(this._hl,w)|0};f.prototype._hash=function(){function b(c,d,e){a.writeInt32BE(c,e);a.writeInt32BE(d,e+4)}var a=new g(64);b(this._ah,this._al,0);b(this._bh,this._bl,8);b(this._ch,this._cl,16);b(this._dh,this._dl,24);b(this._eh,this._el,32);b(this._fh,this._fl,40);b(this._gh,this._gl,48);b(this._hh,this._hl,56);return a};l.exports=f}).call(this,b("buffer").Buffer)},{"./hash":261,buffer:128,inherits:326}],269:[function(b, l,g){(function(g){function f(b,c){d.call(this);b=b.toLowerCase();"string"===typeof c&&(c=new g(c));var a="sha512"===b||"sha384"===b?128:64;this._alg=b;this._key=c;c.length>a?c=m(b).update(c).digest():c.lengthd;d+=2){for(var e=Math.ceil(Math.sqrt(d)),f=0;fb)return 2===g||5===g?new d([140,123]):new d([140,39]);g=new d(g);for(var m,l;;){for(m=new d(e(Math.ceil(b/8)));m.bitLength()>b;)m.ishrn(1);m.isEven()&&m.iadd(c);m.testn(1)||m.iadd(a);if(!g.cmp(a))for(;m.mod(p).cmp(u);)m.iadd(r);else if(!g.cmp(h))for(;m.mod(z).cmp(C);)m.iadd(r);l=m.shrn(1);if(n(l)&&n(m)&&f(l)&&f(m)&&k.test(l)&&k.test(m))return m}}var e=b("randombytes");l.exports=m;m.simpleSieve=n;m.fermatTest=f;var d=b("bn.js"),p=new d(24),k=new (b("miller-rabin")),c=new d(1), a=new d(2),h=new d(5);new d(16);new d(8);var z=new d(10),C=new d(3);new d(7);var u=new d(11),r=new d(4);new d(12);var B=null},{"bn.js":274,"miller-rabin":275,randombytes:323}],273:[function(b,l,g){l.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"}}}, {}],274:[function(b,l,g){arguments[4][165][0].apply(g,arguments)},{dup:165}],275:[function(b,l,g){function n(b){this.rand=b||new m.Rand}var f=b("bn.js"),m=b("brorand");l.exports=n;n.create=function(b){return new n(b)};n.prototype._rand=function(b){var d=b.bitLength();b=this.rand.generate(Math.ceil(d/8));b[0]|=3;d&=7;0!==d&&(b[b.length-1]>>=7-d);return new f(b)};n.prototype.test=function(b,d,g){var k=b.bitLength(),c=f.mont(b),a=(new f(1)).toRed(c);d||(d=Math.max(1,k/48|0));for(var h=b.subn(1),k=h.subn(1), m=0;!h.testn(m);m++);b=b.shrn(m);for(h=h.toRed(c);0g)throw new TypeError("Bad iterations"); if("number"!==typeof c)throw new TypeError("Key length not a number");if(0>c||c>e)throw new TypeError("Bad key length");a=a||"sha1";n.isBuffer(b)||(b=new n(b,"binary"));n.isBuffer(f)||(f=new n(f,"binary"));var h,l=1,C=new n(c),u=new n(f.length+4);f.copy(u,0,0,f.length);for(var r,B,G=1;G<=l;G++){u.writeUInt32BE(G,f.length);var x=m(a,b).update(u).digest();h||(h=x.length,B=new n(h),l=Math.ceil(c/h),r=c-(l-1)*h);x.copy(B,0,0,h);for(var y=1;yu||0<=(new d(b)).cmp(a.modulus))throw Error("decryption error");b=l?c(new d(b),a):p(b,a);var r=new g(u-b.length);r.fill(0);b=g.concat([r,b],u);if(4===C){u=b;C=a.modulus.byteLength();a=k("sha1").update(new g("")).digest();l=a.length;if(0!==u[0])throw Error("decryption error");b=u.slice(1,l+1);u=u.slice(l+1);b=e(b,m(u,l));C=e(u,m(b,C-l-1));u=C.slice(0,l);a=new g(a);u=new g(u);b=0;r=a.length;a.length!==u.length&&(b++,r=Math.min(a.length, u.length));for(var B=-1;++B=C.length){b++;break}r=C.slice(2,u-1);C.slice(u-1,u);("0002"!==a.toString("hex")&&!l||"0001"!==a.toString("hex")&&l)&&b++;8>r.length&&b++;if(b)throw Error("decryption error");return C.slice(u)}if(3===C)return b;throw Error("unknown padding");}}).call(this,b("buffer").Buffer)},{"./mgf":279, "./withPublic":321,"./xor":322,"bn.js":280,"browserify-rsa":281,buffer:128,"create-hash":256,"parse-asn1":285}],320:[function(b,l,g){(function(g){var f=b("parse-asn1"),m=b("randombytes"),e=b("create-hash"),d=b("./mgf"),p=b("./xor"),k=b("bn.js"),c=b("./withPublic"),a=b("browserify-rsa");l.exports=function(b,l,C){var u;u=b.padding?b.padding:C?1:4;b=f(b);if(4===u){u=b.modulus.byteLength();var r=l.length,B=e("sha1").update(new g("")).digest(),G=B.length,x=2*G;if(r>u-x-2)throw Error("message too long"); x=new g(u-r-x-2);x.fill(0);var y=u-G-1,r=m(G);l=p(g.concat([B,x,new g([1]),l],y),d(r,y));G=p(r,d(l,G));l=new k(g.concat([new g([0]),G,l],u))}else if(1===u){G=l.length;u=b.modulus.byteLength();if(G>u-11)throw Error("message too long");if(C)G=new g(u-G-3),G.fill(255);else{for(var G=u-G-3,B=new g(G),r=0,x=m(2*G),y=0,D;rb||isNaN(b))throw TypeError("n must be a positive number");this._maxListeners=b;return this};n.prototype.emit=function(b){var d,g,k,c;this._events||(this._events={});if("error"===b&&(!this._events.error||m(this._events.error)&&!this._events.error.length)){d=arguments[1];if(d instanceof Error)throw d;throw TypeError('Uncaught, unspecified "error" event.');}g=this._events[b];if(void 0===g)return!1;if(f(g))switch(arguments.length){case 1:g.call(this);break;case 2:g.call(this, arguments[1]);break;case 3:g.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),g.apply(this,d)}else if(m(g))for(d=Array.prototype.slice.call(arguments,1),c=g.slice(),g=c.length,k=0;kg&&(this._events[b].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[b].length),"function"===typeof console.trace&&console.trace());return this};n.prototype.on= n.prototype.addListener;n.prototype.once=function(b,d){function g(){this.removeListener(b,g);k||(k=!0,d.apply(this,arguments))}if(!f(d))throw TypeError("listener must be a function");var k=!1;g.listener=d;this.on(b,g);return this};n.prototype.removeListener=function(b,d){var g,k,c;if(!f(d))throw TypeError("listener must be a function");if(!this._events||!this._events[b])return this;g=this._events[b];c=g.length;k=-1;if(g===d||f(g.listener)&&g.listener===d)delete this._events[b],this._events.removeListener&& this.emit("removeListener",b,d);else if(m(g)){for(;0k)return this;1===g.length?(g.length=0,delete this._events[b]):g.splice(k,1);this._events.removeListener&&this.emit("removeListener",b,d)}return this};n.prototype.removeAllListeners=function(b){var d;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[b]&&delete this._events[b],this;if(0===arguments.length){for(d in this._events)"removeListener"!== d&&this.removeAllListeners(d);this.removeAllListeners("removeListener");this._events={};return this}d=this._events[b];if(f(d))this.removeListener(b,d);else if(d)for(;d.length;)this.removeListener(b,d[d.length-1]);delete this._events[b];return this};n.prototype.listeners=function(b){return this._events&&this._events[b]?f(this._events[b])?[this._events[b]]:this._events[b].slice():[]};n.prototype.listenerCount=function(b){if(this._events){b=this._events[b];if(f(b))return 1;if(b)return b.length}return 0}; n.listenerCount=function(b,d){return b.listenerCount(d)}},{}],325:[function(b,l,g){var n=b("http");b=l.exports;for(var f in n)n.hasOwnProperty(f)&&(b[f]=n[f]);b.request=function(b,e){b||(b={});b.scheme="https";b.protocol="https:";return n.request.call(this,b,e)}},{http:349}],326:[function(b,l,g){l.exports="function"===typeof Object.create?function(b,f){b.super_=f;b.prototype=Object.create(f.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}})}:function(b,f){b.super_=f;var g= function(){};g.prototype=f.prototype;b.prototype=new g;b.prototype.constructor=b}},{}],327:[function(b,l,g){l.exports=function(b){return!(null==b||!(b._isBuffer||b.constructor&&"function"===typeof b.constructor.isBuffer&&b.constructor.isBuffer(b)))}},{}],328:[function(b,l,g){(function(b){function f(b,d){for(var c=0,a=b.length-1;0<=a;a--){var e=b[a];"."===e?b.splice(a,1):".."===e?(b.splice(a,1),c++):c&&(b.splice(a,1),c--)}if(d)for(;c--;c)b.unshift("..");return b}function m(b,d){if(b.filter)return b.filter(d); for(var c=[],a=0;a c?[]:a.slice(b,c-b+1)}b=g.resolve(b).substr(1);d=g.resolve(d).substr(1);for(var a=c(b.split("/")),e=c(d.split("/")),f=Math.min(a.length,e.length),m=f,l=0;ld&&(d=b.length+d);return b.substr(d,c)}}).call(this,b("_process"))},{_process:329}],329:[function(b,l,g){function n(){p&&k&&(p=!1,k.length?d=k.concat(d):c=-1,d.length&&f())}function f(){if(!p){var a=setTimeout(n);p=!0;for(var b=d.length;b;){k=d;for(d=[];++c=e&&c>>10&1023|55296),a=56320|a&1023);return b+=A(a)}).join("")}function c(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function a(a,b,c){var d=0;a=c?D(a/700):a>>1;for(a+=D(a/b);455l&&(l=0);for(n=0;n=d&&m("invalid-input");y=b.charCodeAt(l++);y=10>y-48?y-22:26>y-65?y-65:26>y-97?y-97:36;(36<=y||y>D((2147483647-f)/e))&&m("overflow");f+=y*e;x=p<=g?1:p>=g+26?26:p-g;if(yD(2147483647/y)&&m("overflow");e*=y}e=c.length+1;g=a(f-n,e,0==n);D(f/e)>2147483647-h&&m("overflow");h+=D(f/e);f%=e;c.splice(f++,0, h)}return k(c)}function z(b){var d,e,f,h,g,k,l,n,y,x=[],r,u,C;b=p(b);r=b.length;d=128;e=0;g=72;for(k=0;ky&&x.push(A(y));for((f=h=x.length)&&x.push("-");f=d&&yD((2147483647-e)/u)&&m("overflow");e+=(l-d)*u;d=l;for(k=0;k=g+26?26:l-g;if(n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=Math.floor,A=String.fromCharCode,E,r={version:"1.4.1",ucs2:{decode:p,encode:k},decode:h,encode:z,toASCII:function(a){return d(a, function(a){return G.test(a)?"xn--"+z(a):a})},toUnicode:function(a){return d(a,function(a){return B.test(a)?h(a.slice(4).toLowerCase()):a})}};if(C&&u)if(l.exports==C)u.exports=r;else for(E in r)r.hasOwnProperty(E)&&(C[E]=r[E]);else f.punycode=r})(this)}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],331:[function(b,l,g){l.exports=function(b,g,e,d){e=e||"=";var l={};if("string"!==typeof b||0===b.length)return l;var k=/\+/g;b= b.split(g||"&");g=1E3;d&&"number"===typeof d.maxKeys&&(g=d.maxKeys);d=b.length;0g&&(d=g);for(g=0;g=a)return 0;if(a>b.highWaterMark){var c=a;8388608<=c?c=8388608:(c--,c|=c>>>1,c|=c>>>2,c|=c>>>4,c|=c>>>8,c|=c>>>16,c++);b.highWaterMark=c}if(a>b.length){if(b.ended)return b.length;b.needReadable=!0;return 0}return a}function p(a){var b=a._readableState;b.needReadable=!1;b.emittedReadable||(q("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?x(k,a):k(a))}function k(a){q("emit readable");a.emit("readable");C(a)}function c(a, b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=d)d=e?c.join(""):1===c.length?c[0]:D.concat(c,d),c.length=0;else if(a=b.highWaterMark||b.ended))return q("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?r(this): p(this),null;a=d(a,b);if(0===a&&b.ended)return 0===b.length&&r(this),null;var e=b.needReadable;q("need readable",e);if(0===b.length||b.length-aa._pos){b=c.substr(a._pos);if("x-user-defined"=== a._charset){for(var e=new m(b.length),g=0;ga._pos&& (a.push(new m(new Uint8Array(l.result.slice(a._pos)))),a._pos=l.result.byteLength)};l.onload=function(){a.push(null)};l.readAsArrayBuffer(c)}}a._xhr.readyState===k.DONE&&"ms-stream"!==a._mode&&a.push(null)}}).call(this,b("_process"),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},b("buffer").Buffer)},{"./capability":350,_process:329,buffer:128,inherits:326,"readable-stream":345}],353:[function(b,l,g){l.exports={100:"Continue",101:"Switching Protocols", 102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable", 407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large", 500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],354:[function(b,l,g){var n=b("buffer").Buffer;l.exports=function(b){if(b instanceof Uint8Array){if(0===b.byteOffset&&b.byteLength===b.buffer.byteLength)return b.buffer;if("function"=== typeof b.buffer.slice)return b.buffer.slice(b.byteOffset,b.byteOffset+b.byteLength)}if(n.isBuffer(b)){for(var g=new Uint8Array(b.length),e=b.length,d=0;d=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;b.copy(this.charBuffer,this.charReceived,0,d);this.charReceived+=d;if(this.charReceived=c)this.charLength+=this.surrogateSize,d="";else{this.charReceived=this.charLength=0;if(0===b.length)return d;break}}this.detectIncompleteChar(b);var a=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,a),a-=this.charReceived);d+=b.toString(this.encoding,0,a);a=d.length-1;c=d.charCodeAt(a);return 55296<=c&&56319>=c?(c=this.surrogateSize,this.charLength+=c,this.charReceived+=c,this.charBuffer.copy(this.charBuffer,c,0,c),b.copy(this.charBuffer,0,0, c),d.substring(0,a)):d};b.prototype.detectIncompleteChar=function(b){for(var d=3<=b.length?3:b.length;0>5){this.charLength=2;break}if(2>=d&&14==c>>4){this.charLength=3;break}if(3>=d&&30==c>>3){this.charLength=4;break}}this.charReceived=d};b.prototype.end=function(b){var d="";b&&b.length&&(d=this.write(b));this.charReceived&&(b=this.encoding,d+=this.charBuffer.slice(0,this.charReceived).toString(b));return d}},{buffer:128}],356:[function(b,l,g){function n(){this.href= this.path=this.pathname=this.query=this.search=this.hash=this.hostname=this.port=this.host=this.auth=this.slashes=this.protocol=null}function f(a,b,c){if(a&&e.isObject(a)&&a instanceof n)return a;var d=new n;d.parse(a,b,c);return d}var m=b("punycode"),e=b("./util");g.parse=f;g.resolve=function(a,b){return f(a,!1,!0).resolve(b)};g.resolveObject=function(a,b){return a?f(a,!1,!0).resolveObject(b):b};g.format=function(a){e.isString(a)&&(a=f(a));return a instanceof n?a.format():n.prototype.format.call(a)}; g.Url=n;var d=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,k=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/;l="{}|\\^`".split("").concat('<>"` \r\n\t'.split(""));var c=["'"].concat(l),a=["%","/","?",";","#"].concat(c),h=["/","?","#"],z=/^[+a-z0-9A-Z_-]{0,63}$/,C=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},r={javascript:!0,"javascript:":!0},B={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},G=b("querystring");n.prototype.parse=function(b,f,g){if(!e.isString(b))throw new TypeError("Parameter 'url' must be a string, not "+ typeof b);var l=b.indexOf("?"),l=-1!==l&&lg.length&&g.unshift("");b.pathname=g.join("/")}b.search=a.search;b.query=a.query;b.host=a.host||"";b.auth=a.auth;b.hostname=a.hostname||a.host;b.port=a.port;if(b.pathname||b.search)b.path=(b.pathname||"")+(b.search||"");b.slashes=b.slashes||a.slashes;b.href=b.format();return b}var c=b.pathname&& "/"===b.pathname.charAt(0),h=a.host||a.pathname&&"/"===a.pathname.charAt(0),k=c=h||c||b.host&&a.pathname,d=b.pathname&&b.pathname.split("/")||[],g=a.pathname&&a.pathname.split("/")||[];if(f=b.protocol&&!B[b.protocol])b.hostname="",b.port=null,b.host&&(""===d[0]?d[0]=b.host:d.unshift(b.host)),b.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===g[0]?g[0]=a.host:g.unshift(a.host)),a.host=null),c=c&&(""===g[0]||""===d[0]);if(h)b.host=a.host||""===a.host?a.host:b.host,b.hostname=a.hostname|| ""===a.hostname?a.hostname:b.hostname,b.search=a.search,b.query=a.query,d=g;else if(g.length)d||(d=[]),d.pop(),d=d.concat(g),b.search=a.search,b.query=a.query;else if(!e.isNullOrUndefined(a.search))return f&&(b.hostname=b.host=d.shift(),f=b.host&&0e)return y(d)?b.stylize(RegExp.prototype.toString.call(d),"regexp"):b.stylize("[Object]","special");b.seen.push(d);l=n?h(b,d,e,m, l):l.map(function(a){return z(b,d,e,m,a,n)});b.seen.pop();return C(l,f,q)}function c(b,a){if(x(a))return b.stylize("undefined","undefined");if(G(a)){var c="'"+JSON.stringify(a).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return b.stylize(c,"string")}if(B(a))return b.stylize(""+a,"number");if(r(a))return b.stylize(""+a,"boolean");if(null===a)return b.stylize("null","null")}function a(a){return"["+Error.prototype.toString.call(a)+"]"}function h(a,b,c,d,e){for(var f=[],g=0,h=b.length;g< h;++g)Object.prototype.hasOwnProperty.call(b,String(g))?f.push(z(a,b,c,d,String(g),!0)):f.push("");e.forEach(function(e){e.match(/^\d+$/)||f.push(z(a,b,c,d,e,!0))});return f}function z(a,b,c,d,e,f){var g,h;b=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]};b.get?h=b.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):b.set&&(h=a.stylize("[Setter]","special"));Object.prototype.hasOwnProperty.call(d,e)||(g="["+e+"]");h||(0>a.seen.indexOf(b.value)?(h=null===c?k(a,b.value,null): k(a,b.value,c-1),-1a?"0"+a.toString(10):a.toString(10)}function v(){var a=new Date,b=[q(a.getHours()),q(a.getMinutes()),q(a.getSeconds())].join(":");return[a.getDate(),H[a.getMonth()],b].join(" ")}var w=/%[sdj%]/g;g.format=function(a){if(!G(a)){for(var b=[],c=0;c< arguments.length;c++)b.push(m(arguments[c]));return b.join(" ")}for(var c=1,d=arguments,e=d.length,b=String(a).replace(w,function(a){if("%%"===a)return"%";if(c>=e)return a;switch(a){case "%s":return String(d[c++]);case "%d":return Number(d[c++]);case "%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),f=d[c];c