/*! For license information please see app.js.LICENSE.txt */ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=292)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){var r=n(4),i=r.Buffer;function a(t,e){for(var n in t)e[n]=t[n]}function o(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=o),a(i,o),o.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},o.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&h())}function h(){if(!u){var t=s(f);u=!0;for(var e=c.length;e;){for(l=c,c=[];++d1)for(var n=1;n=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var a,o=1,s=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var d=!0,f=0;fi&&(r=i):r=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o>8,i=n%256,a.push(i),a.push(r);return a}(e,t.length-n),t,n,r)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function T(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,r,i){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(e>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=t.slice(e,n),d=0;di)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return M(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",a=e;an)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,i,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function O(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function I(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function N(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(t,e,n,r,a){return a||N(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function R(t,e,n,r,a){return a||N(t,0,n,8),i.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUInt8=function(t,e){return e||E(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||E(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||E(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||E(t,e,this.length);for(var r=this[t],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||E(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||E(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||E(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||E(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||E(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||E(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||E(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+i]=t/a&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return P(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return P(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function $(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(2))},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=e,i=n(10),a=n(5),o=n(111);r.assert=a,r.toArray=o.toArray,r.zero2=o.zero2,r.toHex=o.toHex,r.encode=o.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<(i>>1)-1?(i>>1)-l:l,a.isubn(s)):s=0,r[o]=s,a.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r,i=0,a=0;t.cmpn(-i)>0||e.cmpn(-a)>0;){var o,s,l=t.andln(3)+i&3,c=e.andln(3)+a&3;3===l&&(l=-1),3===c&&(c=-1),o=0==(1&l)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?l:-l,n[0].push(o),s=0==(1&c)?0:3!==(r=e.andln(7)+a&7)&&5!==r||2!==l?c:-c,n[1].push(s),2*i===o+1&&(i=1-i),2*a===s+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,n){(function(e){t.exports=e.jQuery=n(131)}).call(this,n(2))},function(t,e){t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},function(t,e,n){"use strict";var r=n(5),i=n(0);function a(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function o(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function l(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i>6|192,n[r++]=63&o|128):a(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i>>0}return o},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],a=r+t[e+1]>>>0,o=(a>>0,t[e+1]=a},e.sum64_hi=function(t,e,n,r){return(e+r>>>0>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,a,o,s){var l=0,c=e;return l+=(c=c+r>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,r,i,a,o,s){return e+r+a+s>>>0},e.sum64_5_hi=function(t,e,n,r,i,a,o,s,l,c){var u=0,d=e;return u+=(d=d+r>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,n,r,i,a,o,s,l,c){return e+r+a+s+c>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(244).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,r){for(var i=0,a=Math.min(t.length,n),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=l(t,e,r)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=f;h++){var p=c-h|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[h])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}a.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],h=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,h=0|o[1],p=8191&h,m=h>>>13,g=0|o[2],b=8191&g,v=g>>>13,y=0|o[3],M=8191&y,w=y>>>13,_=0|o[4],A=8191&_,x=_>>>13,S=0|o[5],T=8191&S,k=S>>>13,C=0|o[6],D=8191&C,z=C>>>13,E=0|o[7],L=8191&E,O=E>>>13,I=0|o[8],N=8191&I,P=I>>>13,R=0|o[9],B=8191&R,j=R>>>13,q=0|s[0],F=8191&q,$=q>>>13,W=0|s[1],X=8191&W,H=W>>>13,U=0|s[2],V=8191&U,G=U>>>13,Y=0|s[3],K=8191&Y,Z=Y>>>13,Q=0|s[4],J=8191&Q,tt=Q>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],dt=8191&ut,ft=ut>>>13,ht=0|s[9],pt=8191&ht,mt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,$))+Math.imul(f,F)|0))<<13)|0;c=((a=Math.imul(f,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,$))+Math.imul(m,F)|0,a=Math.imul(m,$);var bt=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,X)|0))<<13)|0;c=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,$))+Math.imul(v,F)|0,a=Math.imul(v,$),r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,V)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,$))+Math.imul(w,F)|0,a=Math.imul(w,$),r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,G)|0;var yt=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,K)|0))<<13)|0;c=((a=a+Math.imul(f,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(A,F),i=(i=Math.imul(A,$))+Math.imul(x,F)|0,a=Math.imul(x,$),r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,Z)|0;var Mt=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,$))+Math.imul(k,F)|0,a=Math.imul(k,$),r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,H)|0,r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(w,V)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((a=a+Math.imul(f,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(D,F),i=(i=Math.imul(D,$))+Math.imul(z,F)|0,a=Math.imul(z,$),r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,H)|0,r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0;var _t=(c+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,$))+Math.imul(O,F)|0,a=Math.imul(O,$),r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,H)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,V)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,a=a+Math.imul(v,rt)|0,r=r+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var At=(c+(r=r+Math.imul(d,lt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,$))+Math.imul(P,F)|0,a=Math.imul(P,$),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(z,V)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,K)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(w,nt)|0,a=a+Math.imul(w,rt)|0,r=r+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var xt=(c+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,$))+Math.imul(j,F)|0,a=Math.imul(j,$),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,Z)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,ot)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0,r=r+Math.imul(p,dt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,ft)|0;var St=(c+(r=r+Math.imul(d,pt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((a=a+Math.imul(f,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,H))+Math.imul(j,X)|0,a=Math.imul(j,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(P,V)|0,a=a+Math.imul(P,G)|0,r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(k,nt)|0,a=a+Math.imul(k,rt)|0,r=r+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ct)|0,r=r+Math.imul(b,dt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(v,dt)|0,a=a+Math.imul(v,ft)|0;var Tt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(j,V)|0,a=Math.imul(j,G),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Z)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(D,nt)|0,i=(i=i+Math.imul(D,rt)|0)+Math.imul(z,nt)|0,a=a+Math.imul(z,rt)|0,r=r+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(x,lt)|0,a=a+Math.imul(x,ct)|0,r=r+Math.imul(M,dt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(w,dt)|0,a=a+Math.imul(w,ft)|0;var kt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((a=a+Math.imul(v,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,Z))+Math.imul(j,K)|0,a=Math.imul(j,Z),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,tt)|0,r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,r=r+Math.imul(A,dt)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ft)|0;var Ct=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((a=a+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(j,J)|0,a=Math.imul(j,tt),r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(P,nt)|0,a=a+Math.imul(P,rt)|0,r=r+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,r=r+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,r=r+Math.imul(T,dt)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,dt)|0,a=a+Math.imul(k,ft)|0;var Dt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((a=a+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(j,nt)|0,a=Math.imul(j,rt),r=r+Math.imul(N,at)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,r=r+Math.imul(D,dt)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(z,dt)|0,a=a+Math.imul(z,ft)|0;var zt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0,r=r+Math.imul(L,dt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,ft)|0;var Et=(c+(r=r+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(z,pt)|0))<<13)|0;c=((a=a+Math.imul(z,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),r=r+Math.imul(N,dt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(P,dt)|0,a=a+Math.imul(P,ft)|0;var Lt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(B,dt),i=(i=Math.imul(B,ft))+Math.imul(j,dt)|0,a=Math.imul(j,ft);var Ot=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((a=a+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var It=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=bt,l[2]=vt,l[3]=yt,l[4]=Mt,l[5]=wt,l[6]=_t,l[7]=At,l[8]=xt,l[9]=St,l[10]=Tt,l[11]=kt,l[12]=Ct,l[13]=Dt,l[14]=zt,l[15]=Et,l[16]=Lt,l[17]=Ot,l[18]=It,0!==c&&(l[19]=c,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},a.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),o.isub(l)):(n.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new A(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new M;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return b[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}l=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new x(t)},i(x,A),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(11)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(1).Buffer,i=n(196).Transform,a=n(14).StringDecoder;function o(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(0)(o,i),o.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},o.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},o.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},o.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=o},function(t,e,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,a),r(n)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}b(t,e,a,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&b(t,"error",e,n)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function d(t,e,n,r){var i,a,o,s;if(c(n),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),o=a[e]),void 0===o)o=a[e]=n,++t._eventsCount;else if("function"==typeof o?o=a[e]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(t))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(void 0===l)return!1;if("function"==typeof l)a(l,this,e);else{var c=l.length,u=g(l,c);for(n=0;n=0;a--)if(n[a]===e||n[a].listener===e){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(1).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=u,this.end=d,e=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function u(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(t.lastNeed=i-1),i;if(--r=0)return i>0&&(t.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var r=n(33),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=d;var a=Object.create(n(24));a.inherits=n(0);var o=n(83),s=n(48);a.inherits(d,o);for(var l=i(s.prototype),c=0;c4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(t);if(t>0)if(t>65536)for(var o=0;o2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,o,s;if("string"==typeof e&&(i="not ",e.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(a(e,"type"));else{var l=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(l," ").concat(r," ").concat(a(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(75),a=n(79);n(0)(c,i);for(var o=r(a.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){"use strict";var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function a(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,o,s;if("string"==typeof e&&(i="not ",e.substr(!o||o<0?0:+o,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(a(e,"type"));else{var l=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(l," ").concat(r," ").concat(a(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(105),a=n(109);n(0)(c,i);for(var o=r(a.prototype),s=0;s=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a>>0;for(e=0;e0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,x=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)o(t,e)&&n.push(e);return n};var E=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,O={},I={};function N(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(I[t]=i),e&&(I[e[0]]=function(){return z(i.apply(this,arguments),e[1],e[2])}),n&&(I[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function P(t,e){return t.isValid()?(e=R(e,t.localeData()),O[e]=O[e]||function(t){var e,n,r,i=t.match(E);for(e=0,n=i.length;e=0&&L.test(t);)t=t.replace(L,r),L.lastIndex=0,n-=1;return t}var B={};function j(t,e){var n=t.toLowerCase();B[n]=B[n+"s"]=B[e]=t}function q(t){return"string"==typeof t?B[t]||B[t.toLowerCase()]:void 0}function F(t){var e,n,r={};for(n in t)o(t,n)&&(e=q(n))&&(r[e]=t[n]);return r}var $={};function W(t,e){$[t]=e}function X(t){return t%4==0&&t%100!=0||t%400==0}function H(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function U(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=H(e)),n}function V(t,e){return function(n){return null!=n?(Y(this,t,n),r.updateOffset(this,e),this):G(this,t)}}function G(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Y(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&X(t.year())&&1===t.month()&&29===t.date()?(n=U(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var K,Z=/\d/,Q=/\d\d/,J=/\d{3}/,tt=/\d{4}/,et=/[+-]?\d{6}/,nt=/\d\d?/,rt=/\d\d\d\d?/,it=/\d\d\d\d\d\d?/,at=/\d{1,3}/,ot=/\d{1,4}/,st=/[+-]?\d{1,6}/,lt=/\d+/,ct=/[+-]?\d+/,ut=/Z|[+-]\d\d:?\d\d/gi,dt=/Z|[+-]\d\d(?::?\d\d)?/gi,ft=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ht(t,e,n){K[t]=k(e)?e:function(t,r){return t&&n?n:e}}function pt(t,e){return o(K,t)?K[t](e._strict,e._locale):new RegExp(mt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function mt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var gt,bt={};function vt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=U(t)}),n=0;n68?1900:2e3)};var Lt=V("FullYear",!0);function Ot(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function It(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Nt(t,e,n){var r=7+e-n;return-(7+It(t,0,r).getUTCDay()-e)%7+r-1}function Pt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Nt(t,r,i);return s<=0?o=Et(a=t-1)+s:s>Et(t)?(a=t+1,o=s-Et(t)):(a=t,o=s),{year:a,dayOfYear:o}}function Rt(t,e,n){var r,i,a=Nt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Bt(i=t.year()-1,e,n):o>Bt(t.year(),e,n)?(r=o-Bt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Bt(t,e,n){var r=Nt(t,e,n),i=Nt(t+1,e,n);return(Et(t)-r+i)/7}function jt(t,e){return t.slice(e,7).concat(t.slice(0,e))}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),W("week",5),W("isoWeek",5),ht("w",nt),ht("ww",nt,Q),ht("W",nt),ht("WW",nt,Q),yt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=U(t)})),N("d",0,"do","day"),N("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),N("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),N("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),ht("d",nt),ht("e",nt),ht("E",nt),ht("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ht("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ht("dddd",(function(t,e){return e.weekdaysRegex(t)})),yt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),yt(["d","e","E"],(function(t,e,n,r){e[r]=U(t)}));var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ft="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$t="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Wt=ft,Xt=ft,Ht=ft;function Ut(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=gt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=gt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=gt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=gt.call(this._weekdaysParse,o))||-1!==(i=gt.call(this._shortWeekdaysParse,o))||-1!==(i=gt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=gt.call(this._shortWeekdaysParse,o))||-1!==(i=gt.call(this._weekdaysParse,o))||-1!==(i=gt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=gt.call(this._minWeekdaysParse,o))||-1!==(i=gt.call(this._weekdaysParse,o))||-1!==(i=gt.call(this._shortWeekdaysParse,o))?i:null}function Vt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],l=[],c=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),r=mt(this.weekdaysMin(n,"")),i=mt(this.weekdaysShort(n,"")),a=mt(this.weekdays(n,"")),o.push(r),s.push(i),l.push(a),c.push(r),c.push(i),c.push(a);o.sort(t),s.sort(t),l.sort(t),c.sort(t),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Gt(){return this.hours()%12||12}function Yt(t,e){N(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Kt(t,e){return e._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Gt),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+Gt.apply(this)+z(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+Gt.apply(this)+z(this.minutes(),2)+z(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+z(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+z(this.minutes(),2)+z(this.seconds(),2)})),Yt("a",!0),Yt("A",!1),j("hour","h"),W("hour",13),ht("a",Kt),ht("A",Kt),ht("H",nt),ht("h",nt),ht("k",nt),ht("HH",nt,Q),ht("hh",nt,Q),ht("kk",nt,Q),ht("hmm",rt),ht("hmmss",it),ht("Hmm",rt),ht("Hmmss",it),vt(["H","HH"],3),vt(["k","kk"],(function(t,e,n){var r=U(t);e[3]=24===r?0:r})),vt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),vt(["h","hh"],(function(t,e,n){e[3]=U(t),p(n).bigHour=!0})),vt("hmm",(function(t,e,n){var r=t.length-2;e[3]=U(t.substr(0,r)),e[4]=U(t.substr(r)),p(n).bigHour=!0})),vt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=U(t.substr(0,r)),e[4]=U(t.substr(r,2)),e[5]=U(t.substr(i)),p(n).bigHour=!0})),vt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=U(t.substr(0,r)),e[4]=U(t.substr(r))})),vt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=U(t.substr(0,r)),e[4]=U(t.substr(r,2)),e[5]=U(t.substr(i))}));var Zt,Qt=V("Hours",!0),Jt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:_t,monthsShort:At,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:$t,weekdaysShort:Ft,meridiemParse:/[ap]\.?m?\.?/i},te={},ee={};function ne(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n0;){if(r=ie(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&ne(i,n)>=e-1)break;e--}a++}return Zt}(t)}function le(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}var ce=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,de=/Z|[+-]\d\d(?::?\d\d)?/,fe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pe=/^\/?Date\((-?\d+)/i,me=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function be(t){var e,n,r,i,a,o,s=t._i,l=ce.exec(s)||ue.exec(s);if(l){for(p(t).iso=!0,e=0,n=fe.length;e7)&&(l=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,c=Rt(Se(),a,o),n=Me(e.gg,t._a[0],c.year),r=Me(e.w,c.week),null!=e.d?((i=e.d)<0||i>6)&&(l=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(l=!0)):i=a),r<1||r>Bt(n,a,o)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(s=Pt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=Me(t._a[0],i[0]),(t._dayOfYear>Et(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=It(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?It:Ot).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}function _e(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],p(t).empty=!0;var e,n,i,a,o,s,l=""+t._i,c=l.length,u=0;for(i=R(t._f,t._locale).match(E)||[],e=0;e0&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),u+=n.length),I[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),Mt(a,n,t)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=c-u,l.length>0&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&t._a[3]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(s=p(t).era)&&(t._a[0]=t._locale.erasConvertYear(s,t._a[0])),we(t),le(t)}else ye(t);else be(t)}function Ae(t){var e=t._i,n=t._f;return t._locale=t._locale||se(t._l),null===e||void 0===n&&""===e?g({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),w(e)?new M(le(e)):(u(e)?t._d=e:i(n)?function(t){var e,n,r,i,a,o,s=!1;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;ithis?this:t:g()}));function Ce(t,e){var n,r;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Se();for(n=e[0],r=1;r=0?new Date(t+400,e,n)-126227808e5:new Date(t,e,n).valueOf()}function rn(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-126227808e5:Date.UTC(t,e,n)}function an(t,e){return e.erasAbbrRegex(t)}function on(){var t,e,n=[],r=[],i=[],a=[],o=this.eras();for(t=0,e=o.length;t(a=Bt(t,r,i))&&(e=a),cn.call(this,t,e,n,r,i))}function cn(t,e,n,r,i){var a=Pt(t,e,n,r,i),o=It(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),ht("N",an),ht("NN",an),ht("NNN",an),ht("NNNN",(function(t,e){return e.erasNameRegex(t)})),ht("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),vt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?p(n).era=i:p(n).invalidEra=t})),ht("y",lt),ht("yy",lt),ht("yyy",lt),ht("yyyy",lt),ht("yo",(function(t,e){return e._eraYearOrdinalRegex||lt})),vt(["y","yy","yyy","yyyy"],0),vt(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[0]=n._locale.eraYearOrdinalParse(t,i):e[0]=parseInt(t,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),ht("G",ct),ht("g",ct),ht("GG",nt,Q),ht("gg",nt,Q),ht("GGGG",ot,tt),ht("gggg",ot,tt),ht("GGGGG",st,et),ht("ggggg",st,et),yt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=U(t)})),yt(["gg","GG"],(function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)})),N("Q",0,"Qo","quarter"),j("quarter","Q"),W("quarter",7),ht("Q",Z),vt("Q",(function(t,e){e[1]=3*(U(t)-1)})),N("D",["DD",2],"Do","date"),j("date","D"),W("date",9),ht("D",nt),ht("DD",nt,Q),ht("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),vt(["D","DD"],2),vt("Do",(function(t,e){e[2]=U(t.match(nt)[0])}));var un=V("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),W("dayOfYear",4),ht("DDD",at),ht("DDDD",J),vt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=U(t)})),N("m",["mm",2],0,"minute"),j("minute","m"),W("minute",14),ht("m",nt),ht("mm",nt,Q),vt(["m","mm"],4);var dn=V("Minutes",!1);N("s",["ss",2],0,"second"),j("second","s"),W("second",15),ht("s",nt),ht("ss",nt,Q),vt(["s","ss"],5);var fn,hn,pn=V("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),j("millisecond","ms"),W("millisecond",16),ht("S",at,Z),ht("SS",at,Q),ht("SSS",at,J),fn="SSSS";fn.length<=9;fn+="S")ht(fn,lt);function mn(t,e){e[6]=U(1e3*("0."+t))}for(fn="S";fn.length<=9;fn+="S")vt(fn,mn);hn=V("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var gn=M.prototype;function bn(t){return t}gn.add=Ue,gn.calendar=function(t,e){1===arguments.length&&(Ye(arguments[0])?(t=arguments[0],e=void 0):Ke(arguments[0])&&(e=arguments[0],t=void 0));var n=t||Se(),i=Pe(n,this).startOf("day"),a=r.calendarFormat(this,i)||"sameElse",o=e&&(k(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,Se(n)))},gn.clone=function(){return new M(this)},gn.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Pe(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=q(e)){case"year":a=Ze(this,r)/12;break;case"month":a=Ze(this,r);break;case"quarter":a=Ze(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:H(a)},gn.endOf=function(t){var e,n;if(void 0===(t=q(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?rn:nn,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-en(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-en(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-en(e,1e3)-1}return this._d.setTime(e),r.updateOffset(this,!0),this},gn.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=P(this,t);return this.localeData().postformat(e)},gn.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Se(t).isValid())?Fe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.fromNow=function(t){return this.from(Se(),t)},gn.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Se(t).isValid())?Fe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.toNow=function(t){return this.to(Se(),t)},gn.get=function(t){return k(this[t=q(t)])?this[t]():this},gn.invalidAt=function(){return p(this).overflow},gn.isAfter=function(t,e){var n=w(t)?t:Se(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=q(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?P(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",P(n,"Z")):P(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),t="["+r+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(gn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return Math.floor(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.eraName=function(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;tthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=Be,gn.isUTC=Be,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=A("dates accessor is deprecated. Use date instead.",un),gn.months=A("months accessor is deprecated. Use month instead",Dt),gn.years=A("years accessor is deprecated. Use year instead",Lt),gn.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),gn.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t,e={};return y(e,this),(e=Ae(e))._a?(t=e._isUTC?h(e._a):Se(e._a),this._isDSTShifted=this.isValid()&&function(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var vn=D.prototype;function yn(t,e,n,r){var i=se(),a=h().set(r,e);return i[n](a,t)}function Mn(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return yn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=yn(t,r,n,"month");return i}function wn(t,e,n,r){"boolean"==typeof t?(c(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,c(e)&&(n=e,e=void 0),e=e||"");var i,a=se(),o=t?a._week.dow:0,s=[];if(null!=n)return yn(e,(n+o)%7,r,"day");for(i=0;i<7;i++)s[i]=yn(e,(i+o)%7,r,"day");return s}vn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return k(r)?r.call(e,n):r},vn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(E).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},vn.invalidDate=function(){return this._invalidDate},vn.ordinal=function(t){return this._ordinal.replace("%d",t)},vn.preparse=bn,vn.postformat=bn,vn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return k(i)?i(t,e,n,r):i.replace(/%d/i,t)},vn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return k(n)?n(e):n.replace(/%s/i,e)},vn.set=function(t){var e,n;for(n in t)o(t,n)&&(k(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vn.eras=function(t,e){var n,i,a,o=this._eras||se("en")._eras;for(n=0,i=o.length;n=0)return l[r]},vn.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return void 0===e?r(t.since).year():r(t.since).year()+(e-t.offset)*n},vn.erasAbbrRegex=function(t){return o(this,"_erasAbbrRegex")||on.call(this),t?this._erasAbbrRegex:this._erasRegex},vn.erasNameRegex=function(t){return o(this,"_erasNameRegex")||on.call(this),t?this._erasNameRegex:this._erasRegex},vn.erasNarrowRegex=function(t){return o(this,"_erasNarrowRegex")||on.call(this),t?this._erasNarrowRegex:this._erasRegex},vn.months=function(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||xt).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone},vn.monthsShort=function(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[xt.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return kt.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},vn.monthsRegex=function(t){return this._monthsParseExact?(o(this,"_monthsRegex")||zt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Tt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},vn.monthsShortRegex=function(t){return this._monthsParseExact?(o(this,"_monthsRegex")||zt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=St),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},vn.week=function(t){return Rt(t,this._week.dow,this._week.doy).week},vn.firstDayOfYear=function(){return this._week.doy},vn.firstDayOfWeek=function(){return this._week.dow},vn.weekdays=function(t,e){var n=i(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?jt(n,this._week.dow):t?n[t.day()]:n},vn.weekdaysMin=function(t){return!0===t?jt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},vn.weekdaysShort=function(t){return!0===t?jt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},vn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return Ut.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},vn.weekdaysRegex=function(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Wt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},vn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ht),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},vn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ae("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===U(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=A("moment.lang is deprecated. Use moment.locale instead.",ae),r.langData=A("moment.langData is deprecated. Use moment.localeData instead.",se);var _n=Math.abs;function An(t,e,n,r){var i=Fe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function xn(t){return t<0?Math.floor(t):Math.ceil(t)}function Sn(t){return 4800*t/146097}function Tn(t){return 146097*t/4800}function kn(t){return function(){return this.as(t)}}var Cn=kn("ms"),Dn=kn("s"),zn=kn("m"),En=kn("h"),Ln=kn("d"),On=kn("w"),In=kn("M"),Nn=kn("Q"),Pn=kn("y");function Rn(t){return function(){return this.isValid()?this._data[t]:NaN}}var Bn=Rn("milliseconds"),jn=Rn("seconds"),qn=Rn("minutes"),Fn=Rn("hours"),$n=Rn("days"),Wn=Rn("months"),Xn=Rn("years"),Hn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Vn(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}var Gn=Math.abs;function Yn(t){return(t>0)-(t<0)||+t}function Kn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,a,o,s,l=Gn(this._milliseconds)/1e3,c=Gn(this._days),u=Gn(this._months),d=this.asSeconds();return d?(t=H(l/60),e=H(t/60),l%=60,t%=60,n=H(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",a=Yn(this._months)!==Yn(d)?"-":"",o=Yn(this._days)!==Yn(d)?"-":"",s=Yn(this._milliseconds)!==Yn(d)?"-":"",i+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?o+c+"D":"")+(e||t||l?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(l?s+r+"S":"")):"P0D"}var Zn=ze.prototype;return Zn.isValid=function(){return this._isValid},Zn.abs=function(){var t=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),t.milliseconds=_n(t.milliseconds),t.seconds=_n(t.seconds),t.minutes=_n(t.minutes),t.hours=_n(t.hours),t.months=_n(t.months),t.years=_n(t.years),this},Zn.add=function(t,e){return An(this,t,e,1)},Zn.subtract=function(t,e){return An(this,t,e,-1)},Zn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=q(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Sn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Tn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Zn.asMilliseconds=Cn,Zn.asSeconds=Dn,Zn.asMinutes=zn,Zn.asHours=En,Zn.asDays=Ln,Zn.asWeeks=On,Zn.asMonths=In,Zn.asQuarters=Nn,Zn.asYears=Pn,Zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*U(this._months/12):NaN},Zn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*xn(Tn(s)+o),o=0,s=0),l.milliseconds=a%1e3,t=H(a/1e3),l.seconds=t%60,e=H(t/60),l.minutes=e%60,n=H(e/60),l.hours=n%24,o+=H(n/24),i=H(Sn(o)),s+=i,o-=xn(Tn(i)),r=H(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},Zn.clone=function(){return Fe(this)},Zn.get=function(t){return t=q(t),this.isValid()?this[t+"s"]():NaN},Zn.milliseconds=Bn,Zn.seconds=jn,Zn.minutes=qn,Zn.hours=Fn,Zn.days=$n,Zn.weeks=function(){return H(this.days()/7)},Zn.months=Wn,Zn.years=Xn,Zn.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=Un;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(a=Object.assign({},Un,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),n=this.localeData(),r=function(t,e,n,r){var i=Fe(t).abs(),a=Hn(i.as("s")),o=Hn(i.as("m")),s=Hn(i.as("h")),l=Hn(i.as("d")),c=Hn(i.as("M")),u=Hn(i.as("w")),d=Hn(i.as("y")),f=a<=n.ss&&["s",a]||a0,f[4]=r,Vn.apply(null,f)}(this,!i,a,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},Zn.toISOString=Kn,Zn.toString=Kn,Zn.toJSON=Kn,Zn.locale=Qe,Zn.localeData=tn,Zn.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kn),Zn.lang=Je,N("X",0,0,"unix"),N("x",0,0,"valueOf"),ht("x",ct),ht("X",/[+-]?\d+(\.\d{1,3})?/),vt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),vt("x",(function(t,e,n){n._d=new Date(U(t))})),r.version="2.27.0",e=Se,r.fn=gn,r.min=function(){var t=[].slice.call(arguments,0);return Ce("isBefore",t)},r.max=function(){var t=[].slice.call(arguments,0);return Ce("isAfter",t)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=h,r.unix=function(t){return Se(1e3*t)},r.months=function(t,e){return Mn(t,e,"months")},r.isDate=u,r.locale=ae,r.invalid=g,r.duration=Fe,r.isMoment=w,r.weekdays=function(t,e,n){return wn(t,e,n,"weekdays")},r.parseZone=function(){return Se.apply(null,arguments).parseZone()},r.localeData=se,r.isDuration=Ee,r.monthsShort=function(t,e){return Mn(t,e,"monthsShort")},r.weekdaysMin=function(t,e,n){return wn(t,e,n,"weekdaysMin")},r.defineLocale=oe,r.updateLocale=function(t,e){if(null!=e){var n,r,i=Jt;null!=te[t]&&null!=te[t].parentLocale?te[t].set(C(te[t]._config,e)):(null!=(r=ie(t))&&(i=r._config),e=C(i,e),null==r&&(e.abbr=t),(n=new D(e)).parentLocale=te[t],te[t]=n),ae(t)}else null!=te[t]&&(null!=te[t].parentLocale?(te[t]=te[t].parentLocale,t===ae()&&ae(t)):null!=te[t]&&delete te[t]);return te[t]},r.locales=function(){return x(te)},r.weekdaysShort=function(t,e,n){return wn(t,e,n,"weekdaysShort")},r.normalizeUnits=q,r.relativeTimeRounding=function(t){return void 0===t?Hn:"function"==typeof t&&(Hn=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==Un[t]&&(void 0===e?Un[t]:(Un[t]=e,"s"===t&&(Un.ss=e-1),!0))},r.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=gn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(11)(t))},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(66)("wks"),i=n(67),a=n(22).Symbol,o="function"==typeof a;(t.exports=function(t){return r[t]||(r[t]=o&&a[t]||(o?a:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(29);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(a=new Array(s-1),o=0;o>>24]^u[p>>>16&255]^d[m>>>8&255]^f[255&g]^e[b++],o=c[p>>>24]^u[m>>>16&255]^d[g>>>8&255]^f[255&h]^e[b++],s=c[m>>>24]^u[g>>>16&255]^d[h>>>8&255]^f[255&p]^e[b++],l=c[g>>>24]^u[h>>>16&255]^d[p>>>8&255]^f[255&m]^e[b++],h=a,p=o,m=s,g=l;return a=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[b++],o=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^e[b++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^e[b++],l=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[b++],[a>>>=0,o>>>=0,s>>>=0,l>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,l=0;l<256;++l){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,n[o]=c,r[c]=o;var u=t[o],d=t[u],f=t[d],h=257*t[c]^16843008*c;i[0][o]=h<<24|h>>>8,i[1][o]=h<<16|h>>>16,i[2][o]=h<<8|h>>>24,i[3][o]=h,h=16843009*f^65537*d^257*u^16843008*o,a[0][c]=h<<24|h>>>8,a[1][c]=h<<16|h>>>16,a[2][c]=h<<8|h>>>24,a[3][c]=h,0===o?o=s=1:(o=u^t[t[t[f^u]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:a}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],a=0;a>>24,o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o],o^=s[a/e|0]<<24):e>6&&a%e==4&&(o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o]),i[a]=i[a-e]^o}for(var c=[],u=0;u>>24]]^l.INV_SUB_MIX[1][l.SBOX[f>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[f>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&f]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return o(t=i(t),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=o(t,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),a=r.allocUnsafe(16);return a.writeUInt32BE(n[0],0),a.writeUInt32BE(n[3],4),a.writeUInt32BE(n[2],8),a.writeUInt32BE(n[1],12),a},c.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=c},function(t,e,n){var r=n(1).Buffer,i=n(42);t.exports=function(t,e,n,a){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=n/8,s=r.alloc(o),l=r.alloc(a||0),c=r.alloc(0);o>0||a>0;){var u=new i;u.update(c),u.update(t),e&&u.update(e),c=u.digest();var d=0;if(o>0){var f=s.length-o;d=Math.min(o,c.length),c.copy(s,f,0,d),o-=d}if(d0){var h=l.length-a,p=Math.min(a,c.length-d);c.copy(l,h,d,d+p),a-=p}}return c.fill(0),{key:s,iv:l}}},function(t,e,n){"use strict";var r=n(10),i=n(6),a=i.getNAF,o=i.getJSF,s=i.assert;function l(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),r=a(e,1,this._bitLength),i=(1<=o;u--)l=(l<<1)+r[u];c.push(l)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o=0;c--){for(var u=0;c>=0&&0===o[c];c--)u++;if(c>=0&&u++,l=l.dblp(u),c<0)break;var d=o[c];s(0!==d),l="affine"===t.type?d>0?l.mixedAdd(i[d-1>>1]):l.mixedAdd(i[-d-1>>1].neg()):d>0?l.add(i[d-1>>1]):l.add(i[-d-1>>1].neg())}return"affine"===t.type?l.toP():l},l.prototype._wnafMulAdd=function(t,e,n,r,i){var s,l,c,u=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(s=0;s=1;s-=2){var m=s-1,g=s;if(1===u[m]&&1===u[g]){var b=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(b[1]=e[m].add(e[g]),b[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(b[1]=e[m].toJ().mixedAdd(e[g]),b[2]=e[m].add(e[g].neg())):(b[1]=e[m].toJ().mixedAdd(e[g]),b[2]=e[m].toJ().mixedAdd(e[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=o(n[m],n[g]);for(h=Math.max(y[0].length,h),f[m]=new Array(h),f[g]=new Array(h),l=0;l=0;s--){for(var x=0;s>=0;){var S=!0;for(l=0;l=0&&x++,_=_.dblp(x),s<0)break;for(l=0;l0?c=d[l][T-1>>1]:T<0&&(c=d[l][-T-1>>1].neg()),_="affine"===c.type?_.mixedAdd(c):_.add(c))}}for(s=0;s=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i1&&s.call(r[0],n,(function(){for(i=1;i>>32-e}function c(t,e,n,r,i,a,o){return l(t+(e&n|~e&r)+i+a|0,o)+e|0}function u(t,e,n,r,i,a,o){return l(t+(e&r|n&~r)+i+a|0,o)+e|0}function d(t,e,n,r,i,a,o){return l(t+(e^n^r)+i+a|0,o)+e|0}function f(t,e,n,r,i,a,o){return l(t+(n^(e|~r))+i+a|0,o)+e|0}r(s,i),s.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,a=this._d;n=c(n,r,i,a,t[0],3614090360,7),a=c(a,n,r,i,t[1],3905402710,12),i=c(i,a,n,r,t[2],606105819,17),r=c(r,i,a,n,t[3],3250441966,22),n=c(n,r,i,a,t[4],4118548399,7),a=c(a,n,r,i,t[5],1200080426,12),i=c(i,a,n,r,t[6],2821735955,17),r=c(r,i,a,n,t[7],4249261313,22),n=c(n,r,i,a,t[8],1770035416,7),a=c(a,n,r,i,t[9],2336552879,12),i=c(i,a,n,r,t[10],4294925233,17),r=c(r,i,a,n,t[11],2304563134,22),n=c(n,r,i,a,t[12],1804603682,7),a=c(a,n,r,i,t[13],4254626195,12),i=c(i,a,n,r,t[14],2792965006,17),n=u(n,r=c(r,i,a,n,t[15],1236535329,22),i,a,t[1],4129170786,5),a=u(a,n,r,i,t[6],3225465664,9),i=u(i,a,n,r,t[11],643717713,14),r=u(r,i,a,n,t[0],3921069994,20),n=u(n,r,i,a,t[5],3593408605,5),a=u(a,n,r,i,t[10],38016083,9),i=u(i,a,n,r,t[15],3634488961,14),r=u(r,i,a,n,t[4],3889429448,20),n=u(n,r,i,a,t[9],568446438,5),a=u(a,n,r,i,t[14],3275163606,9),i=u(i,a,n,r,t[3],4107603335,14),r=u(r,i,a,n,t[8],1163531501,20),n=u(n,r,i,a,t[13],2850285829,5),a=u(a,n,r,i,t[2],4243563512,9),i=u(i,a,n,r,t[7],1735328473,14),n=d(n,r=u(r,i,a,n,t[12],2368359562,20),i,a,t[5],4294588738,4),a=d(a,n,r,i,t[8],2272392833,11),i=d(i,a,n,r,t[11],1839030562,16),r=d(r,i,a,n,t[14],4259657740,23),n=d(n,r,i,a,t[1],2763975236,4),a=d(a,n,r,i,t[4],1272893353,11),i=d(i,a,n,r,t[7],4139469664,16),r=d(r,i,a,n,t[10],3200236656,23),n=d(n,r,i,a,t[13],681279174,4),a=d(a,n,r,i,t[0],3936430074,11),i=d(i,a,n,r,t[3],3572445317,16),r=d(r,i,a,n,t[6],76029189,23),n=d(n,r,i,a,t[9],3654602809,4),a=d(a,n,r,i,t[12],3873151461,11),i=d(i,a,n,r,t[15],530742520,16),n=f(n,r=d(r,i,a,n,t[2],3299628645,23),i,a,t[0],4096336452,6),a=f(a,n,r,i,t[7],1126891415,10),i=f(i,a,n,r,t[14],2878612391,15),r=f(r,i,a,n,t[5],4237533241,21),n=f(n,r,i,a,t[12],1700485571,6),a=f(a,n,r,i,t[3],2399980690,10),i=f(i,a,n,r,t[10],4293915773,15),r=f(r,i,a,n,t[1],2240044497,21),n=f(n,r,i,a,t[8],1873313359,6),a=f(a,n,r,i,t[15],4264355552,10),i=f(i,a,n,r,t[6],2734768916,15),r=f(r,i,a,n,t[13],1309151649,21),n=f(n,r,i,a,t[4],4149444226,6),a=f(a,n,r,i,t[11],3174756917,10),i=f(i,a,n,r,t[2],718787259,15),r=f(r,i,a,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+a|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=a.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(2))},function(t,e,n){"use strict";var r=n(17).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,a){if("function"==typeof n)return t(e,null,n);n||(n={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i>>32-e}function m(t,e,n,r,i,a,o,s){return p(t+(e^n^r)+a+o|0,s)+i|0}function g(t,e,n,r,i,a,o,s){return p(t+(e&n|~e&r)+a+o|0,s)+i|0}function b(t,e,n,r,i,a,o,s){return p(t+((e|~n)^r)+a+o|0,s)+i|0}function v(t,e,n,r,i,a,o,s){return p(t+(e&r|n&~r)+a+o|0,s)+i|0}function y(t,e,n,r,i,a,o,s){return p(t+(e^(n|~r))+a+o|0,s)+i|0}i(h,a),h.prototype._update=function(){for(var t=o,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,a=0|this._d,h=0|this._e,M=0|this._a,w=0|this._b,_=0|this._c,A=0|this._d,x=0|this._e,S=0;S<80;S+=1){var T,k;S<16?(T=m(n,r,i,a,h,t[s[S]],d[0],c[S]),k=y(M,w,_,A,x,t[l[S]],f[0],u[S])):S<32?(T=g(n,r,i,a,h,t[s[S]],d[1],c[S]),k=v(M,w,_,A,x,t[l[S]],f[1],u[S])):S<48?(T=b(n,r,i,a,h,t[s[S]],d[2],c[S]),k=b(M,w,_,A,x,t[l[S]],f[2],u[S])):S<64?(T=v(n,r,i,a,h,t[s[S]],d[3],c[S]),k=g(M,w,_,A,x,t[l[S]],f[3],u[S])):(T=y(n,r,i,a,h,t[s[S]],d[4],c[S]),k=m(M,w,_,A,x,t[l[S]],f[4],u[S])),n=h,h=a,a=p(i,10),i=r,r=T,M=x,x=A,A=p(_,10),_=w,w=k}var C=this._b+i+A|0;this._b=this._c+a+x|0,this._c=this._d+h+M|0,this._d=this._e+n+w|0,this._e=this._a+r+_|0,this._a=C},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=h},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(192),e.sha1=n(193),e.sha224=n(194),e.sha256=n(81),e.sha384=n(195),e.sha512=n(82)},function(t,e,n){(e=t.exports=n(83)).Stream=e,e.Readable=e,e.Writable=n(48),e.Duplex=n(15),e.Transform=n(86),e.PassThrough=n(202)},function(t,e,n){"use strict";(function(e,r,i){var a=n(33);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var s,l=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:a.nextTick;v.WritableState=b;var c=Object.create(n(24));c.inherits=n(0);var u={deprecate:n(43)},d=n(84),f=n(1).Buffer,h=i.Uint8Array||function(){};var p,m=n(85);function g(){}function b(t,e){s=s||n(15),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(a.nextTick(i,r),a.nextTick(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),x(t,e))}(t,n,r,e,i);else{var o=_(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),r?l(M,t,n,o,i):M(t,n,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function v(t){if(s=s||n(15),!(p.call(v,this)||this instanceof s))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),d.call(this)}function y(t,e,n,r,i,a,o){e.writelen=r,e.writecb=o,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function M(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),x(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,y(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(y(t,e,!1,e.objectMode?1:c.length,c,u,d),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),x(t,e)}))}function x(t,e){var n=_(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(A,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(v,d),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,i=this._writableState,o=!1,s=!i.objectMode&&(r=t,f.isBuffer(r)||r instanceof h);return s&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),a.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(r,o),i=!1),i}(this,i,t,n))&&(i.pendingcb++,o=function(t,e,n,r,i,a){if(!n){var o=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,n));return e}(e,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=e.objectMode?1:r.length;e.length+=s;var l=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,x(t,e),n&&(e.finished?a.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(3),n(200).setImmediate,n(2))},function(t,e,n){"use strict";var r=n(5);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function o(t,n){var i=function(t){var e=a(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),o=n.modulus.byteLength(),s=new r(t).mul(i.blinder).umod(n.modulus),l=s.toRed(r.mont(n.prime1)),c=s.toRed(r.mont(n.prime2)),u=n.coefficient,d=n.prime1,f=n.prime2,h=l.redPow(n.exponent1).fromRed(),p=c.redPow(n.exponent2).fromRed(),m=h.isub(p).imul(u).umod(d).imul(f);return p.iadd(m).imul(i.unblinder).umod(n.modulus).toArrayLike(e,"be",o)}o.getr=a,t.exports=o}).call(this,n(4).Buffer)},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(242).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function l(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,i){for(var a=0,o=0,s=Math.min(t.length,n),l=e;l=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&o0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this._strip()},a.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=l(t,e,r)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this._strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(t){a.prototype.inspect=d}else a.prototype.inspect=d;function d(){return(this.red?""}var f=["","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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,a=0,o=0;o>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),n=0!==a||o!==this.length-1?f[6-l.length]+l+n:l+n}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],u=p[t];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(t);n=(d=d.idivn(u)).isZero()?m+n:f[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},o&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=f;h++){var p=c-h|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[h])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}a.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0");var o=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,a);return this["_toArrayLike"+("le"===e?"LE":"BE")](o,i),o},a.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,a=0;i>8&255),n>16&255),6===a?(n>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n=0&&(t[n--]=o>>8&255),n>=0&&(t[n--]=o>>16&255),6===a?(n>=0&&(t[n--]=o>>24&255),r=0,a=0):(r=o>>>24,a+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,h=0|o[1],p=8191&h,m=h>>>13,g=0|o[2],b=8191&g,v=g>>>13,y=0|o[3],M=8191&y,w=y>>>13,_=0|o[4],A=8191&_,x=_>>>13,S=0|o[5],T=8191&S,k=S>>>13,C=0|o[6],D=8191&C,z=C>>>13,E=0|o[7],L=8191&E,O=E>>>13,I=0|o[8],N=8191&I,P=I>>>13,R=0|o[9],B=8191&R,j=R>>>13,q=0|s[0],F=8191&q,$=q>>>13,W=0|s[1],X=8191&W,H=W>>>13,U=0|s[2],V=8191&U,G=U>>>13,Y=0|s[3],K=8191&Y,Z=Y>>>13,Q=0|s[4],J=8191&Q,tt=Q>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],dt=8191&ut,ft=ut>>>13,ht=0|s[9],pt=8191&ht,mt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,$))+Math.imul(f,F)|0))<<13)|0;c=((a=Math.imul(f,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,$))+Math.imul(m,F)|0,a=Math.imul(m,$);var bt=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,X)|0))<<13)|0;c=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,$))+Math.imul(v,F)|0,a=Math.imul(v,$),r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,V)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,$))+Math.imul(w,F)|0,a=Math.imul(w,$),r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,G)|0;var yt=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,K)|0))<<13)|0;c=((a=a+Math.imul(f,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(A,F),i=(i=Math.imul(A,$))+Math.imul(x,F)|0,a=Math.imul(x,$),r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,Z)|0;var Mt=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,$))+Math.imul(k,F)|0,a=Math.imul(k,$),r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,H)|0,r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(w,V)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((a=a+Math.imul(f,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(D,F),i=(i=Math.imul(D,$))+Math.imul(z,F)|0,a=Math.imul(z,$),r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,H)|0,r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0;var _t=(c+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,$))+Math.imul(O,F)|0,a=Math.imul(O,$),r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,H)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,V)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,a=a+Math.imul(v,rt)|0,r=r+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var At=(c+(r=r+Math.imul(d,lt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,$))+Math.imul(P,F)|0,a=Math.imul(P,$),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(z,V)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,K)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(w,nt)|0,a=a+Math.imul(w,rt)|0,r=r+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var xt=(c+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,$))+Math.imul(j,F)|0,a=Math.imul(j,$),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,Z)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,ot)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0,r=r+Math.imul(p,dt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,ft)|0;var St=(c+(r=r+Math.imul(d,pt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((a=a+Math.imul(f,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,H))+Math.imul(j,X)|0,a=Math.imul(j,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(P,V)|0,a=a+Math.imul(P,G)|0,r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(k,nt)|0,a=a+Math.imul(k,rt)|0,r=r+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ct)|0,r=r+Math.imul(b,dt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(v,dt)|0,a=a+Math.imul(v,ft)|0;var Tt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(j,V)|0,a=Math.imul(j,G),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Z)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(D,nt)|0,i=(i=i+Math.imul(D,rt)|0)+Math.imul(z,nt)|0,a=a+Math.imul(z,rt)|0,r=r+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(x,lt)|0,a=a+Math.imul(x,ct)|0,r=r+Math.imul(M,dt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(w,dt)|0,a=a+Math.imul(w,ft)|0;var kt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((a=a+Math.imul(v,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,Z))+Math.imul(j,K)|0,a=Math.imul(j,Z),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,tt)|0,r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,r=r+Math.imul(A,dt)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ft)|0;var Ct=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((a=a+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(j,J)|0,a=Math.imul(j,tt),r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(P,nt)|0,a=a+Math.imul(P,rt)|0,r=r+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,r=r+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,r=r+Math.imul(T,dt)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,dt)|0,a=a+Math.imul(k,ft)|0;var Dt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((a=a+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(j,nt)|0,a=Math.imul(j,rt),r=r+Math.imul(N,at)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,r=r+Math.imul(D,dt)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(z,dt)|0,a=a+Math.imul(z,ft)|0;var zt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0,r=r+Math.imul(L,dt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,ft)|0;var Et=(c+(r=r+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(z,pt)|0))<<13)|0;c=((a=a+Math.imul(z,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),r=r+Math.imul(N,dt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(P,dt)|0,a=a+Math.imul(P,ft)|0;var Lt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(B,dt),i=(i=Math.imul(B,ft))+Math.imul(j,dt)|0,a=Math.imul(j,ft);var Ot=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((a=a+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var It=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=bt,l[2]=vt,l[3]=yt,l[4]=Mt,l[5]=wt,l[6]=_t,l[7]=At,l[8]=xt,l[9]=St,l[10]=Tt,l[11]=kt,l[12]=Ct,l[13]=Dt,l[14]=zt,l[15]=Et,l[16]=Lt,l[17]=Ot,l[18]=It,0!==c&&(l[19]=c,n.length++),n};function b(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n._strip()}function v(t,e,n){return b(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(g=m),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?m(this,t,e):n<1024?b(this,t,e):v(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r>=1;return r},y.prototype.permute=function(t,e,n,r,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,n+=a/67108864|0,n+=o>>>26,this.words[i]=67108863&o}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i&1}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,a=this.length-1;a>=0;a--)i=(n*i+(0|this.words[a]))%t;return e?-i:i},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*n;this.words[i]=a/t|0,n=a%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),o.isub(l)):(n.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new T(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var M={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(M[t])return M[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new A;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return M[t]=e,e},T.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}l=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,T),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(11)(t))},function(t,e,n){"use strict";var r=e;r.version=n(243).version,r.utils=n(6),r.rand=n(52),r.curve=n(112),r.curves=n(58),r.ec=n(255),r.eddsa=n(259)},function(t,e,n){"use strict";var r,i=e,a=n(59),o=n(112),s=n(6).assert;function l(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.type?this.curve=new o.edwards(t):this.curve=new o.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new l(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=l,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(254)}catch(t){r=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){var r=e;r.utils=n(9),r.common=n(26),r.sha=n(248),r.ripemd=n(252),r.hmac=n(253),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";(function(e){var r,i=n(4),a=i.Buffer,o={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(o[r]=i[r]);var s=o.Buffer={};for(r in a)a.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(s[r]=a[r]);if(o.Buffer.prototype=a.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,n){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return a(t,e,n)}),s.alloc||(s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=a(t);return e&&0!==e.length?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r}),!o.kStringMaxLength)try{o.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(t){}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),t.exports=o}).call(this,n(3))},function(t,e,n){"use strict";const r=n(62).Reporter,i=n(27).EncoderBuffer,a=n(27).DecoderBuffer,o=n(5),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(t,e,n){const r={};this._baseState=r,r.name=n,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const t=this._baseState,e={};u.forEach((function(n){e[n]=t[n]}));const n=new this.constructor(e.parent);return n._baseState=e,n},c.prototype._wrap=function(){const t=this._baseState;l.forEach((function(e){this[e]=function(){const n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},c.prototype._init=function(t){const e=this._baseState;o(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),o.equal(e.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(t){const e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(o(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(o(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);const r=t[n];e[r]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){c.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){c.prototype[t]=function(){const e=this._baseState,n=Array.prototype.slice.call(arguments);return o(null===e.tag),e.tag=t,this._useArgs(n),this}})),c.prototype.use=function(t){o(t);const e=this._baseState;return o(null===e.use),e.use=t,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(t){const e=this._baseState;return o(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){const e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){const e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},c.prototype.key=function(t){const e=this._baseState;return o(null===e.key),e.key=t,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(t){const e=this._baseState;return o(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},c.prototype.contains=function(t){const e=this._baseState;return o(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){const n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));let r,i=n.default,o=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(o=this._peekTag(t,r,n.any),t.isError(o))return o}else{const r=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(r)}}if(n.obj&&o&&(r=t.enterObject()),o){if(null!==n.explicit){const e=this._decodeTag(t,n.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===n.use&&null===n.choice){let e;n.any&&(e=t.save());const r=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(r))return r;n.any?i=t.raw(e):t=r}if(e&&e.track&&null!==n.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new a(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(r,e)}}return n.obj&&o&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,i),i},c.prototype._decodeGeneric=function(t,e,n){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},c.prototype._getUse=function(t,e){const n=this._baseState;return n.useDecoder=this._use(t,e),o(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(t,e){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(a){const o=t.save(),s=n.choice[a];try{const n=s._decode(t,e);if(t.isError(n))return!1;r={type:a,value:n},i=!0}catch(e){return t.restore(o),!1}return!0}),this),i?r:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},c.prototype._encode=function(t,e,n){const r=this._baseState;if(null!==r.default&&r.default===t)return;const i=this._encodeValue(t,e,n);return void 0===i||this._skipDefault(i,e,n)?void 0:i},c.prototype._encodeValue=function(t,e,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);let a=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let o=null,s=!1;if(i.any)a=this._createEncoderBuffer(t);else if(i.choice)a=this._encodeChoice(t,e);else if(i.contains)o=this._getUse(i.contains,n)._encode(t,e),s=!0;else if(i.children)o=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");const r=e.enterKey(n._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const i=n._encode(t[n._baseState.key],e,t);return e.leaveKey(r),i}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(n){const r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),n))}else null!==i.use?a=this._getUse(i.use,n)._encode(t,e):(o=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===t?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(t,s,n,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},c.prototype._encodeChoice=function(t,e){const n=this._baseState,r=n.choice[t.type];return r||o(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},c.prototype._encodePrimitive=function(t,e){const n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,n){"use strict";const r=n(0);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof a},i.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){const e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){let e;const n=this._reporterState,r=t instanceof a;if(e=r?t:new a(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.errors.push(e),e},i.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,n){"use strict";function r(t){const e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);const r=t[n];e[r]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.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"},e.tagByName=r(e.tag)},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(278).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,r){for(var i=0,a=Math.min(t.length,n),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=l(t,e,r)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=f;h++){var p=c-h|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[h])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}a.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],h=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,h=0|o[1],p=8191&h,m=h>>>13,g=0|o[2],b=8191&g,v=g>>>13,y=0|o[3],M=8191&y,w=y>>>13,_=0|o[4],A=8191&_,x=_>>>13,S=0|o[5],T=8191&S,k=S>>>13,C=0|o[6],D=8191&C,z=C>>>13,E=0|o[7],L=8191&E,O=E>>>13,I=0|o[8],N=8191&I,P=I>>>13,R=0|o[9],B=8191&R,j=R>>>13,q=0|s[0],F=8191&q,$=q>>>13,W=0|s[1],X=8191&W,H=W>>>13,U=0|s[2],V=8191&U,G=U>>>13,Y=0|s[3],K=8191&Y,Z=Y>>>13,Q=0|s[4],J=8191&Q,tt=Q>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],dt=8191&ut,ft=ut>>>13,ht=0|s[9],pt=8191&ht,mt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,$))+Math.imul(f,F)|0))<<13)|0;c=((a=Math.imul(f,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,$))+Math.imul(m,F)|0,a=Math.imul(m,$);var bt=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,X)|0))<<13)|0;c=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,$))+Math.imul(v,F)|0,a=Math.imul(v,$),r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,V)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,$))+Math.imul(w,F)|0,a=Math.imul(w,$),r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,G)|0;var yt=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,K)|0))<<13)|0;c=((a=a+Math.imul(f,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(A,F),i=(i=Math.imul(A,$))+Math.imul(x,F)|0,a=Math.imul(x,$),r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,Z)|0;var Mt=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,$))+Math.imul(k,F)|0,a=Math.imul(k,$),r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,H)|0,r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(w,V)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((a=a+Math.imul(f,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(D,F),i=(i=Math.imul(D,$))+Math.imul(z,F)|0,a=Math.imul(z,$),r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,H)|0,r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0;var _t=(c+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,$))+Math.imul(O,F)|0,a=Math.imul(O,$),r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,H)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,V)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,a=a+Math.imul(v,rt)|0,r=r+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var At=(c+(r=r+Math.imul(d,lt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,$))+Math.imul(P,F)|0,a=Math.imul(P,$),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(z,V)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,K)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(w,nt)|0,a=a+Math.imul(w,rt)|0,r=r+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var xt=(c+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,$))+Math.imul(j,F)|0,a=Math.imul(j,$),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,Z)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,ot)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0,r=r+Math.imul(p,dt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,ft)|0;var St=(c+(r=r+Math.imul(d,pt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((a=a+Math.imul(f,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,H))+Math.imul(j,X)|0,a=Math.imul(j,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(P,V)|0,a=a+Math.imul(P,G)|0,r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(k,nt)|0,a=a+Math.imul(k,rt)|0,r=r+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ct)|0,r=r+Math.imul(b,dt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(v,dt)|0,a=a+Math.imul(v,ft)|0;var Tt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(j,V)|0,a=Math.imul(j,G),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Z)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(D,nt)|0,i=(i=i+Math.imul(D,rt)|0)+Math.imul(z,nt)|0,a=a+Math.imul(z,rt)|0,r=r+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(x,lt)|0,a=a+Math.imul(x,ct)|0,r=r+Math.imul(M,dt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(w,dt)|0,a=a+Math.imul(w,ft)|0;var kt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((a=a+Math.imul(v,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,Z))+Math.imul(j,K)|0,a=Math.imul(j,Z),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,tt)|0,r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,r=r+Math.imul(A,dt)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ft)|0;var Ct=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((a=a+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(j,J)|0,a=Math.imul(j,tt),r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(P,nt)|0,a=a+Math.imul(P,rt)|0,r=r+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,r=r+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,r=r+Math.imul(T,dt)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,dt)|0,a=a+Math.imul(k,ft)|0;var Dt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((a=a+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(j,nt)|0,a=Math.imul(j,rt),r=r+Math.imul(N,at)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,r=r+Math.imul(D,dt)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(z,dt)|0,a=a+Math.imul(z,ft)|0;var zt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0,r=r+Math.imul(L,dt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,ft)|0;var Et=(c+(r=r+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(z,pt)|0))<<13)|0;c=((a=a+Math.imul(z,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),r=r+Math.imul(N,dt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(P,dt)|0,a=a+Math.imul(P,ft)|0;var Lt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(B,dt),i=(i=Math.imul(B,ft))+Math.imul(j,dt)|0,a=Math.imul(j,ft);var Ot=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((a=a+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var It=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=bt,l[2]=vt,l[3]=yt,l[4]=Mt,l[5]=wt,l[6]=_t,l[7]=At,l[8]=xt,l[9]=St,l[10]=Tt,l[11]=kt,l[12]=Ct,l[13]=Dt,l[14]=zt,l[15]=Et,l[16]=Lt,l[17]=Ot,l[18]=It,0!==c&&(l[19]=c,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},a.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),o.isub(l)):(n.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new A(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new M;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return b[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}l=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new x(t)},i(x,A),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(11)(t))},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(38),i=n(22),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(142)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(22),i=n(40),a=n(158),o=n(67)("src"),s=n(159),l=(""+s).split("toString");n(38).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(a(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(a(n,o)||i(n,o,t[e]?""+t[e]:l.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(t,e,n){var r,i,a;i=[n(7)],void 0===(a="function"==typeof(r=function(t){t.extend(t.fn,{validate:function(e){if(this.length){var n=t.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new t.validator(e,this[0]),t.data(this[0],"validator",n),n.settings.onsubmit&&(this.on("click.validate",":submit",(function(e){n.submitButton=e.currentTarget,t(this).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(n.cancelSubmit=!0)})),this.on("submit.validate",(function(e){function r(){var r,i;return n.submitButton&&(n.settings.submitHandler||n.formSubmitted)&&(r=t("").attr("name",n.submitButton.name).val(t(n.submitButton).val()).appendTo(n.currentForm)),!(n.settings.submitHandler&&!n.settings.debug)||(i=n.settings.submitHandler.call(n,n.currentForm,e),r&&r.remove(),void 0!==i&&i)}return n.settings.debug&&e.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)}))),n)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,n,r;return t(this[0]).is("form")?e=this.validate().form():(r=[],e=!0,n=t(this[0].form).validate(),this.each((function(){(e=n.element(this)&&e)||(r=r.concat(n.errorList))})),n.errorList=r),e},rules:function(e,n){var r,i,a,o,s,l,c=this[0],u=void 0!==this.attr("contenteditable")&&"false"!==this.attr("contenteditable");if(null!=c&&(!c.form&&u&&(c.form=this.closest("form")[0],c.name=this.attr("name")),null!=c.form)){if(e)switch(i=(r=t.data(c.form,"validator").settings).rules,a=t.validator.staticRules(c),e){case"add":t.extend(a,t.validator.normalizeRule(n)),delete a.messages,i[c.name]=a,n.messages&&(r.messages[c.name]=t.extend(r.messages[c.name],n.messages));break;case"remove":return n?(l={},t.each(n.split(/\s/),(function(t,e){l[e]=a[e],delete a[e]})),l):(delete i[c.name],a)}return(o=t.validator.normalizeRules(t.extend({},t.validator.classRules(c),t.validator.attributeRules(c),t.validator.dataRules(c),t.validator.staticRules(c)),c)).required&&(s=o.required,delete o.required,o=t.extend({required:s},o)),o.remote&&(s=o.remote,delete o.remote,o=t.extend(o,{remote:s})),o}}});var e,n=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.extend(t.expr.pseudos||t.expr[":"],{blank:function(e){return!n(""+t(e).val())},filled:function(e){var r=t(e).val();return null!==r&&!!n(""+r)},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,n){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=n,this.init()},t.validator.format=function(e,n){return 1===arguments.length?function(){var n=t.makeArray(arguments);return n.unshift(e),t.validator.format.apply(this,n)}:(void 0===n||(arguments.length>2&&n.constructor!==Array&&(n=t.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),t.each(n,(function(t,n){e=e.replace(new RegExp("\\{"+t+"\\}","g"),(function(){return n}))}))),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,n){9===n.which&&""===this.elementValue(e)||-1!==t.inArray(n.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,n,r){"radio"===e.type?this.findByName(e.name).addClass(n).removeClass(r):t(e).addClass(n).removeClass(r)},unhighlight:function(e,n,r){"radio"===e.type?this.findByName(e.name).removeClass(n).addClass(r):t(e).removeClass(n).addClass(r)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}."),step:t.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var e,n=this.currentForm,r=this.groups={};function i(e){var r=void 0!==t(this).attr("contenteditable")&&"false"!==t(this).attr("contenteditable");if(!this.form&&r&&(this.form=t(this).closest("form")[0],this.name=t(this).attr("name")),n===this.form){var i=t.data(this.form,"validator"),a="on"+e.type.replace(/^validate/,""),o=i.settings;o[a]&&!t(this).is(o.ignore)&&o[a].call(i,this,e)}}t.each(this.settings.groups,(function(e,n){"string"==typeof n&&(n=n.split(/\s/)),t.each(n,(function(t,n){r[n]=e}))})),e=this.settings.rules,t.each(e,(function(n,r){e[n]=t.validator.normalizeRule(r)})),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",i).on("click.validate","select, option, [type='radio'], [type='checkbox']",i),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var n,r,i=this.clean(e),a=this.validationTargetFor(i),o=this,s=!0;return void 0===a?delete this.invalid[i.name]:(this.prepareElement(a),this.currentElements=t(a),(r=this.groups[a.name])&&t.each(this.groups,(function(t,e){e===r&&t!==a.name&&(i=o.validationTargetFor(o.clean(o.findByName(t))))&&i.name in o.invalid&&(o.currentElements.push(i),s=o.check(i)&&s)})),n=!1!==this.check(a),s=s&&n,this.invalid[a.name]=!n,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),t(e).attr("aria-invalid",!n)),s},showErrors:function(e){if(e){var n=this;t.extend(this.errorMap,e),this.errorList=t.map(this.errorMap,(function(t,e){return{message:t,element:n.findByName(e)[0]}})),this.successList=t.grep(this.successList,(function(t){return!(t.name in e)}))}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,n=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").trigger("focus").trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,(function(t){return t.element.name===e.name})).length&&e},elements:function(){var e=this,n={};return t(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter((function(){var r=this.name||t(this).attr("name"),i=void 0!==t(this).attr("contenteditable")&&"false"!==t(this).attr("contenteditable");return!r&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),i&&(this.form=t(this).closest("form")[0],this.name=r),!(this.form!==e.currentForm||r in n||!e.objectLength(t(this).rules())||(n[r]=!0,0))}))},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([])},reset:function(){this.resetInternals(),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var n,r,i=t(e),a=e.type,o=void 0!==i.attr("contenteditable")&&"false"!==i.attr("contenteditable");return"radio"===a||"checkbox"===a?this.findByName(e.name).filter(":checked").val():"number"===a&&void 0!==e.validity?e.validity.badInput?"NaN":i.val():(n=o?i.text():i.val(),"file"===a?"C:\\fakepath\\"===n.substr(0,12)?n.substr(12):(r=n.lastIndexOf("/"))>=0||(r=n.lastIndexOf("\\"))>=0?n.substr(r+1):n:"string"==typeof n?n.replace(/\r/g,""):n)},check:function(e){e=this.validationTargetFor(this.clean(e));var n,r,i,a,o=t(e).rules(),s=t.map(o,(function(t,e){return e})).length,l=!1,c=this.elementValue(e);for(r in"function"==typeof o.normalizer?a=o.normalizer:"function"==typeof this.settings.normalizer&&(a=this.settings.normalizer),a&&(c=a.call(e,c),delete o.normalizer),o){i={method:r,parameters:o[r]};try{if("dependency-mismatch"===(n=t.validator.methods[r].call(this,c,e,i.parameters))&&1===s){l=!0;continue}if(l=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!n)return this.formatAndAdd(e,i),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+i.method+"' method.",t),t instanceof TypeError&&(t.message+=". Exception occurred when checking element "+e.id+", check the '"+i.method+"' method."),t}}if(!l)return this.objectLength(o)&&this.successList.push(e),!0},customDataMessage:function(e,n){return t(e).data("msg"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var n=this.settings.messages[t];return n&&(n.constructor===String?n:n[e])},findDefined:function(){for(var t=0;tWarning: No message defined for "+e.name+""),i=/\$?\{(\d+)\}/g;return"function"==typeof r?r=r.call(this,n.parameters,e):i.test(r)&&(r=t.validator.format(r.replace(i,"{$1}"),n.parameters)),r},formatAndAdd:function(t,e){var n=this.defaultMessage(t,e);this.errorList.push({message:n,element:t,method:e.method}),this.errorMap[t.name]=n,this.submitted[t.name]=n},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,n;for(t=0;this.errorList[t];t++)n=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map((function(){return this.element}))},showLabel:function(e,n){var r,i,a,o,s=this.errorsFor(e),l=this.idOrName(e),c=t(e).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(n)):(r=s=t("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(r=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(r):this.settings.errorPlacement?this.settings.errorPlacement.call(this,r,t(e)):r.insertAfter(e),s.is("label")?s.attr("for",l):0===s.parents("label[for='"+this.escapeCssMeta(l)+"']").length&&(a=s.attr("id"),c?c.match(new RegExp("\\b"+this.escapeCssMeta(a)+"\\b"))||(c+=" "+a):c=a,t(e).attr("aria-describedby",c),(i=this.groups[e.name])&&(o=this,t.each(o.groups,(function(e,n){n===i&&t("[name='"+o.escapeCssMeta(e)+"']",o.currentForm).attr("aria-describedby",s.attr("id"))}))))),!n&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var n=this.escapeCssMeta(this.idOrName(e)),r=t(e).attr("aria-describedby"),i="label[for='"+n+"'], label[for='"+n+"'] *";return r&&(i=i+", #"+this.escapeCssMeta(r).replace(/\s+/g,", #")),this.errors().filter(i)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,n){switch(n.nodeName.toLowerCase()){case"select":return t("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,n){return!!t(e,n.form).length},function:function(t,e){return t(e)}},optional:function(e){var n=this.elementValue(e);return!t.validator.methods.required.call(this,n,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,t(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],t(e).removeClass(this.settings.pendingClass),n&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.submitButton&&t("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,n){return n="string"==typeof n&&n||"remote",t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:n})})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur").find(".validate-lessThan-blur").off(".validate-lessThan").removeClass("validate-lessThan-blur").find(".validate-lessThanEqual-blur").off(".validate-lessThanEqual").removeClass("validate-lessThanEqual-blur").find(".validate-greaterThanEqual-blur").off(".validate-greaterThanEqual").removeClass("validate-greaterThanEqual-blur").find(".validate-greaterThan-blur").off(".validate-greaterThan").removeClass("validate-greaterThan-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,n){e.constructor===String?this.classRuleSettings[e]=n:t.extend(this.classRuleSettings,e)},classRules:function(e){var n={},r=t(e).attr("class");return r&&t.each(r.split(" "),(function(){this in t.validator.classRuleSettings&&t.extend(n,t.validator.classRuleSettings[this])})),n},normalizeAttributeRule:function(t,e,n,r){/min|max|step/.test(n)&&(null===e||/number|range|text/.test(e))&&(r=Number(r),isNaN(r)&&(r=void 0)),r||0===r?t[n]=r:e===n&&"range"!==e&&(t[n]=!0)},attributeRules:function(e){var n,r,i={},a=t(e),o=e.getAttribute("type");for(n in t.validator.methods)"required"===n?(""===(r=e.getAttribute(n))&&(r=!0),r=!!r):r=a.attr(n),this.normalizeAttributeRule(i,o,n,r);return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var n,r,i={},a=t(e),o=e.getAttribute("type");for(n in t.validator.methods)""===(r=a.data("rule"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase()))&&(r=!0),this.normalizeAttributeRule(i,o,n,r);return i},staticRules:function(e){var n={},r=t.data(e.form,"validator");return r.settings.rules&&(n=t.validator.normalizeRule(r.settings.rules[e.name])||{}),n},normalizeRules:function(e,n){return t.each(e,(function(r,i){if(!1!==i){if(i.param||i.depends){var a=!0;switch(typeof i.depends){case"string":a=!!t(i.depends,n.form).length;break;case"function":a=i.depends.call(n,n)}a?e[r]=void 0===i.param||i.param:(t.data(n.form,"validator").resetElements(t(n)),delete e[r])}}else delete e[r]})),t.each(e,(function(r,i){e[r]=t.isFunction(i)&&"normalizer"!==r?i(n):i})),t.each(["minlength","maxlength"],(function(){e[this]&&(e[this]=Number(e[this]))})),t.each(["rangelength","range"],(function(){var n;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(n=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(n[0]),Number(n[1])]))})),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var n={};t.each(e.split(/\s/),(function(){n[this]=!0})),e=n}return e},addMethod:function(e,n,r){t.validator.methods[e]=n,t.validator.messages[e]=void 0!==r?r:t.validator.messages[e],n.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,n,r){if(!this.depend(r,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var i=t(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(e,n)>0:null!=e&&e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:(e=!1,function(t,n){return e||(e=!0,this.settings.debug&&window.console&&console.warn("The `date` method is deprecated and will be removed in version '2.0.0'.\nPlease don't use it, since it relies on the Date constructor, which\nbehaves very differently across browsers and locales. Use `dateISO`\ninstead or one of the locale specific methods in `localizations/`\nand `additional-methods.js`.")),this.optional(n)||!/Invalid|NaN/.test(new Date(t).toString())}),dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(e,n,r){var i=t.isArray(e)?e.length:this.getLength(e,n);return this.optional(n)||i>=r},maxlength:function(e,n,r){var i=t.isArray(e)?e.length:this.getLength(e,n);return this.optional(n)||i<=r},rangelength:function(e,n,r){var i=t.isArray(e)?e.length:this.getLength(e,n);return this.optional(n)||i>=r[0]&&i<=r[1]},min:function(t,e,n){return this.optional(e)||t>=n},max:function(t,e,n){return this.optional(e)||t<=n},range:function(t,e,n){return this.optional(e)||t>=n[0]&&t<=n[1]},step:function(e,n,r){var i,a=t(n).attr("type"),o="Step attribute on input type "+a+" is not supported.",s=new RegExp("\\b"+a+"\\b"),l=function(t){var e=(""+t).match(/(?:\.(\d+))?$/);return e&&e[1]?e[1].length:0},c=function(t){return Math.round(t*Math.pow(10,i))},u=!0;if(a&&!s.test(["text","number","range"].join()))throw new Error(o);return i=l(r),(l(e)>i||c(e)%c(r)!=0)&&(u=!1),this.optional(n)||u},equalTo:function(e,n,r){var i=t(r);return this.settings.onfocusout&&i.not(".validate-equalTo-blur").length&&i.addClass("validate-equalTo-blur").on("blur.validate-equalTo",(function(){t(n).valid()})),e===i.val()},remote:function(e,n,r,i){if(this.optional(n))return"dependency-mismatch";i="string"==typeof i&&i||"remote";var a,o,s,l=this.previousValue(n,i);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[n.name][i],this.settings.messages[n.name][i]=l.message,r="string"==typeof r&&{url:r}||r,s=t.param(t.extend({data:e},r.data)),l.old===s?l.valid:(l.old=s,a=this,this.startRequest(n),(o={})[n.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+n.name,dataType:"json",data:o,context:a.currentForm,success:function(t){var r,o,s,c=!0===t||"true"===t;a.settings.messages[n.name][i]=l.originalMessage,c?(s=a.formSubmitted,a.resetInternals(),a.toHide=a.errorsFor(n),a.formSubmitted=s,a.successList.push(n),a.invalid[n.name]=!1,a.showErrors()):(r={},o=t||a.defaultMessage(n,{method:i,parameters:e}),r[n.name]=l.message=o,a.invalid[n.name]=!0,a.showErrors(r)),l.valid=c,a.stopRequest(n,c)}},r)),"pending")}}});var r,i={};return t.ajaxPrefilter?t.ajaxPrefilter((function(t,e,n){var r=t.port;"abort"===t.mode&&(i[r]&&i[r].abort(),i[r]=n)})):(r=t.ajax,t.ajax=function(e){var n=("mode"in e?e:t.ajaxSettings).mode,a=("port"in e?e:t.ajaxSettings).port;return"abort"===n?(i[a]&&i[a].abort(),i[a]=r.apply(this,arguments),i[a]):r.apply(this,arguments)}),t})?r.apply(e,i):r)||(t.exports=a)},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(183).Buffer,i=n(184).Transform;function a(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(0)(a,i),a.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},a.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},function(t,e,n){"use strict";(function(e,r){var i;t.exports=S,S.ReadableState=x;n(13).EventEmitter;var a=function(t,e){return t.listeners(e).length},o=n(76),s=n(4).Buffer,l=e.Uint8Array||function(){};var c,u=n(185);c=u&&u.debuglog?u.debuglog("stream"):function(){};var d,f,h,p=n(186),m=n(77),g=n(78).getHighWaterMark,b=n(17).codes,v=b.ERR_INVALID_ARG_TYPE,y=b.ERR_STREAM_PUSH_AFTER_EOF,M=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(0)(S,o);var _=m.errorOrDestroy,A=["error","close","destroy","pause","resume"];function x(t,e,r){i=i||n(18),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(14).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function S(t){if(i=i||n(18),!(this instanceof S))return new S(t);var e=this instanceof i;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function T(t,e,n,r,i){c("readableAddChunk",e);var a,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?D(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,z(t)))}(t,o);else if(i||(a=function(t,e){var n;r=e,s.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(n=new v("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(o,e)),a)_(t,a);else if(o.objectMode||e&&e.length>0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)o.endEmitted?_(t,new w):k(t,o,e,!0);else if(o.ended)_(t,new y);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?k(t,o,e,!1):E(t,o)):k(t,o,e,!1)}else r||(o.reading=!1,E(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function D(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(z,t))}function z(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,P(t)}function E(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(L,t,e))}function L(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function I(t){c("readable nexttick read 0"),t.read(0)}function N(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(j,e,t))}function j(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function q(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):D(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?R(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){_(this,new M("_read()"))},S.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:g;function s(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",f),d=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c("onend"),t.end()}i.endEmitted?r.nextTick(o):n.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",u);var d=!1;function f(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==q(i.pipes,t))&&!d&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(e){c("onerror",e),g(),t.removeListener("error",h),0===a(t,"error")&&_(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(t)}return n.on("data",f),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",h),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?D(this):i.reading||r.nextTick(I,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),n},S.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(N,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,n){n(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,E(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,n(2),n(3))},function(t,e,n){"use strict";t.exports=u;var r=n(17).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(18);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(l,i),l.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},l.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)n[b]=t.readInt32BE(4*b);for(;b<64;++b)n[b]=0|(((e=n[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[b-7]+h(n[b-15])+n[b-16];for(var v=0;v<64;++v){var y=g+f(l)+c(l,p,m)+o[v]+n[v]|0,M=d(r)+u(r,i,a)|0;g=m,m=p,p=l,l=s+y|0,s=a,a=i,i=r,r=y+M|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var t=a.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=l},function(t,e,n){var r=n(0),i=n(19),a=n(1).Buffer,o=[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],s=new Array(160);function l(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function u(t,e,n){return t&e|n&(t|e)}function d(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function f(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function h(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0>>0?1:0}r(l,i),l.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},l.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,l=0|this._fh,v=0|this._gh,y=0|this._hh,M=0|this._al,w=0|this._bl,_=0|this._cl,A=0|this._dl,x=0|this._el,S=0|this._fl,T=0|this._gl,k=0|this._hl,C=0;C<32;C+=2)e[C]=t.readInt32BE(4*C),e[C+1]=t.readInt32BE(4*C+4);for(;C<160;C+=2){var D=e[C-30],z=e[C-30+1],E=h(D,z),L=p(z,D),O=m(D=e[C-4],z=e[C-4+1]),I=g(z,D),N=e[C-14],P=e[C-14+1],R=e[C-32],B=e[C-32+1],j=L+P|0,q=E+N+b(j,L)|0;q=(q=q+O+b(j=j+I|0,I)|0)+R+b(j=j+B|0,B)|0,e[C]=q,e[C+1]=j}for(var F=0;F<160;F+=2){q=e[F],j=e[F+1];var $=u(n,r,i),W=u(M,w,_),X=d(n,M),H=d(M,n),U=f(s,x),V=f(x,s),G=o[F],Y=o[F+1],K=c(s,l,v),Z=c(x,S,T),Q=k+V|0,J=y+U+b(Q,k)|0;J=(J=(J=J+K+b(Q=Q+Z|0,Z)|0)+G+b(Q=Q+Y|0,Y)|0)+q+b(Q=Q+j|0,j)|0;var tt=H+W|0,et=X+$+b(tt,H)|0;y=v,k=T,v=l,T=S,l=s,S=x,s=a+J+b(x=A+Q|0,A)|0,a=i,A=_,i=r,_=w,r=n,w=M,n=J+et+b(M=Q+tt|0,Q)|0}this._al=this._al+M|0,this._bl=this._bl+w|0,this._cl=this._cl+_|0,this._dl=this._dl+A|0,this._el=this._el+x|0,this._fl=this._fl+S|0,this._gl=this._gl+T|0,this._hl=this._hl+k|0,this._ah=this._ah+n+b(this._al,M)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+i+b(this._cl,_)|0,this._dh=this._dh+a+b(this._dl,A)|0,this._eh=this._eh+s+b(this._el,x)|0,this._fh=this._fh+l+b(this._fl,S)|0,this._gh=this._gh+v+b(this._gl,T)|0,this._hh=this._hh+y+b(this._hl,k)|0},l.prototype._hash=function(){var t=a.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=l},function(t,e,n){"use strict";(function(e,r){var i=n(33);t.exports=y;var a,o=n(73);y.ReadableState=v;n(13).EventEmitter;var s=function(t,e){return t.listeners(e).length},l=n(84),c=n(1).Buffer,u=e.Uint8Array||function(){};var d=Object.create(n(24));d.inherits=n(0);var f=n(197),h=void 0;h=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=n(198),g=n(85);d.inherits(y,l);var b=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(a=a||n(15));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(14).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(a=a||n(15),!(this instanceof y))return new y(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this)}function M(t,e,n,r,i){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,A(t)}(t,o)):(i||(a=function(t,e){var n;r=e,c.isBuffer(r)||r instanceof u||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?w(t,o,e,!1):S(t,o)):w(t,o,e,!1))):r||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(h("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){h("emit readable"),t.emit("readable"),D(t)}function S(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;ta.length?a.length:t;if(o===a.length?i+=a:i+=a.slice(0,t),0===(t-=o)){o===a.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,o),0===(t-=o)){o===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function E(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function O(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return h("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?E(this):A(this),null;if(0===(t=_(t,e))&&e.ended)return 0===e.length&&E(this),null;var r,i=e.needReadable;return h("need readable",i),(0===e.length||e.length-t0?z(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&E(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,e);var l=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:y;function c(e,r){h("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),t.removeListener("close",b),t.removeListener("finish",v),t.removeListener("drain",d),t.removeListener("error",g),t.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",m),f=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||d())}function u(){h("onend"),t.end()}a.endEmitted?i.nextTick(l):n.once("end",l),t.on("unpipe",c);var d=function(t){return function(){var e=t._readableState;h("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,D(t))}}(n);t.on("drain",d);var f=!1;var p=!1;function m(e){h("ondata"),p=!1,!1!==t.write(e)||p||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==O(a.pipes,t))&&!f&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function g(e){h("onerror",e),y(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",v),y()}function v(){h("onfinish"),t.removeListener("close",b),y()}function y(){h("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",g),t.once("close",b),t.once("finish",v),t.emit("pipe",n),a.flowing||(h("pipe resume"),n.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;an)?e=("rmd160"===t?new l:c(t)).update(e).digest():e.lengthn||e!=e)throw new TypeError("Bad key length")}},function(t,e,n){(function(e,n){var r;if(e.process&&e.process.browser)r="utf-8";else if(e.process&&e.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,n(2),n(3))},function(t,e,n){var r=n(88),i=n(45),a=n(46),o=n(1).Buffer,s=n(91),l=n(92),c=n(94),u=o.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(t,e,n){var s=function(t){function e(e){return a(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r:e}(t),l="sha512"===t||"sha384"===t?128:64;e.length>l?e=s(e):e.length>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1}for(o=6;o>=0;o-=2){for(s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1;for(s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1}n[r+0]=i>>>0,n[r+1]=a>>>0},e.rip=function(t,e,n,r){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+o&1,i<<=1,i|=t>>>s+o&1;for(o=4;o<8;o++)for(s=24;s>=0;s-=8)a<<=1,a|=e>>>s+o&1,a<<=1,a|=t>>>s+o&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.pc1=function(t,e,n,r){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1;for(o=1;o<=3;o++){for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1}for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;n[r+0]=i>>>0,n[r+1]=a>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[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];e.pc2=function(t,e,n,i){for(var a=0,o=0,s=r.length>>>1,l=0;l>>r[l]&1;for(l=s;l>>r[l]&1;n[i+0]=a>>>0,n[i+1]=o>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)r<<=6,r|=t>>>a&63;for(a=11;a>=3;a-=4)i|=t>>>a&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n>>a[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length>>1];n=a.r28shl(n,s),i=a.r28shl(i,s),a.pc2(n,i,t.keys,o)}},l.prototype._update=function(t,e,n,r){var i=this._desState,o=a.readUInt32BE(t,e),s=a.readUInt32BE(t,e+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(n,o,r),a.writeUInt32BE(n,s,r+4)},l.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r>>0,o=f}a.rip(s,o,r,i)},l.prototype._decrypt=function(t,e,n,r,i){for(var o=n,s=e,l=t.keys.length-2;l>=0;l-=2){var c=t.keys[l],u=t.keys[l+1];a.expand(o,t.tmp,0),c^=t.tmp[0],u^=t.tmp[1];var d=a.substitute(c,u),f=o;o=(s^a.permute(d))>>>0,s=f}a.rip(o,s,r,i)}},function(t,e,n){var r=n(25),i=n(1).Buffer,a=n(98);function o(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),a=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var s=0;st;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(l),e.cmp(l)){if(!e.cmp(c))for(;n.mod(u).cmp(d);)n.iadd(h)}else for(;n.mod(a).cmp(f);)n.iadd(h);if(g(p=n.shrn(1))&&g(n)&&b(p)&&b(n)&&o.test(p)&&o.test(n))return n}}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(226).Buffer}catch(t){}function s(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,r){for(var i=0,a=Math.min(t.length,n),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=l(t,e,r)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=f;h++){var p=c-h|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[h])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}a.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],h=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,h=0|o[1],p=8191&h,m=h>>>13,g=0|o[2],b=8191&g,v=g>>>13,y=0|o[3],M=8191&y,w=y>>>13,_=0|o[4],A=8191&_,x=_>>>13,S=0|o[5],T=8191&S,k=S>>>13,C=0|o[6],D=8191&C,z=C>>>13,E=0|o[7],L=8191&E,O=E>>>13,I=0|o[8],N=8191&I,P=I>>>13,R=0|o[9],B=8191&R,j=R>>>13,q=0|s[0],F=8191&q,$=q>>>13,W=0|s[1],X=8191&W,H=W>>>13,U=0|s[2],V=8191&U,G=U>>>13,Y=0|s[3],K=8191&Y,Z=Y>>>13,Q=0|s[4],J=8191&Q,tt=Q>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],dt=8191&ut,ft=ut>>>13,ht=0|s[9],pt=8191&ht,mt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,$))+Math.imul(f,F)|0))<<13)|0;c=((a=Math.imul(f,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,$))+Math.imul(m,F)|0,a=Math.imul(m,$);var bt=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,X)|0))<<13)|0;c=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,$))+Math.imul(v,F)|0,a=Math.imul(v,$),r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,V)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,$))+Math.imul(w,F)|0,a=Math.imul(w,$),r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,G)|0;var yt=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,K)|0))<<13)|0;c=((a=a+Math.imul(f,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(A,F),i=(i=Math.imul(A,$))+Math.imul(x,F)|0,a=Math.imul(x,$),r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,Z)|0;var Mt=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,$))+Math.imul(k,F)|0,a=Math.imul(k,$),r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,H)|0,r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(w,V)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((a=a+Math.imul(f,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(D,F),i=(i=Math.imul(D,$))+Math.imul(z,F)|0,a=Math.imul(z,$),r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,H)|0,r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0;var _t=(c+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,$))+Math.imul(O,F)|0,a=Math.imul(O,$),r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,H)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,V)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,a=a+Math.imul(v,rt)|0,r=r+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var At=(c+(r=r+Math.imul(d,lt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,$))+Math.imul(P,F)|0,a=Math.imul(P,$),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(z,V)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,K)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(w,nt)|0,a=a+Math.imul(w,rt)|0,r=r+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var xt=(c+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,$))+Math.imul(j,F)|0,a=Math.imul(j,$),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,Z)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,ot)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0,r=r+Math.imul(p,dt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,ft)|0;var St=(c+(r=r+Math.imul(d,pt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((a=a+Math.imul(f,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,H))+Math.imul(j,X)|0,a=Math.imul(j,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(P,V)|0,a=a+Math.imul(P,G)|0,r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(k,nt)|0,a=a+Math.imul(k,rt)|0,r=r+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ct)|0,r=r+Math.imul(b,dt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(v,dt)|0,a=a+Math.imul(v,ft)|0;var Tt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(j,V)|0,a=Math.imul(j,G),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Z)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(D,nt)|0,i=(i=i+Math.imul(D,rt)|0)+Math.imul(z,nt)|0,a=a+Math.imul(z,rt)|0,r=r+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(x,lt)|0,a=a+Math.imul(x,ct)|0,r=r+Math.imul(M,dt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(w,dt)|0,a=a+Math.imul(w,ft)|0;var kt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((a=a+Math.imul(v,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,Z))+Math.imul(j,K)|0,a=Math.imul(j,Z),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,tt)|0,r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,r=r+Math.imul(A,dt)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ft)|0;var Ct=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((a=a+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(j,J)|0,a=Math.imul(j,tt),r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(P,nt)|0,a=a+Math.imul(P,rt)|0,r=r+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,r=r+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,r=r+Math.imul(T,dt)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,dt)|0,a=a+Math.imul(k,ft)|0;var Dt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((a=a+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(j,nt)|0,a=Math.imul(j,rt),r=r+Math.imul(N,at)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,r=r+Math.imul(D,dt)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(z,dt)|0,a=a+Math.imul(z,ft)|0;var zt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0,r=r+Math.imul(L,dt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,ft)|0;var Et=(c+(r=r+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(z,pt)|0))<<13)|0;c=((a=a+Math.imul(z,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),r=r+Math.imul(N,dt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(P,dt)|0,a=a+Math.imul(P,ft)|0;var Lt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(B,dt),i=(i=Math.imul(B,ft))+Math.imul(j,dt)|0,a=Math.imul(j,ft);var Ot=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((a=a+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var It=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=bt,l[2]=vt,l[3]=yt,l[4]=Mt,l[5]=wt,l[6]=_t,l[7]=At,l[8]=xt,l[9]=St,l[10]=Tt,l[11]=kt,l[12]=Ct,l[13]=Dt,l[14]=zt,l[15]=Et,l[16]=Lt,l[17]=Ot,l[18]=It,0!==c&&(l[19]=c,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},a.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),o.isub(l)):(n.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new A(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new M;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return b[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}l=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new x(t)},i(x,A),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(11)(t))},function(t,e,n){var r=n(227),i=n(52);function a(t){this.rand=t||new i.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},a.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},a.prototype.test=function(t,e,n){var i=t.bitLength(),a=r.mont(t),o=new r(1).toRed(a);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),l=0;!s.testn(l);l++);for(var c=t.shrn(l),u=s.toRed(a);e>0;e--){var d=this._randrange(new r(2),s);n&&n(d);var f=d.toRed(a).redPow(c);if(0!==f.cmp(o)&&0!==f.cmp(u)){for(var h=1;h0;e--){var u=this._randrange(new r(2),o),d=t.gcd(u);if(0!==d.cmpn(1))return d;var f=u.toRed(i).redPow(l);if(0!==f.cmp(a)&&0!==f.cmp(c)){for(var h=1;h0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)o.endEmitted?_(t,new w):k(t,o,e,!0);else if(o.ended)_(t,new y);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?k(t,o,e,!1):E(t,o)):k(t,o,e,!1)}else r||(o.reading=!1,E(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function D(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(z,t))}function z(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,P(t)}function E(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(L,t,e))}function L(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function I(t){c("readable nexttick read 0"),t.read(0)}function N(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(j,e,t))}function j(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function q(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):D(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?R(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){_(this,new M("_read()"))},S.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:g;function s(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",f),d=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c("onend"),t.end()}i.endEmitted?r.nextTick(o):n.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",u);var d=!1;function f(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==q(i.pipes,t))&&!d&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(e){c("onerror",e),g(),t.removeListener("error",h),0===a(t,"error")&&_(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(t)}return n.on("data",f),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",h),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?D(this):i.reading||r.nextTick(I,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),n},S.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(N,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,n){n(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,E(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,n(2),n(3))},function(t,e,n){"use strict";t.exports=u;var r=n(20).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(21);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>8,o=255&i;a?n.push(a,o):n.push(o)}return n},r.zero2=i,r.toHex=a,r.encode=function(t,e){return"hex"===e?a(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(36),r.short=n(245),r.mont=n(246),r.edwards=n(247)},function(t,e,n){"use strict";var r=n(9).rotr32;function i(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function o(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?o(e,n,r):2===t?a(e,n,r):void 0},e.ch32=i,e.maj32=a,e.p32=o,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(9),i=n(26),a=n(113),o=n(5),s=r.sum32,l=r.sum32_4,c=r.sum32_5,u=a.ch32,d=a.maj32,f=a.s0_256,h=a.s1_256,p=a.g0_256,m=a.g1_256,g=i.BlockHash,b=[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];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}r.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(t,e,n){var r=s(t,n);return n-1>=e&&(r|=s(t,n-1)<<4),r}function c(t,e,n,r){for(var i=0,a=Math.min(t.length,n),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=l(t,e,r)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var a=t.length-n,o=a%r,s=Math.min(a,a-o)+n,l=0,u=n;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=f;h++){var p=c-h|0;u+=(o=(i=0|t.words[p])*(a=0|e.words[h])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}a.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],h=f[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),a=n||Math.max(1,i);r(i<=a,"byte array longer than desired length"),r(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,h=0|o[1],p=8191&h,m=h>>>13,g=0|o[2],b=8191&g,v=g>>>13,y=0|o[3],M=8191&y,w=y>>>13,_=0|o[4],A=8191&_,x=_>>>13,S=0|o[5],T=8191&S,k=S>>>13,C=0|o[6],D=8191&C,z=C>>>13,E=0|o[7],L=8191&E,O=E>>>13,I=0|o[8],N=8191&I,P=I>>>13,R=0|o[9],B=8191&R,j=R>>>13,q=0|s[0],F=8191&q,$=q>>>13,W=0|s[1],X=8191&W,H=W>>>13,U=0|s[2],V=8191&U,G=U>>>13,Y=0|s[3],K=8191&Y,Z=Y>>>13,Q=0|s[4],J=8191&Q,tt=Q>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],dt=8191&ut,ft=ut>>>13,ht=0|s[9],pt=8191&ht,mt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(d,F))|0)+((8191&(i=(i=Math.imul(d,$))+Math.imul(f,F)|0))<<13)|0;c=((a=Math.imul(f,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,$))+Math.imul(m,F)|0,a=Math.imul(m,$);var bt=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(f,X)|0))<<13)|0;c=((a=a+Math.imul(f,H)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,$))+Math.imul(v,F)|0,a=Math.imul(v,$),r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(f,V)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,$))+Math.imul(w,F)|0,a=Math.imul(w,$),r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,H)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,H)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,G)|0;var yt=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,K)|0))<<13)|0;c=((a=a+Math.imul(f,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(A,F),i=(i=Math.imul(A,$))+Math.imul(x,F)|0,a=Math.imul(x,$),r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(w,X)|0,a=a+Math.imul(w,H)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,G)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,Z)|0;var Mt=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,tt)|0)+Math.imul(f,J)|0))<<13)|0;c=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,$))+Math.imul(k,F)|0,a=Math.imul(k,$),r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,H)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,H)|0,r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(w,V)|0,a=a+Math.imul(w,G)|0,r=r+Math.imul(b,K)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(v,K)|0,a=a+Math.imul(v,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,tt)|0;var wt=(c+(r=r+Math.imul(d,nt)|0)|0)+((8191&(i=(i=i+Math.imul(d,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((a=a+Math.imul(f,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(D,F),i=(i=Math.imul(D,$))+Math.imul(z,F)|0,a=Math.imul(z,$),r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(k,X)|0,a=a+Math.imul(k,H)|0,r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(x,V)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(w,K)|0,a=a+Math.imul(w,Z)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,a=a+Math.imul(m,rt)|0;var _t=(c+(r=r+Math.imul(d,at)|0)|0)+((8191&(i=(i=i+Math.imul(d,ot)|0)+Math.imul(f,at)|0))<<13)|0;c=((a=a+Math.imul(f,ot)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,$))+Math.imul(O,F)|0,a=Math.imul(O,$),r=r+Math.imul(D,X)|0,i=(i=i+Math.imul(D,H)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,H)|0,r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,V)|0,a=a+Math.imul(k,G)|0,r=r+Math.imul(A,K)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,a=a+Math.imul(v,rt)|0,r=r+Math.imul(p,at)|0,i=(i=i+Math.imul(p,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var At=(c+(r=r+Math.imul(d,lt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ct)|0)+Math.imul(f,lt)|0))<<13)|0;c=((a=a+Math.imul(f,ct)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(N,F),i=(i=Math.imul(N,$))+Math.imul(P,F)|0,a=Math.imul(P,$),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,H)|0,r=r+Math.imul(D,V)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(z,V)|0,a=a+Math.imul(z,G)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,K)|0,a=a+Math.imul(k,Z)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(w,nt)|0,a=a+Math.imul(w,rt)|0,r=r+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var xt=(c+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;c=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,$))+Math.imul(j,F)|0,a=Math.imul(j,$),r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(P,X)|0,a=a+Math.imul(P,H)|0,r=r+Math.imul(L,V)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(D,K)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(z,K)|0,a=a+Math.imul(z,Z)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,rt)|0,r=r+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,ot)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0,r=r+Math.imul(p,dt)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,a=a+Math.imul(m,ft)|0;var St=(c+(r=r+Math.imul(d,pt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((a=a+Math.imul(f,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,H))+Math.imul(j,X)|0,a=Math.imul(j,H),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(P,V)|0,a=a+Math.imul(P,G)|0,r=r+Math.imul(L,K)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(O,K)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(k,nt)|0,a=a+Math.imul(k,rt)|0,r=r+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ct)|0,r=r+Math.imul(b,dt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(v,dt)|0,a=a+Math.imul(v,ft)|0;var Tt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,G))+Math.imul(j,V)|0,a=Math.imul(j,G),r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Z)|0,r=r+Math.imul(L,J)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,tt)|0,r=r+Math.imul(D,nt)|0,i=(i=i+Math.imul(D,rt)|0)+Math.imul(z,nt)|0,a=a+Math.imul(z,rt)|0,r=r+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(x,lt)|0,a=a+Math.imul(x,ct)|0,r=r+Math.imul(M,dt)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(w,dt)|0,a=a+Math.imul(w,ft)|0;var kt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((a=a+Math.imul(v,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,Z))+Math.imul(j,K)|0,a=Math.imul(j,Z),r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,tt)|0,r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(O,nt)|0,a=a+Math.imul(O,rt)|0,r=r+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,r=r+Math.imul(A,dt)|0,i=(i=i+Math.imul(A,ft)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ft)|0;var Ct=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((a=a+Math.imul(w,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,J),i=(i=Math.imul(B,tt))+Math.imul(j,J)|0,a=Math.imul(j,tt),r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(P,nt)|0,a=a+Math.imul(P,rt)|0,r=r+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,r=r+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,r=r+Math.imul(T,dt)|0,i=(i=i+Math.imul(T,ft)|0)+Math.imul(k,dt)|0,a=a+Math.imul(k,ft)|0;var Dt=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((a=a+Math.imul(x,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(j,nt)|0,a=Math.imul(j,rt),r=r+Math.imul(N,at)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(P,at)|0,a=a+Math.imul(P,ot)|0,r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,r=r+Math.imul(D,dt)|0,i=(i=i+Math.imul(D,ft)|0)+Math.imul(z,dt)|0,a=a+Math.imul(z,ft)|0;var zt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(j,at)|0,a=Math.imul(j,ot),r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(P,lt)|0,a=a+Math.imul(P,ct)|0,r=r+Math.imul(L,dt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(O,dt)|0,a=a+Math.imul(O,ft)|0;var Et=(c+(r=r+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(z,pt)|0))<<13)|0;c=((a=a+Math.imul(z,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(j,lt)|0,a=Math.imul(j,ct),r=r+Math.imul(N,dt)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(P,dt)|0,a=a+Math.imul(P,ft)|0;var Lt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(B,dt),i=(i=Math.imul(B,ft))+Math.imul(j,dt)|0,a=Math.imul(j,ft);var Ot=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((a=a+Math.imul(P,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var It=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(j,pt)|0))<<13)|0;return c=((a=Math.imul(j,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,l[0]=gt,l[1]=bt,l[2]=vt,l[3]=yt,l[4]=Mt,l[5]=wt,l[6]=_t,l[7]=At,l[8]=xt,l[9]=St,l[10]=Tt,l[11]=kt,l[12]=Ct,l[13]=Dt,l[14]=zt,l[15]=Et,l[16]=Lt,l[17]=Ot,l[18]=It,0!==c&&(l[19]=c,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}n.words[a]=s,r=o,o=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,r=0;r>=1;return r},g.prototype.permute=function(t,e,n,r,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new a(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+n]=67108863&a}for(;i>26,this.words[i+n]=67108863&a;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!==(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/o|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},a.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},a.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),d=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),o.isub(l)):(n.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,f=1;0==(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var a=e;e=n,n=a}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new A(t)},a.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=a}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new M;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return b[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}l=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new x(t)},i(x,A),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(11)(t))},function(t,e,n){"use strict";const r=e;r.der=n(119),r.pem=n(265)},function(t,e,n){"use strict";const r=n(0),i=n(60).Buffer,a=n(61),o=n(63);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new l,this.tree._init(t.body)}function l(t){a.call(this,"der",t)}function c(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(l,a),l.prototype._encodeComposite=function(t,e,n,r){const a=function(t,e,n,r){let i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(o.tagByName.hasOwnProperty(t))i=o.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);i=t}if(i>=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=o.tagClassByName[n||"universal"]<<6,i}(t,e,n,this.reporter);if(r.length<128){const t=i.alloc(2);return t[0]=a,t[1]=r.length,this._createEncoderBuffer([t,r])}let s=1;for(let t=r.length;t>=256;t>>=8)s++;const l=i.alloc(2+s);l[0]=a,l[1]=128|s;for(let t=1+s,e=r.length;e>0;t--,e>>=8)l[t]=255&e;return this._createEncoderBuffer([l,r])},l.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=i.alloc(2*t.length);for(let n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e=128;n>>=7)r++}const a=i.alloc(r);let o=a.length-1;for(let e=t.length-1;e>=0;e--){let n=t[e];for(a[o--]=127&n;(n>>=7)>0;)a[o--]=128|127&n}return this._createEncoderBuffer(a)},l.prototype._encodeTime=function(t,e){let n;const r=new Date(t);return"gentime"===e?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=i.from(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const n=i.alloc(e);return t.copy(n),0===t.length&&(n[0]=0),this._createEncoderBuffer(n)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let n=1;for(let e=t;e>=256;e>>=8)n++;const r=new Array(n);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},l.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},l.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},l.prototype._skipDefault=function(t,e,n){const r=this._baseState;let i;if(null===r.default)return!1;const a=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,n).join()),a.length!==r.defaultBuffer.length)return!1;for(i=0;i>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function d(t,e,n){let r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(let e=0;e=0;i--)d(t(r[i]),n)}(i)},remove:function(n){var r=p();e||u(r),n&&0===t(":focus",n).length?m(n):e.children().length&&e.remove()},error:function(t,e,n){return h({type:a,iconClass:p().iconClasses.error,message:t,optionsOverride:n,title:e})},getContainer:u,info:function(t,e,n){return h({type:o,iconClass:p().iconClasses.info,message:t,optionsOverride:n,title:e})},options:{},subscribe:function(t){n=t},success:function(t,e,n){return h({type:s,iconClass:p().iconClasses.success,message:t,optionsOverride:n,title:e})},version:"2.1.4",warning:function(t,e,n){return h({type:l,iconClass:p().iconClasses.warning,message:t,optionsOverride:n,title:e})}};return c;function u(n,r){return n||(n=p()),(e=t("#"+n.containerId)).length||r&&(e=function(n){return(e=t("
").attr("id",n.containerId).addClass(n.positionClass)).appendTo(t(n.target)),e}(n)),e}function d(e,n,r){var i=!(!r||!r.force)&&r.force;return!(!e||!i&&0!==t(":focus",e).length||(e[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){m(e)}}),0))}function f(t){n&&n(t)}function h(n){var a=p(),o=n.iconClass||a.iconClass;if(void 0!==n.optionsOverride&&(a=t.extend(a,n.optionsOverride),o=n.optionsOverride.iconClass||o),!function(t,e){if(t.preventDuplicates){if(e.message===r)return!0;r=e.message}return!1}(a,n)){i++,e=u(a,!0);var s=null,l=t("
"),c=t("
"),d=t("
"),h=t("
"),g=t(a.closeHtml),b={intervalId:null,hideEta:null,maxHideTime:null},v={toastId:i,state:"visible",startTime:new Date,options:a,map:n};return n.iconClass&&l.addClass(a.toastClass).addClass(o),function(){if(n.title){var t=n.title;a.escapeHtml&&(t=y(n.title)),c.append(t).addClass(a.titleClass),l.append(c)}}(),function(){if(n.message){var t=n.message;a.escapeHtml&&(t=y(n.message)),d.append(t).addClass(a.messageClass),l.append(d)}}(),a.closeButton&&(g.addClass(a.closeClass).attr("role","button"),l.prepend(g)),a.progressBar&&(h.addClass(a.progressClass),l.prepend(h)),a.rtl&&l.addClass("rtl"),a.newestOnTop?e.prepend(l):e.append(l),function(){var t="";switch(n.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}l.attr("aria-live",t)}(),l.hide(),l[a.showMethod]({duration:a.showDuration,easing:a.showEasing,complete:a.onShown}),a.timeOut>0&&(s=setTimeout(M,a.timeOut),b.maxHideTime=parseFloat(a.timeOut),b.hideEta=(new Date).getTime()+b.maxHideTime,a.progressBar&&(b.intervalId=setInterval(A,10))),a.closeOnHover&&l.hover(_,w),!a.onclick&&a.tapToDismiss&&l.click(M),a.closeButton&&g&&g.click((function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),a.onCloseClick&&a.onCloseClick(t),M(!0)})),a.onclick&&l.click((function(t){a.onclick(t),M()})),f(v),a.debug&&console&&console.log(v),l}function y(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function M(e){var n=e&&!1!==a.closeMethod?a.closeMethod:a.hideMethod,r=e&&!1!==a.closeDuration?a.closeDuration:a.hideDuration,i=e&&!1!==a.closeEasing?a.closeEasing:a.hideEasing;if(!t(":focus",l).length||e)return clearTimeout(b.intervalId),l[n]({duration:r,easing:i,complete:function(){m(l),clearTimeout(s),a.onHidden&&"hidden"!==v.state&&a.onHidden(),v.state="hidden",v.endTime=new Date,f(v)}})}function w(){(a.timeOut>0||a.extendedTimeOut>0)&&(s=setTimeout(M,a.extendedTimeOut),b.maxHideTime=parseFloat(a.extendedTimeOut),b.hideEta=(new Date).getTime()+b.maxHideTime)}function _(){clearTimeout(s),b.hideEta=0,l.stop(!0,!0)[a.showMethod]({duration:a.showDuration,easing:a.showEasing})}function A(){var t=(b.hideEta-(new Date).getTime())/b.maxHideTime*100;h.width(t+"%")}}function p(){return t.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},c.options)}function m(t){e||(e=u()),t.is(":visible")||(t.remove(),t=null,0===e.children().length&&(e.remove(),r=void 0))}}()}.apply(e,r))||(t.exports=i)},function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);var i=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in i)if(i.hasOwnProperty(a)){if(!("channels"in i[a]))throw new Error("missing channels property: "+a);if(!("labels"in i[a]))throw new Error("missing channel labels property: "+a);if(i[a].labels.length!==i[a].channels)throw new Error("channel and label counts mismatch: "+a);var o=i[a].channels,s=i[a].labels;delete i[a].channels,delete i[a].labels,Object.defineProperty(i[a],"channels",{value:o}),Object.defineProperty(i[a],"labels",{value:s})}i.rgb.hsl=function(t){var e,n,r=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),l=s-o;return s===o?e=0:r===s?e=(i-a)/l:i===s?e=2+(a-r)/l:a===s&&(e=4+(r-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},i.rgb.hsv=function(t){var e,n,r,i,a,o=t[0]/255,s=t[1]/255,l=t[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),d=function(t){return(c-t)/6/u+.5};return 0===u?i=a=0:(a=u/c,e=d(o),n=d(s),r=d(l),o===c?i=r-n:s===c?i=1/3+e-r:l===c&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*c]},i.rgb.hwb=function(t){var e=t[0],n=t[1],r=t[2];return[i.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,r))*100,100*(r=1-1/255*Math.max(e,Math.max(n,r)))]},i.rgb.cmyk=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-r,1-i)))/(1-e)||0),100*((1-r-e)/(1-e)||0),100*((1-i-e)/(1-e)||0),100*e]},i.rgb.keyword=function(t){var r=n[t];if(r)return r;var i,a,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var c=e[l],u=(a=t,o=c,Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)+Math.pow(a[2]-o[2],2));u.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*e+.7152*n+.0722*r),100*(.0193*e+.1192*n+.9505*r)]},i.rgb.lab=function(t){var e=i.rgb.xyz(t),n=e[0],r=e[1],a=e[2];return r/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},i.hsl.rgb=function(t){var e,n,r,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=o+1/3*-(c-1))<0&&r++,r>1&&r--,a=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,i[c]=255*a;return i},i.hsl.hsv=function(t){var e=t[0],n=t[1]/100,r=t[2]/100,i=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=a<=1?a:2-a,[e,100*(0===r?2*i/(a+i):2*n/(r+n)),(r+n)/2*100]},i.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,r=t[2]/100,i=Math.floor(e)%6,a=e-Math.floor(e),o=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}},i.hsv.hsl=function(t){var e,n,r,i=t[0],a=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return r=(2-a)*o,n=a*s,[i,100*(n=(n/=(e=(2-a)*s)<=1?e:2-e)||0),100*(r/=2)]},i.hwb.rgb=function(t){var e,n,r,i,a,o,s,l=t[0]/360,c=t[1]/100,u=t[2]/100,d=c+u;switch(d>1&&(c/=d,u/=d),r=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(r=1-r),i=c+r*((n=1-u)-c),e){default:case 6:case 0:a=n,o=i,s=c;break;case 1:a=i,o=n,s=c;break;case 2:a=c,o=n,s=i;break;case 3:a=c,o=i,s=n;break;case 4:a=i,o=c,s=n;break;case 5:a=n,o=c,s=i}return[255*a,255*o,255*s]},i.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},i.xyz.rgb=function(t){var e,n,r,i=t[0]/100,a=t[1]/100,o=t[2]/100;return n=-.9689*i+1.8758*a+.0415*o,r=.0557*i+-.204*a+1.057*o,e=(e=3.2406*i+-1.5372*a+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},i.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return n/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},i.lab.xyz=function(t){var e,n,r,i=t[0];e=t[1]/500+(n=(i+16)/116),r=n-t[2]/200;var a=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},i.lab.lch=function(t){var e,n=t[0],r=t[1],i=t[2];return(e=360*Math.atan2(i,r)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(r*r+i*i),e]},i.lch.lab=function(t){var e,n=t[0],r=t[1];return e=t[2]/360*2*Math.PI,[n,r*Math.cos(e),r*Math.sin(e)]},i.rgb.ansi16=function(t){var e=t[0],n=t[1],r=t[2],a=1 in arguments?arguments[1]:i.rgb.hsv(t)[2];if(0===(a=Math.round(a/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===a&&(o+=60),o},i.hsv.ansi16=function(t){return i.rgb.ansi16(i.hsv.rgb(t),t[2])},i.rgb.ansi256=function(t){var e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},i.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},i.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},i.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},i.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},i.rgb.hcg=function(t){var e,n=t[0]/255,r=t[1]/255,i=t[2]/255,a=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),s=a-o;return e=s<=0?0:a===n?(r-i)/s%6:a===r?2+(i-n)/s:4+(n-r)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},i.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=1,i=0;return(r=n<.5?2*e*n:2*e*(1-n))<1&&(i=(n-.5*r)/(1-r)),[t[0],100*r,100*i]},i.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,r=e*n,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},i.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100;if(0===n)return[255*r,255*r,255*r];var i,a=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return i=(1-n)*r,[255*(n*a[0]+i),255*(n*a[1]+i),255*(n*a[2]+i)]},i.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},i.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,r=0;return n>0&&n<.5?r=e/(2*n):n>=.5&&n<1&&(r=e/(2*(1-n))),[t[0],100*r,100*n]},i.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},i.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,r=n-e,i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],100*r,100*i]},i.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},i.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},i.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},i.gray.hsl=i.gray.hsv=function(t){return[0,0,t[0]]},i.gray.hwb=function(t){return[0,100,t[0]]},i.gray.cmyk=function(t){return[0,0,0,t[0]]},i.gray.lab=function(t){return[t[0],0,0]},i.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},i.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function r(t){var e=function(){for(var t={},e=Object.keys(n),r=e.length,i=0;i1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var r=n.length,i=0;i1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c={getRgba:u,getHsla:d,getRgb:function(t){var e=u(t);return e&&e.slice(0,3)},getHsl:function(t){var e=d(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=u(t);return e||(e=d(t))||(e=f(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?h(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:h,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);var n=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return"rgb("+n+"%, "+r+"%, "+i+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return v[t.slice(0,3)]}};function u(t){if(t){var e=[0,0,0],n=1,r=t.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var a=0;an?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,r=void 0===e?.5:e,i=2*r-1,a=this.alpha()-n.alpha(),o=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new M,r=this.values,i=n.values;for(var a in r)r.hasOwnProperty(a)&&(t=r[a],"[object Array]"===(e={}.toString.call(t))?i[a]=t.slice(0):"[object Number]"===e?i[a]=t:console.error("unexpected color value:",t));return n}},M.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},M.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},M.prototype.getValues=function(t){for(var e=this.values,n={},r=0;r=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:1===t?1:(n||(n=.3),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,r=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),r<1?(r=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},T={effects:S};x.easingEffects=S;var k=Math.PI,C=k/180,D=2*k,z=k/2,E=k/4,L=2*k/3,O={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,r,i,a){if(a){var o=Math.min(a,i/2,r/2),s=e+o,l=n+o,c=e+r-o,u=n+i-o;t.moveTo(e,l),se.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,r,i=this.animations,a=0;a=n?(F.callback(t.onAnimationComplete,[t],e),e.animating=!1,i.splice(a,1)):++a}},Q=F.options.resolve,J=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),r.length>0||(J.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};F.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,r=this.getDataset(),i=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!r.xAxisID||(t.xAxisID=r.xAxisID||i.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!r.yAxisID||(t.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(t=0,e=r.length;tn&&this.insertElements(n,r-n)},insertElements:function(t,e){for(var n=0;ni?(a=i/e.innerRadius,t.arc(o,s,e.innerRadius-i,r+a,n-a,!0)):t.arc(o,s,i,r+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function at(t,e,n){var r="inner"===e.borderAlign;r?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,r){var i,a=n.endAngle;for(r&&(n.endAngle=n.startAngle+rt,it(t,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=rt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+rt,n.startAngle,!0),i=0;is;)i-=rt;for(;i=o&&i<=s,c=a>=n.innerRadius&&a<=n.outerRadius;return l&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/rt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+rt,e.beginPath(),e.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),e.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),e.closePath(),t=0;tt.x&&(e=bt(e,"left","right")):t.basen?n:r,r:l.right||i<0?0:i>e?e:i,b:l.bottom||a<0?0:a>n?n:a,l:l.left||o<0?0:o>e?e:o}}function yt(t,e,n){var r=null===e,i=null===n,a=!(!t||r&&i)&>(t);return a&&(r||e>=a.left&&e<=a.right)&&(i||n>=a.top&&n<=a.bottom)}P._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var Mt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=gt(t),n=e.right-e.left,r=e.bottom-e.top,i=vt(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}}(e),r=n.outer,i=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(r.x,r.y,r.w,r.h),r.w===i.w&&r.h===i.h||(t.save(),t.beginPath(),t.rect(r.x,r.y,r.w,r.h),t.clip(),t.fillStyle=e.borderColor,t.rect(i.x,i.y,i.w,i.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return yt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?yt(n,t,null):yt(n,null,e)},inXRange:function(t){return yt(this._view,t,null)},inYRange:function(t){return yt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),wt={},_t=ot,At=ct,xt=ht,St=Mt;wt.Arc=_t,wt.Line=At,wt.Point=xt,wt.Rectangle=St;var Tt=F._deprecated,kt=F.valueOrDefault;function Ct(t,e,n){var r,i,a=n.barThickness,o=e.stackCount,s=e.pixels[t],l=F.isNullOrUndef(a)?function(t,e){var n,r,i,a,o=t._length;for(i=1,a=e.length;i0?Math.min(o,Math.abs(r-n)):o,n=r;return o}(e.scale,e.pixels):-1;return F.isNullOrUndef(a)?(r=l*n.categoryPercentage,i=n.barPercentage):(r=a*o,i=1),{chunk:r/o,ratio:i,start:s-r/2}}P._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),P._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=nt.extend({dataElementType:wt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Tt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Tt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Tt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Tt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Tt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=r.length;e=0&&m.min>=0?m.min:m.max,M=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=p.length;if(b||void 0===b&&void 0!==v)for(r=0;r=0&&c.max>=0?c.max:c.min,(m.min<0&&a<0||m.max>=0&&a>0)&&(y+=a));return o=d.getPixelForValue(y),l=(s=d.getPixelForValue(y+M))-o,void 0!==g&&Math.abs(l)=0&&!f||M<0&&f?o-g:o+g),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,r){var i="flex"===r.barThickness?function(t,e,n){var r,i=e.pixels,a=i[t],o=t>0?i[t-1]:null,s=t=It?-Nt:v<-It?Nt:0)+g,M=Math.cos(v),w=Math.sin(v),_=Math.cos(y),A=Math.sin(y),x=v<=0&&y>=0||y>=Nt,S=v<=Pt&&y>=Pt||y>=Nt+Pt,T=v<=-Pt&&y>=-Pt||y>=It+Pt,k=v===-It||y>=It?-1:Math.min(M,M*m,_,_*m),C=T?-1:Math.min(w,w*m,A,A*m),D=x?1:Math.max(M,M*m,_,_*m),z=S?1:Math.max(w,w*m,A,A*m);c=(D-k)/2,u=(z-C)/2,d=-(D+k)/2,f=-(z+C)/2}for(r=0,i=p.length;r0&&!isNaN(t)?Nt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,r,i,a,o,s,l,c=0,u=this.chart;if(!t)for(e=0,n=u.data.datasets.length;e(c=s>c?s:c)?l:c);return c},setHoverStyle:function(t){var e=t._model,n=t._options,r=F.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Ot(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=Ot(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=Ot(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&Ft(l[t-1]._model,s)&&(n.controlPointPreviousX=c(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=c(n.controlPointPreviousY,s.top,s.bottom)),t0&&(a=t.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(t,e){return re(t,e,{intersect:!1})},point:function(t,e){return te(t,Qt(e,t))},nearest:function(t,e,n){var r=Qt(e,t);n.axis=n.axis||"xy";var i=ne(n.axis);return ee(t,r,n.intersect,i)},x:function(t,e,n){var r=Qt(e,t),i=[],a=!1;return Jt(t,(function(t){t.inXRange(r.x)&&i.push(t),t.inRange(r.x,r.y)&&(a=!0)})),n.intersect&&!a&&(i=[]),i},y:function(t,e,n){var r=Qt(e,t),i=[],a=!1;return Jt(t,(function(t){t.inYRange(r.y)&&i.push(t),t.inRange(r.x,r.y)&&(a=!0)})),n.intersect&&!a&&(i=[]),i}}},ae=F.extend;function oe(t,e){return F.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var r=e?n:t,i=e?t:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight}))}function le(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function ce(t,e,n){var r,i,a=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?a.height:a.width,t[n.pos]+=n.size,a.getPadding){var s=a.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(r=e.outerWidth-le(o,t,"left","right"),i=e.outerHeight-le(o,t,"top","bottom"),r!==t.w||i!==t.h)return t.w=r,t.h=i,n.horizontal?r!==t.w:i!==t.h}function ue(t,e){var n=e.maxPadding;function r(t){var r={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){r[t]=Math.max(e[t],n[t])})),r}return r(t?["left","right"]:["top","bottom"])}function de(t,e,n){var r,i,a,o,s,l,c=[];for(r=0,i=t.length;r div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&he.default||he,ge=["animationstart","webkitAnimationStart"],be={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ve(t,e){var n=F.getStyle(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var ye=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,ye)}function we(t,e,n){t.removeEventListener(e,n,ye)}function _e(t,e,n,r,i){return{type:t,chart:e,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Ae(t){var e=document.createElement("div");return e.className=t||"",e}function xe(t,e,n){var r,i,a,o,s=t.$chartjs||(t.$chartjs={}),l=s.resizer=function(t){var e=Ae("chartjs-size-monitor"),n=Ae("chartjs-size-monitor-expand"),r=Ae("chartjs-size-monitor-shrink");n.appendChild(Ae()),r.appendChild(Ae()),e.appendChild(n),e.appendChild(r),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){e._reset(),t()};return Me(n,"scroll",i.bind(n,"expand")),Me(r,"scroll",i.bind(r,"shrink")),e}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&t.parentNode,i=r?r.clientWidth:0;e(_e("resize",n)),r&&r.clientWidth0){var a=t[0];a.label?n=a.label:a.xLabel?n=a.xLabel:i>0&&a.index-1?t.split("\n"):t}function Pe(t){var e=P.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ee(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ee(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ee(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ee(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ee(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ee(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ee(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ee(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ee(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Re(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Be(t){return Ie([],Ne(t))}var je=G.extend({initialize:function(){this._model=Pe(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,r=n.beforeTitle.apply(t,arguments),i=n.title.apply(t,arguments),a=n.afterTitle.apply(t,arguments),o=[];return o=Ie(o,Ne(r)),o=Ie(o,Ne(i)),o=Ie(o,Ne(a))},getBeforeBody:function(){return Be(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,r=n._options.callbacks,i=[];return F.each(t,(function(t){var a={before:[],lines:[],after:[]};Ie(a.before,Ne(r.beforeLabel.call(n,t,e))),Ie(a.lines,r.label.call(n,t,e)),Ie(a.after,Ne(r.afterLabel.call(n,t,e))),i.push(a)})),i},getAfterBody:function(){return Be(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),r=e.footer.apply(t,arguments),i=e.afterFooter.apply(t,arguments),a=[];return a=Ie(a,Ne(n)),a=Ie(a,Ne(r)),a=Ie(a,Ne(i))},update:function(t){var e,n,r,i,a,o,s,l,c,u,d=this,f=d._options,h=d._model,p=d._model=Pe(f),m=d._active,g=d._data,b={xAlign:h.xAlign,yAlign:h.yAlign},v={x:h.x,y:h.y},y={width:h.width,height:h.height},M={x:h.caretX,y:h.caretY};if(m.length){p.opacity=1;var w=[],_=[];M=Oe[f.position].call(d,m,d._eventPosition);var A=[];for(e=0,n=m.length;er.width&&(i=r.width-e.width),i<0&&(i=0)),"top"===u?a+=d:a-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===c?i+=d:"right"===c&&(i-=d):"left"===c?i-=f:"right"===c&&(i+=f),{x:i,y:a}}(p,y,b=function(t,e){var n,r,i,a,o,s=t._model,l=t._chart,c=t._chart.chartArea,u="center",d="center";s.yl.height-e.height&&(d="bottom");var f=(c.left+c.right)/2,h=(c.top+c.bottom)/2;"center"===d?(n=function(t){return t<=f},r=function(t){return t>f}):(n=function(t){return t<=e.width/2},r=function(t){return t>=l.width-e.width/2}),i=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},a=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=h?"top":"bottom"},n(s.x)?(u="left",i(s.x)&&(u="center",d=o(s.y))):r(s.x)&&(u="right",a(s.x)&&(u="center",d=o(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:d}}(this,y),d._chart)}else p.opacity=0;return p.xAlign=b.xAlign,p.yAlign=b.yAlign,p.x=v.x,p.y=v.y,p.width=y.width,p.height=y.height,p.caretX=M.x,p.caretY=M.y,d._model=p,t&&f.custom&&f.custom.call(d,p),d},drawCaret:function(t,e){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(t,e,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var r,i,a,o,s,l,c=n.caretSize,u=n.cornerRadius,d=n.xAlign,f=n.yAlign,h=t.x,p=t.y,m=e.width,g=e.height;if("center"===f)s=p+g/2,"left"===d?(i=(r=h)-c,a=r,o=s+c,l=s-c):(i=(r=h+m)+c,a=r,o=s-c,l=s+c);else if("left"===d?(r=(i=h+u+c)-c,a=i+c):"right"===d?(r=(i=h+m-u-c)-c,a=i+c):(r=(i=n.caretX)-c,a=i+c),"top"===f)s=(o=p)-c,l=o;else{s=(o=p+g)+c,l=o;var b=a;a=r,r=b}return{x1:r,x2:i,x3:a,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var r,i,a,o=e.title,s=o.length;if(s){var l=Le(e.rtl,e.x,e.width);for(t.x=Re(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",r=e.titleFontSize,i=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=F.fontString(r,e._titleFontStyle,e._titleFontFamily),a=0;a0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},r={x:e.x,y:e.y},i=Math.abs(e.opacity<.001)?0:e.opacity,a=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,e,t,n),r.y+=e.yPadding,F.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),F.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,r.mode,r),r.reverse&&n._active.reverse()),(e=!F.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Oe,Fe=je;Fe.positioners=qe;var $e=F.valueOrDefault;function We(){return F.merge({},[].slice.call(arguments),{merger:function(t,e,n,r){if("xAxes"===t||"yAxes"===t){var i,a,o,s=n[t].length;for(e[t]||(e[t]=[]),i=0;i=e[t].length&&e[t].push({}),!e[t][i].type||o.type&&o.type!==e[t][i].type?F.merge(e[t][i],[ze.getScaleDefaults(a),o]):F.merge(e[t][i],o)}else F._merger(t,e,n,r)}})}function Xe(){return F.merge({},[].slice.call(arguments),{merger:function(t,e,n,r){var i=e[t]||{},a=n[t];"scales"===t?e[t]=We(i,a):"scale"===t?e[t]=F.merge(i,[ze.getScaleDefaults(a.type),a]):F._merger(t,e,n,r)}})}function He(t){var e=t.options;F.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Xe(P.global,P[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ue(t,e,n){var r,i=function(t){return t.id===r};do{r=e+n++}while(F.findIndex(t,i)>=0);return r}function Ve(t){return"top"===t||"bottom"===t}function Ge(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}P._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ye=function(t,e){return this.construct(t,e),this};F.extend(Ye.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(P.global,P[t.type],t.options||{}),t}(e);var r=Ce.acquireContext(t,e),i=r&&r.canvas,a=i&&i.height,o=i&&i.width;n.id=F.uid(),n.ctx=r,n.canvas=i,n.config=e,n.width=o,n.height=a,n.aspectRatio=a?o/a:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Ye.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),r&&i?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return De.notify(t,"beforeInit"),F.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),De.notify(t,"afterInit"),t},clear:function(){return F.canvas.clear(this),this},stop:function(){return Z.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,r=e.canvas,i=n.maintainAspectRatio&&e.aspectRatio||null,a=Math.max(0,Math.floor(F.getMaximumWidth(r))),o=Math.max(0,Math.floor(i?a/i:F.getMaximumHeight(r)));if((e.width!==a||e.height!==o)&&(r.width=e.width=a,r.height=e.height=o,r.style.width=a+"px",r.style.height=o+"px",F.retinaScale(e,n.devicePixelRatio),!t)){var s={width:a,height:o};De.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;F.each(e.xAxes,(function(t,n){t.id||(t.id=Ue(e.xAxes,"x-axis-",n))})),F.each(e.yAxes,(function(t,n){t.id||(t.id=Ue(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},r=[],i=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(r=r.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&r.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),F.each(r,(function(e){var r=e.options,a=r.id,o=$e(r.type,e.dtype);Ve(r.position)!==Ve(e.dposition)&&(r.position=e.dposition),i[a]=!0;var s=null;if(a in n&&n[a].type===o)(s=n[a]).options=r,s.ctx=t.ctx,s.chart=t;else{var l=ze.getScaleConstructor(o);if(!l)return;s=new l({id:a,type:o,options:r,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),F.each(i,(function(t,e){t||delete n[e]})),t.scales=n,ze.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,r=[],i=n.data.datasets;for(t=0,e=i.length;t=0;--n)this.drawDataset(e[n],t);De.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==De.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),De.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==De.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),De.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ie.modes.single(this,t)},getElementsAtEvent:function(t){return ie.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ie.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var r=ie.modes[e];return"function"==typeof r?r(this,t,n):[]},getDatasetAtEvent:function(t){return ie.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var i=F.log10(Math.abs(r)),a="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=F.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(i);s=Math.max(Math.min(s,20),0),a=t.toExponential(s)}else{var l=-1*Math.floor(i);l=Math.max(Math.min(l,20),0),a=t.toFixed(l)}else a="0";return a},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(F.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}},en=F.isArray,nn=F.isNullOrUndef,rn=F.valueOrDefault,an=F.valueAtIndexOrDefault;function on(t,e,n){var r,i=t.getTicks().length,a=Math.min(e,i-1),o=t.getPixelForTick(a),s=t._startPixel,l=t._endPixel;if(!(n&&(r=1===i?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(a-1))/2,(o+=al+1e-6)))return o}function sn(t,e,n,r){var i,a,o,s,l,c,u,d,f,h,p,m,g,b=n.length,v=[],y=[],M=[];for(i=0;ie){for(n=0;n=f||u<=1||!s.isHorizontal()?s.labelRotation=d:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,r=Math.min(s.maxWidth,s.chart.width-e),e+6>(i=l.offset?s.maxWidth/u:r/(u-1))&&(i=r/(u-(l.offset?.5:1)),a=s.maxHeight-ln(l.gridLines)-c.padding-cn(l.scaleLabel),o=Math.sqrt(e*e+n*n),h=F.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/i,1)),Math.asin(Math.min(a/o,1))-Math.asin(n/o))),h=Math.max(d,Math.min(f,h))),s.labelRotation=h)},afterCalculateTickRotation:function(){F.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){F.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,r=t.options,i=r.ticks,a=r.scaleLabel,o=r.gridLines,s=t._isVisible(),l="bottom"===r.position,c=t.isHorizontal();if(c?e.width=t.maxWidth:s&&(e.width=ln(o)+cn(a)),c?s&&(e.height=ln(o)+cn(a)):e.height=t.maxHeight,i.display&&s){var u=dn(i),d=t._getLabelSizes(),f=d.first,h=d.last,p=d.widest,m=d.highest,g=.4*u.minor.lineHeight,b=i.padding;if(c){var v=0!==t.labelRotation,y=F.toRadians(t.labelRotation),M=Math.cos(y),w=Math.sin(y),_=w*p.width+M*(m.height-(v?m.offset:0))+(v?0:g);e.height=Math.min(t.maxHeight,e.height+_+b);var A,x,S=t.getPixelForTick(0)-t.left,T=t.right-t.getPixelForTick(t.getTicks().length-1);v?(A=l?M*f.width+w*f.offset:w*(f.height-f.offset),x=l?w*(h.height-h.offset):M*h.width+w*h.offset):(A=f.width/2,x=h.width/2),t.paddingLeft=Math.max((A-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((x-T)*t.width/(t.width-T),0)+3}else{var k=i.mirror?0:p.width+b+g;e.width=Math.min(t.maxWidth,e.width+k),t.paddingTop=f.height/2,t.paddingBottom=h.height/2}}t.handleMargins(),c?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){F.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(nn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,r,i=this;for(i.ticks=t.map((function(t){return t.value})),i.beforeTickToLabelConversion(),e=i.convertTicksToLabels(t)||i.ticks,i.afterTickToLabelConversion(),n=0,r=t.length;nn-1?null:this.getPixelForDecimal(t*r+(e?r/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,r,i,a=this.options.ticks,o=this._length,s=a.maxTicksLimit||o/this._tickSize()+1,l=a.major.enabled?function(t){var e,n,r=[];for(e=0,n=t.length;es)return function(t,e,n){var r,i,a=0,o=e[0];for(n=Math.ceil(n),r=0;rc)return a;return Math.max(c,1)}(l,t,0,s),c>0){for(e=0,n=c-1;e1?(d-u)/(c-1):null,hn(t,r,F.isNullOrUndef(i)?0:u-i,u),hn(t,r,d,F.isNullOrUndef(i)?t.length:d+i),fn(t)}return hn(t,r),fn(t)},_tickSize:function(){var t=this.options.ticks,e=F.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),i=this._getLabelSizes(),a=t.autoSkipPadding||0,o=i?i.widest.width+a:0,s=i?i.highest.height+a:0;return this.isHorizontal()?s*n>o*r?o/n:s/r:s*r=0&&(o=t),void 0!==a&&(t=n.indexOf(a))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;mn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var r,i,a,o=this;return gn(e)||gn(n)||(t=o.chart.data.datasets[n].data[e]),gn(t)||(r=o.isHorizontal()?t.x:t.y),(void 0!==r||void 0!==t&&isNaN(e))&&(i=o._getLabels(),t=F.valueOrDefault(r,t),e=-1!==(a=i.indexOf(t))?a:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),vn={position:"bottom"};bn._defaults=vn;var yn=F.noop,Mn=F.isNullOrUndef,wn=mn.extend({getRightValue:function(t){return"string"==typeof t?+t:mn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=F.sign(t.min),r=F.sign(t.max);n<0&&r<0?t.max=0:n>0&&r>0&&(t.min=0)}var i=void 0!==e.min||void 0!==e.suggestedMin,a=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),i!==a&&t.min>=t.max&&(i?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,r=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:yn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:F.valueOrDefault(e.fixedStepSize,e.stepSize)},i=t.ticks=function(t,e){var n,r,i,a,o=[],s=t.stepSize,l=s||1,c=t.maxTicks-1,u=t.min,d=t.max,f=t.precision,h=e.min,p=e.max,m=F.niceNum((p-h)/c/l)*l;if(m<1e-14&&Mn(u)&&Mn(d))return[h,p];(a=Math.ceil(p/m)-Math.floor(h/m))>c&&(m=F.niceNum(a*m/c/l)*l),s||Mn(f)?n=Math.pow(10,F._decimalPlaces(m)):(n=Math.pow(10,f),m=Math.ceil(m*n)/n),r=Math.floor(h/m)*m,i=Math.ceil(p/m)*m,s&&(!Mn(u)&&F.almostWhole(u/m,m/1e3)&&(r=u),!Mn(d)&&F.almostWhole(d/m,m/1e3)&&(i=d)),a=(i-r)/m,a=F.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),r=Math.round(r*n)/n,i=Math.round(i*n)/n,o.push(Mn(u)?r:u);for(var g=1;ge.length-1?null:this.getPixelForValue(e[t])}}),Tn=_n;Sn._defaults=Tn;var kn=F.valueOrDefault,Cn=F.math.log10,Dn={position:"left",ticks:{callback:tn.formatters.logarithmic}};function zn(t,e){return F.isFinite(t)&&t>=0?t:e}var En=mn.extend({determineDataLimits:function(){var t,e,n,r,i,a,o=this,s=o.options,l=o.chart,c=l.data.datasets,u=o.isHorizontal();function d(t){return u?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var f=s.stacked;if(void 0===f)for(t=0;t0){var e=F.min(t),n=F.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Cn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:zn(e.min),max:zn(e.max)},i=t.ticks=function(t,e){var n,r,i=[],a=kn(t.min,Math.pow(10,Math.floor(Cn(e.min)))),o=Math.floor(Cn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===a?(n=Math.floor(Cn(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),i.push(a),a=r*Math.pow(10,n)):(n=Math.floor(Cn(a)),r=Math.floor(a/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{i.push(a),10==++r&&(r=1,l=++n>=0?1:l),a=Math.round(r*Math.pow(10,n)*l)/l}while(ne.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Cn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;mn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=kn(t.options.ticks.fontSize,P.global.defaultFontSize)/t._length),t._startValue=Cn(e),t._valueOffset=n,t._valueRange=(Cn(t.max)-Cn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Cn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Ln=Dn;En._defaults=Ln;var On=F.valueOrDefault,In=F.valueAtIndexOrDefault,Nn=F.options.resolve,Pn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:tn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Rn(t){var e=t.ticks;return e.display&&t.display?On(e.fontSize,P.global.defaultFontSize)+2*e.backdropPaddingY:0}function Bn(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:ti?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function qn(t,e,n,r){var i,a,o=n.y+r/2;if(F.isArray(e))for(i=0,a=e.length;i270||t<90)&&(n.y-=e.h)}function $n(t){return F.isNumber(t)?t:0}var Wn=wn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Rn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;F.each(e.data.datasets,(function(i,a){if(e.isDatasetVisible(a)){var o=e.getDatasetMeta(a);F.each(i.data,(function(e,i){var a=+t.getRightValue(e);isNaN(a)||o.data[i].hidden||(n=Math.min(a,n),r=Math.max(a,r))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=r===Number.NEGATIVE_INFINITY?0:r,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Rn(this.options))},convertTicksToLabels:function(){var t=this;wn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=F.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,r,i=F.options._parseFont(t.options.pointLabels),a={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=i.string,t._pointLabelSizes=[];var s,l,c,u=t.chart.data.labels.length;for(e=0;ea.r&&(a.r=h.end,o.r=d),p.starta.b&&(a.b=p.end,o.b=d)}t.setReductions(t.drawingArea,a,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var r=this,i=e.l/Math.sin(n.l),a=Math.max(e.r-r.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(r.height-r.paddingTop),0)/Math.cos(n.b);i=$n(i),a=$n(a),o=$n(o),s=$n(s),r.drawingArea=Math.min(Math.floor(t-(i+a)/2),Math.floor(t-(o+s)/2)),r.setCenterPoint(i,a,o,s)},setCenterPoint:function(t,e,n,r){var i=this,a=i.width-e-i.drawingArea,o=t+i.drawingArea,s=n+i.drawingArea,l=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((o+a)/2+i.left),i.yCenter=Math.floor((s+l)/2+i.top+i.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(F.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,r=this,i=r.ctx,a=r.options,o=a.gridLines,s=a.angleLines,l=On(s.lineWidth,o.lineWidth),c=On(s.color,o.color);if(a.pointLabels.display&&function(t){var e=t.ctx,n=t.options,r=n.pointLabels,i=Rn(n),a=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=F.options._parseFont(r);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?i/2:0,c=t.getPointPosition(s,a+l+5),u=In(r.fontColor,s,P.global.defaultFontColor);e.fillStyle=u;var d=t.getIndexAngle(s),f=F.toDegrees(d);e.textAlign=jn(f),Fn(f,t._pointLabelSizes[s],c),qn(e,t.pointLabels[s],c,o.lineHeight)}e.restore()}(r),o.display&&F.each(r.ticks,(function(t,n){0!==n&&(e=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(t,e,n,r){var i,a=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=In(e.color,r-1),c=In(e.lineWidth,r-1);if((o||s)&&l&&c){if(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash&&(a.setLineDash(e.borderDash||[]),a.lineDashOffset=e.borderDashOffset||0),a.beginPath(),o)a.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{i=t.getPointPosition(0,n),a.moveTo(i.x,i.y);for(var u=1;u=0;t--)e=r.getDistanceFromCenterForValue(a.ticks.reverse?r.min:r.max),n=r.getPointPosition(t,e),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(n.x,n.y),i.stroke();i.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var r,i,a=t.getIndexAngle(0),o=F.options._parseFont(n),s=On(n.fontColor,P.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(a),e.textAlign="center",e.textBaseline="middle",F.each(t.ticks,(function(a,l){(0!==l||n.reverse)&&(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(i=e.measureText(a).width,e.fillStyle=n.backdropColor,e.fillRect(-i/2-n.backdropPaddingX,-r-o.size/2-n.backdropPaddingY,i+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(a,0,-r))})),e.restore()}},_drawTitle:F.noop}),Xn=Pn;Wn._defaults=Xn;var Hn=F._deprecated,Un=F.options.resolve,Vn=F.valueOrDefault,Gn=Number.MIN_SAFE_INTEGER||-9007199254740991,Yn=Number.MAX_SAFE_INTEGER||9007199254740991,Kn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Zn=Object.keys(Kn);function Qn(t,e){return t-e}function Jn(t){return F.valueOrDefault(t.time.min,t.ticks.min)}function tr(t){return F.valueOrDefault(t.time.max,t.ticks.max)}function er(t,e,n,r){var i=function(t,e,n){for(var r,i,a,o=0,s=t.length-1;o>=0&&o<=s;){if(i=t[(r=o+s>>1)-1]||null,a=t[r],!i)return{lo:null,hi:a};if(a[e]n))return{lo:i,hi:a};s=r-1}}return{lo:a,hi:null}}(t,e,n),a=i.lo?i.hi?i.lo:t[t.length-2]:t[0],o=i.lo?i.hi?i.hi:t[t.length-1]:t[1],s=o[e]-a[e],l=s?(n-a[e])/s:0,c=(o[r]-a[r])*l;return a[r]+c}function nr(t,e){var n=t._adapter,r=t.options.time,i=r.parser,a=i||r.format,o=e;return"function"==typeof i&&(o=i(o)),F.isFinite(o)||(o="string"==typeof a?n.parse(o,a):n.parse(o)),null!==o?+o:(i||"function"!=typeof a||(o=a(e),F.isFinite(o)||(o=n.parse(o))),o)}function rr(t,e){if(F.isNullOrUndef(e))return null;var n=t.options.time,r=nr(t,t.getRightValue(e));return null===r||n.round&&(r=+t._adapter.startOf(r,n.round)),r}function ir(t,e,n,r){var i,a,o,s=Zn.length;for(i=Zn.indexOf(t);i=0&&(e[a].major=!0);return e}(t,a,o,n):a}var or=mn.extend({initialize:function(){this.mergeTicksOptions(),mn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),r=t._adapter=new Je._date(e.adapters.date);return Hn("time scale",n.format,"time.format","time.parser"),Hn("time scale",n.min,"time.min","ticks.min"),Hn("time scale",n.max,"time.max","ticks.max"),F.mergeIf(n.displayFormats,r.formats()),mn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),mn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,r,i,a,o,s=this,l=s.chart,c=s._adapter,u=s.options,d=u.time.unit||"day",f=Yn,h=Gn,p=[],m=[],g=[],b=s._getLabels();for(t=0,n=b.length;t1?function(t){var e,n,r,i={},a=[];for(e=0,n=t.length;e1e5*c)throw e+" and "+n+" are too far apart with stepSize of "+c+" "+l;for(i=d;i=i&&n<=a&&u.push(n);return r.min=i,r.max=a,r._unit=l.unit||(s.autoSkip?ir(l.minUnit,r.min,r.max,d):function(t,e,n,r,i){var a,o;for(a=Zn.length-1;a>=Zn.indexOf(n);a--)if(o=Zn[a],Kn[o].common&&t._adapter.diff(i,r,o)>=e-1)return o;return Zn[n?Zn.indexOf(n):0]}(r,u.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(t){for(var e=Zn.indexOf(t)+1,n=Zn.length;ee&&s=0&&t0?s:1}}),sr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};or._defaults=sr;var lr={category:bn,linear:Sn,logarithmic:En,radialLinear:Wn,time:or},cr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Je._date.override("function"==typeof t?{_id:"moment",formats:function(){return cr},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,r){return t(e).add(n,r).valueOf()},diff:function(e,n,r){return t(e).diff(t(n),r)},startOf:function(e,n,r){return e=t(e),"isoWeek"===n?e.isoWeekday(r).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),P._set("global",{plugins:{filler:{propagate:!0}}});var ur={dataset:function(t){var e=t.fill,n=t.chart,r=n.getDatasetMeta(e),i=r&&n.isDatasetVisible(e)&&r.dataset._children||[],a=i.length||0;return a?function(t,e){return e=n)&&r;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function fr(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,r,i,a,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,c=t.fill,u=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,e),i=0;i0;--a)F.canvas.lineTo(t,n[a],n[a-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),a=i-1;a>0;--a)t.arc(o,s,l,n[a].angle,n[a-1].angle,!0)}}function br(t,e,n,r,i,a){var o,s,l,c,u,d,f,h,p=e.length,m=r.spanGaps,g=[],b=[],v=0,y=0;for(t.beginPath(),o=0,s=p;o=0;--n)(e=l[n].$filler)&&e.visible&&(i=(r=e.el)._view,a=r._children||[],o=e.mapper,s=i.backgroundColor||P.global.defaultColor,o&&s&&a.length&&(F.canvas.clipArea(c,t.chartArea),br(c,a,o,i,s,r._loop),F.canvas.unclipArea(c)))}},yr=F.rtl.getRtlAdapter,Mr=F.noop,wr=F.valueOrDefault;function _r(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}P._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},r=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var i=n.controller.getStyle(r?0:void 0);return{text:e[n.index].label,fillStyle:i.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,r,i=document.createElement("ul"),a=t.data.datasets;for(i.setAttribute("class",t.id+"-legend"),e=0,n=a.length;el.width)&&(d+=o+n.padding,u[u.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:r,height:o},u[u.length-1]+=r+n.padding})),l.height+=d}else{var f=n.padding,h=t.columnWidths=[],p=t.columnHeights=[],m=n.padding,g=0,b=0;F.each(t.legendItems,(function(t,e){var r=_r(n,o)+o/2+i.measureText(t.text).width;e>0&&b+o+2*f>l.height&&(m+=g+n.padding,h.push(g),p.push(b),g=0,b=0),g=Math.max(g,r),b+=o+f,s[e]={left:0,top:0,width:r,height:o}})),m+=g,h.push(g),p.push(b),l.width+=m}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Mr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=P.global,i=r.defaultColor,a=r.elements.line,o=t.height,s=t.columnHeights,l=t.width,c=t.lineWidths;if(e.display){var u,d=yr(e.rtl,t.left,t.minSize.width),f=t.ctx,h=wr(n.fontColor,r.defaultFontColor),p=F.options._parseFont(n),m=p.size;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=h,f.fillStyle=h,f.font=p.string;var g=_r(n,m),b=t.legendHitBoxes,v=function(t,r){switch(e.align){case"start":return n.padding;case"end":return t-r;default:return(t-r+n.padding)/2}},y=t.isHorizontal();u=y?{x:t.left+v(l,c[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+v(o,s[0]),line:0},F.rtl.overrideTextDirection(t.ctx,e.textDirection);var M=m+n.padding;F.each(t.legendItems,(function(e,r){var h=f.measureText(e.text).width,p=g+m/2+h,w=u.x,_=u.y;d.setWidth(t.minSize.width),y?r>0&&w+p+n.padding>t.left+t.minSize.width&&(_=u.y+=M,u.line++,w=u.x=t.left+v(l,c[u.line])):r>0&&_+M>t.top+t.minSize.height&&(w=u.x=w+t.columnWidths[u.line]+n.padding,u.line++,_=u.y=t.top+v(o,s[u.line]));var A=d.x(w);!function(t,e,r){if(!(isNaN(g)||g<=0)){f.save();var o=wr(r.lineWidth,a.borderWidth);if(f.fillStyle=wr(r.fillStyle,i),f.lineCap=wr(r.lineCap,a.borderCapStyle),f.lineDashOffset=wr(r.lineDashOffset,a.borderDashOffset),f.lineJoin=wr(r.lineJoin,a.borderJoinStyle),f.lineWidth=o,f.strokeStyle=wr(r.strokeStyle,i),f.setLineDash&&f.setLineDash(wr(r.lineDash,a.borderDash)),n&&n.usePointStyle){var s=g*Math.SQRT2/2,l=d.xPlus(t,g/2),c=e+m/2;F.canvas.drawPoint(f,r.pointStyle,s,l,c,r.rotation)}else f.fillRect(d.leftForLtr(t,g),e,g,m),0!==o&&f.strokeRect(d.leftForLtr(t,g),e,g,m);f.restore()}}(A,_,e),b[r].left=d.leftForLtr(A,b[r].width),b[r].top=_,function(t,e,n,r){var i=m/2,a=d.xPlus(t,g+i),o=e+i;f.fillText(n.text,a,o),n.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(a,o),f.lineTo(d.xPlus(a,r),o),f.stroke())}(A,_,e,h),y?u.x+=p+n.padding:u.y+=M})),F.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,r,i,a=this;if(t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom)for(i=a.legendHitBoxes,n=0;n=(r=i[n]).left&&t<=r.left+r.width&&e>=r.top&&e<=r.top+r.height)return a.legendItems[n];return null},handleEvent:function(t){var e,n=this,r=n.options,i="mouseup"===t.type?"click":t.type;if("mousemove"===i){if(!r.onHover&&!r.onLeave)return}else{if("click"!==i)return;if(!r.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===i?e&&r.onClick&&r.onClick.call(n,t.native,e):(r.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),r.onHover&&e&&r.onHover.call(n,t.native,e))}});function xr(t,e){var n=new Ar({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Sr={id:"legend",_element:Ar,beforeInit:function(t){var e=t.options.legend;e&&xr(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(F.mergeIf(e,P.global.legend),n?(pe.configure(t,n,e),n.options=e):xr(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Tr=F.noop;P._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var kr=G.extend({initialize:function(t){F.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Tr,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Tr,beforeSetDimensions:Tr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Tr,beforeBuildLabels:Tr,buildLabels:Tr,afterBuildLabels:Tr,beforeFit:Tr,fit:function(){var t,e=this,n=e.options,r=e.minSize={},i=e.isHorizontal();n.display?(t=(F.isArray(n.text)?n.text.length:1)*F.options._parseFont(n).lineHeight+2*n.padding,e.width=r.width=i?e.maxWidth:t,e.height=r.height=i?t:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:Tr,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var r,i,a,o=F.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,c=0,u=t.top,d=t.left,f=t.bottom,h=t.right;e.fillStyle=F.valueOrDefault(n.fontColor,P.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(i=d+(h-d)/2,a=u+l,r=h-d):(i="left"===n.position?d+l:h-l,a=u+(f-u)/2,r=f-u,c=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(i,a),e.rotate(c),e.textAlign="center",e.textBaseline="middle";var p=n.text;if(F.isArray(p))for(var m=0,g=0;g=0;r--){var i=t[r];if(e(i))return i}},F.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},F.almostEquals=function(t,e,n){return Math.abs(t-e)=t},F.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},F.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},F.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},F.toRadians=function(t){return t*(Math.PI/180)},F.toDegrees=function(t){return t*(180/Math.PI)},F._decimalPlaces=function(t){if(F.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},F.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:i}},F.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},F.aliasPixel=function(t){return t%2==0?0:.5},F._alignPixel=function(t,e,n){var r=t.currentDevicePixelRatio,i=n/2;return Math.round((e-i)*r)/r+i},F.splineCurve=function(t,e,n,r){var i=t.skip?e:t,a=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2)),l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),c=s/(s+l),u=l/(s+l),d=r*(c=isNaN(c)?0:c),f=r*(u=isNaN(u)?0:u);return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}},F.EPSILON=Number.EPSILON||1e-14,F.splineCurveMonotone=function(t){var e,n,r,i,a,o,s,l,c,u=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),d=u.length;for(e=0;e0?u[e-1]:null,(i=e0?u[e-1]:null,i=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},F.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},F.niceNum=function(t,e){var n=Math.floor(F.log10(t)),r=t/Math.pow(10,n);return(e?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},F.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},F.getRelativePosition=function(t,e){var n,r,i=t.originalEvent||t,a=t.target||t.srcElement,o=a.getBoundingClientRect(),s=i.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=i.clientX,r=i.clientY);var l=parseFloat(F.getStyle(a,"padding-left")),c=parseFloat(F.getStyle(a,"padding-top")),u=parseFloat(F.getStyle(a,"padding-right")),d=parseFloat(F.getStyle(a,"padding-bottom")),f=o.right-o.left-l-u,h=o.bottom-o.top-c-d;return{x:n=Math.round((n-o.left-l)/f*a.width/e.currentDevicePixelRatio),y:r=Math.round((r-o.top-c)/h*a.height/e.currentDevicePixelRatio)}},F.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},F.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},F._calculatePadding=function(t,e,n){return(e=F.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},F._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},F.getMaximumWidth=function(t){var e=F._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,r=n-F._calculatePadding(e,"padding-left",n)-F._calculatePadding(e,"padding-right",n),i=F.getConstraintWidth(t);return isNaN(i)?r:Math.min(r,i)},F.getMaximumHeight=function(t){var e=F._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,r=n-F._calculatePadding(e,"padding-top",n)-F._calculatePadding(e,"padding-bottom",n),i=F.getConstraintHeight(t);return isNaN(i)?r:Math.min(r,i)},F.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},F.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=t.canvas,i=t.height,a=t.width;r.height=i*n,r.width=a*n,t.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=a+"px")}},F.fontString=function(t,e,n){return e+" "+t+"px "+n},F.longestText=function(t,e,n,r){var i=(r=r||{}).data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},a=r.garbageCollect=[],r.font=e),t.font=e;var o,s,l,c,u,d=0,f=n.length;for(o=0;on.length){for(o=0;or&&(r=a),r},F.numberOfLabelLines=function(t){var e=1;return F.each(t,(function(t){F.isArray(t)&&t.length>e&&(e=t.length)})),e},F.color=_?function(t){return t instanceof CanvasGradient&&(t=P.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},F.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:F.color(t).saturate(.5).darken(.1).rgbString()}}(),Ke._adapters=Je,Ke.Animation=K,Ke.animationService=Z,Ke.controllers=Zt,Ke.DatasetController=nt,Ke.defaults=P,Ke.Element=G,Ke.elements=wt,Ke.Interaction=ie,Ke.layouts=pe,Ke.platform=Ce,Ke.plugins=De,Ke.Scale=mn,Ke.scaleService=ze,Ke.Ticks=tn,Ke.Tooltip=Fe,Ke.helpers.each(lr,(function(t,e){Ke.scaleService.registerScaleType(e,t,t._defaults)})),Dr)Dr.hasOwnProperty(Or)&&Ke.plugins.register(Dr[Or]);Ke.platform.initialize();var Ir=Ke;return"undefined"!=typeof window&&(window.Chart=Ke),Ke.Chart=Ke,Ke.Legend=Dr.legend._element,Ke.Title=Dr.title._element,Ke.pluginService=Ke.plugins,Ke.PluginBase=Ke.Element.extend({}),Ke.canvasHelpers=Ke.helpers.canvas,Ke.layoutService=Ke.layouts,Ke.LinearScaleBase=wn,Ke.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Ke[t]=function(e,n){return new Ke(e,Ke.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ir}(function(){try{return n(28)}catch(t){}}())},function(t,e,n){var r;t.exports=(r=n(179),function(t){var e=r,n=e.lib,i=n.WordArray,a=n.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=t[e+0],l=t[e+1],h=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],b=t[e+6],v=t[e+7],y=t[e+8],M=t[e+9],w=t[e+10],_=t[e+11],A=t[e+12],x=t[e+13],S=t[e+14],T=t[e+15],k=a[0],C=a[1],D=a[2],z=a[3];k=c(k,C,D,z,o,7,s[0]),z=c(z,k,C,D,l,12,s[1]),D=c(D,z,k,C,h,17,s[2]),C=c(C,D,z,k,p,22,s[3]),k=c(k,C,D,z,m,7,s[4]),z=c(z,k,C,D,g,12,s[5]),D=c(D,z,k,C,b,17,s[6]),C=c(C,D,z,k,v,22,s[7]),k=c(k,C,D,z,y,7,s[8]),z=c(z,k,C,D,M,12,s[9]),D=c(D,z,k,C,w,17,s[10]),C=c(C,D,z,k,_,22,s[11]),k=c(k,C,D,z,A,7,s[12]),z=c(z,k,C,D,x,12,s[13]),D=c(D,z,k,C,S,17,s[14]),k=u(k,C=c(C,D,z,k,T,22,s[15]),D,z,l,5,s[16]),z=u(z,k,C,D,b,9,s[17]),D=u(D,z,k,C,_,14,s[18]),C=u(C,D,z,k,o,20,s[19]),k=u(k,C,D,z,g,5,s[20]),z=u(z,k,C,D,w,9,s[21]),D=u(D,z,k,C,T,14,s[22]),C=u(C,D,z,k,m,20,s[23]),k=u(k,C,D,z,M,5,s[24]),z=u(z,k,C,D,S,9,s[25]),D=u(D,z,k,C,p,14,s[26]),C=u(C,D,z,k,y,20,s[27]),k=u(k,C,D,z,x,5,s[28]),z=u(z,k,C,D,h,9,s[29]),D=u(D,z,k,C,v,14,s[30]),k=d(k,C=u(C,D,z,k,A,20,s[31]),D,z,g,4,s[32]),z=d(z,k,C,D,y,11,s[33]),D=d(D,z,k,C,_,16,s[34]),C=d(C,D,z,k,S,23,s[35]),k=d(k,C,D,z,l,4,s[36]),z=d(z,k,C,D,m,11,s[37]),D=d(D,z,k,C,v,16,s[38]),C=d(C,D,z,k,w,23,s[39]),k=d(k,C,D,z,x,4,s[40]),z=d(z,k,C,D,o,11,s[41]),D=d(D,z,k,C,p,16,s[42]),C=d(C,D,z,k,b,23,s[43]),k=d(k,C,D,z,M,4,s[44]),z=d(z,k,C,D,A,11,s[45]),D=d(D,z,k,C,T,16,s[46]),k=f(k,C=d(C,D,z,k,h,23,s[47]),D,z,o,6,s[48]),z=f(z,k,C,D,v,10,s[49]),D=f(D,z,k,C,S,15,s[50]),C=f(C,D,z,k,g,21,s[51]),k=f(k,C,D,z,A,6,s[52]),z=f(z,k,C,D,p,10,s[53]),D=f(D,z,k,C,w,15,s[54]),C=f(C,D,z,k,l,21,s[55]),k=f(k,C,D,z,y,6,s[56]),z=f(z,k,C,D,T,10,s[57]),D=f(D,z,k,C,b,15,s[58]),C=f(C,D,z,k,x,21,s[59]),k=f(k,C,D,z,m,6,s[60]),z=f(z,k,C,D,_,10,s[61]),D=f(D,z,k,C,h,15,s[62]),C=f(C,D,z,k,M,21,s[63]),a[0]=a[0]+k|0,a[1]=a[1]+C|0,a[2]=a[2]+D|0,a[3]=a[3]+z|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,a,o){var s=t+(e&n|~e&r)+i+o;return(s<>>32-a)+e}function u(t,e,n,r,i,a,o){var s=t+(e&r|n&~r)+i+o;return(s<>>32-a)+e}function d(t,e,n,r,i,a,o){var s=t+(e^n^r)+i+o;return(s<>>32-a)+e}function f(t,e,n,r,i,a,o){var s=t+(n^(e|~r))+i+o;return(s<>>32-a)+e}e.MD5=a._createHelper(l),e.HmacMD5=a._createHmacHelper(l)}(Math),r.MD5)},function(t,e,n){"use strict";(function(t){n(133);t('[data-toggle="popover"]').popover(),t('[data-toggle="tooltip"]').tooltip()}).call(this,n(7))},function(t,e,n){(function(e){t.exports=e.$=n(132)}).call(this,n(2))},function(t,e,n){var r;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var a=[],o=Object.getPrototypeOf,s=a.slice,l=a.flat?function(t){return a.flat.call(t)}:function(t){return a.concat.apply([],t)},c=a.push,u=a.indexOf,d={},f=d.toString,h=d.hasOwnProperty,p=h.toString,m=p.call(Object),g={},b=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},v=function(t){return null!=t&&t===t.window},y=n.document,M={type:!0,src:!0,nonce:!0,noModule:!0};function w(t,e,n){var r,i,a=(n=n||y).createElement("script");if(a.text=t,e)for(r in M)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function _(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[f.call(t)]||"object":typeof t}var A=function(t,e){return new A.fn.init(t,e)};function x(t){var e=!!t&&"length"in t&&t.length,n=_(t);return!b(t)&&!v(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:"3.5.1",constructor:A,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),H=new RegExp(R+"|>"),U=new RegExp(q),V=new RegExp("^"+B+"$"),G={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},rt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},at=function(){f()},ot=Mt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(z=I.call(w.childNodes),w.childNodes),z[w.childNodes.length].nodeType}catch(t){O={apply:z.length?function(t,e){L.apply(t,I.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}function st(t,e,r,i){var a,s,c,u,d,p,b,v=e&&e.ownerDocument,w=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!i&&(f(e),e=e||h,m)){if(11!==w&&(d=J.exec(t)))if(a=d[1]){if(9===w){if(!(c=e.getElementById(a)))return r;if(c.id===a)return r.push(c),r}else if(v&&(c=v.getElementById(a))&&y(e,c)&&c.id===a)return r.push(c),r}else{if(d[2])return O.apply(r,e.getElementsByTagName(t)),r;if((a=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return O.apply(r,e.getElementsByClassName(a)),r}if(n.qsa&&!k[t+" "]&&(!g||!g.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(b=t,v=e,1===w&&(H.test(t)||X.test(t))){for((v=tt.test(t)&&bt(e.parentNode)||e)===e&&n.scope||((u=e.getAttribute("id"))?u=u.replace(rt,it):e.setAttribute("id",u=M)),s=(p=o(t)).length;s--;)p[s]=(u?"#"+u:":scope")+" "+yt(p[s]);b=p.join(",")}try{return O.apply(r,v.querySelectorAll(b)),r}catch(e){k(t,!0)}finally{u===M&&e.removeAttribute("id")}}}return l(t.replace($,"$1"),e,r,i)}function lt(){var t=[];return function e(n,i){return t.push(n+" ")>r.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function ct(t){return t[M]=!0,t}function ut(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var n=t.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=e}function ft(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return ct((function(e){return e=+e,ct((function(n,r){for(var i,a=t([],n.length,e),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function bt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=st.support={},a=st.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!Y.test(e||n&&n.nodeName||"HTML")},f=st.setDocument=function(t){var e,i,o=t?t.ownerDocument||t:w;return o!=h&&9===o.nodeType&&o.documentElement?(p=(h=o).documentElement,m=!a(h),w!=h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",at,!1):i.attachEvent&&i.attachEvent("onunload",at)),n.scope=ut((function(t){return p.appendChild(t).appendChild(h.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ut((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ut((function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(h.getElementsByClassName),n.getById=ut((function(t){return p.appendChild(t).id=M,!h.getElementsByName||!h.getElementsByName(M).length})),n.getById?(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(r.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},r.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,r,i,a=e.getElementById(t);if(a){if((n=a.getAttributeNode("id"))&&n.value===t)return[a];for(i=e.getElementsByName(t),r=0;a=i[r++];)if((n=a.getAttributeNode("id"))&&n.value===t)return[a]}return[]}}),r.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,a=e.getElementsByTagName(t);if("*"===t){for(;n=a[i++];)1===n.nodeType&&r.push(n);return r}return a},r.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},b=[],g=[],(n.qsa=Q.test(h.querySelectorAll))&&(ut((function(t){var e;p.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+R+"*(?:value|"+P+")"),t.querySelectorAll("[id~="+M+"-]").length||g.push("~="),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+M+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ut((function(t){t.innerHTML="";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Q.test(v=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ut((function(t){n.disconnectedMatch=v.call(t,"*"),v.call(t,"[s!='']:x"),b.push("!=",q)})),g=g.length&&new RegExp(g.join("|")),b=b.length&&new RegExp(b.join("|")),e=Q.test(p.compareDocumentPosition),y=e||Q.test(p.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},C=e?function(t,e){if(t===e)return d=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===r?t==h||t.ownerDocument==w&&y(w,t)?-1:e==h||e.ownerDocument==w&&y(w,e)?1:u?N(u,t)-N(u,e):0:4&r?-1:1)}:function(t,e){if(t===e)return d=!0,0;var n,r=0,i=t.parentNode,a=e.parentNode,o=[t],s=[e];if(!i||!a)return t==h?-1:e==h?1:i?-1:a?1:u?N(u,t)-N(u,e):0;if(i===a)return ft(t,e);for(n=t;n=n.parentNode;)o.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?ft(o[r],s[r]):o[r]==w?-1:s[r]==w?1:0},h):h},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if(f(t),n.matchesSelector&&m&&!k[e+" "]&&(!b||!b.test(e))&&(!g||!g.test(e)))try{var r=v.call(t,e);if(r||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){k(e,!0)}return st(e,h,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!=h&&f(t),y(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!=h&&f(t);var i=r.attrHandle[e.toLowerCase()],a=i&&D.call(r.attrHandle,e.toLowerCase())?i(t,e,!m):void 0;return void 0!==a?a:n.attributes||!m?t.getAttribute(e):(a=t.getAttributeNode(e))&&a.specified?a.value:null},st.escape=function(t){return(t+"").replace(rt,it)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,r=[],i=0,a=0;if(d=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(C),d){for(;e=t[a++];)e===t[a]&&(i=r.push(a));for(;i--;)t.splice(r[i],1)}return u=null,t},i=st.getText=function(t){var e,n="",r=0,a=t.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=i(t)}else if(3===a||4===a)return t.nodeValue}else for(;e=t[r++];)n+=i(e);return n},(r=st.selectors={cacheLength:50,createPseudo:ct,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||st.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&st.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&U.test(n)&&(e=o(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&x(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=st.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var a="nth"!==t.slice(0,3),o="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,l){var c,u,d,f,h,p,m=a!==o?"nextSibling":"previousSibling",g=e.parentNode,b=s&&e.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(a){for(;m;){for(f=e;f=f[m];)if(s?f.nodeName.toLowerCase()===b:1===f.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&v){for(y=(h=(c=(u=(d=(f=g)[M]||(f[M]={}))[f.uniqueID]||(d[f.uniqueID]={}))[t]||[])[0]===_&&c[1])&&c[2],f=h&&g.childNodes[h];f=++h&&f&&f[m]||(y=h=0)||p.pop();)if(1===f.nodeType&&++y&&f===e){u[t]=[_,h,y];break}}else if(v&&(y=h=(c=(u=(d=(f=e)[M]||(f[M]={}))[f.uniqueID]||(d[f.uniqueID]={}))[t]||[])[0]===_&&c[1]),!1===y)for(;(f=++h&&f&&f[m]||(y=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==b:1!==f.nodeType)||!++y||(v&&((u=(d=f[M]||(f[M]={}))[f.uniqueID]||(d[f.uniqueID]={}))[t]=[_,y]),f!==e)););return(y-=i)===r||y%r==0&&y/r>=0}}},PSEUDO:function(t,e){var n,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return i[M]?i(e):i.length>1?(n=[t,t,"",e],r.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){for(var r,a=i(t,e),o=a.length;o--;)t[r=N(t,a[o])]=!(n[r]=a[o])})):function(t){return i(t,0,n)}):i}},pseudos:{not:ct((function(t){var e=[],n=[],r=s(t.replace($,"$1"));return r[M]?ct((function(t,e,n,i){for(var a,o=r(t,null,i,[]),s=t.length;s--;)(a=o[s])&&(t[s]=!(e[s]=a))})):function(t,i,a){return e[0]=t,r(e,null,a,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return st(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||i(e)).indexOf(t)>-1}})),lang:ct((function(t){return V.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===p},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return Z.test(t.nodeName)},input:function(t){return K.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;ne?e:n;--r>=0;)t.push(r);return t})),gt:gt((function(t,e,n){for(var r=n<0?n+e:n;++r1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function _t(t,e,n,r,i){for(var a,o=[],s=0,l=t.length,c=null!=e;s-1&&(a[c]=!(o[c]=d))}}else b=_t(b===o?b.splice(p,b.length):b),i?i(null,o,b,l):O.apply(o,b)}))}function xt(t){for(var e,n,i,a=t.length,o=r.relative[t[0].type],s=o||r.relative[" "],l=o?1:0,u=Mt((function(t){return t===e}),s,!0),d=Mt((function(t){return N(e,t)>-1}),s,!0),f=[function(t,n,r){var i=!o&&(r||n!==c)||((e=n).nodeType?u(t,n,r):d(t,n,r));return e=null,i}];l1&&wt(f),l>1&&yt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace($,"$1"),n,l0,i=t.length>0,a=function(a,o,s,l,u){var d,p,g,b=0,v="0",y=a&&[],M=[],w=c,A=a||i&&r.find.TAG("*",u),x=_+=null==w?1:Math.random()||.1,S=A.length;for(u&&(c=o==h||o||u);v!==S&&null!=(d=A[v]);v++){if(i&&d){for(p=0,o||d.ownerDocument==h||(f(d),s=!m);g=t[p++];)if(g(d,o||h,s)){l.push(d);break}u&&(_=x)}n&&((d=!g&&d)&&b--,a&&y.push(d))}if(b+=v,n&&v!==b){for(p=0;g=e[p++];)g(y,M,o,s);if(a){if(b>0)for(;v--;)y[v]||M[v]||(M[v]=E.call(l));M=_t(M)}O.apply(l,M),u&&!a&&M.length>0&&b+e.length>1&&st.uniqueSort(l)}return u&&(_=x,c=w),y};return n?ct(a):a}(a,i))).selector=t}return s},l=st.select=function(t,e,n,i){var a,l,c,u,d,f="function"==typeof t&&t,h=!i&&o(t=f.selector||t);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&m&&r.relative[l[1].type]){if(!(e=(r.find.ID(c.matches[0].replace(et,nt),e)||[])[0]))return n;f&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(a=G.needsContext.test(t)?0:l.length;a--&&(c=l[a],!r.relative[u=c.type]);)if((d=r.find[u])&&(i=d(c.matches[0].replace(et,nt),tt.test(l[0].type)&&bt(e.parentNode)||e))){if(l.splice(a,1),!(t=i.length&&yt(l)))return O.apply(n,i),n;break}}return(f||s(t,h))(i,e,!m,n,!e||tt.test(t)&&bt(e.parentNode)||e),n},n.sortStable=M.split("").sort(C).join("")===M,n.detectDuplicates=!!d,f(),n.sortDetached=ut((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),ut((function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")}))||dt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ut((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||dt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ut((function(t){return null==t.getAttribute("disabled")}))||dt(P,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),st}(n);A.find=S,A.expr=S.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=S.uniqueSort,A.text=S.getText,A.isXMLDoc=S.isXML,A.contains=S.contains,A.escapeSelector=S.escape;var T=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},k=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},C=A.expr.match.needsContext;function D(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var z=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(t,e,n){return b(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return u.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(E(this,t||[],!1))},not:function(t){return this.pushStack(E(this,t||[],!0))},is:function(t){return!!E(this,"string"==typeof t&&C.test(t)?A(t):t||[],!1).length}});var L,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||L,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:O.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:y,!0)),z.test(r[1])&&A.isPlainObject(e))for(r in e)b(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=y.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):b(t)?void 0!==n.ready?n.ready(t):t(A):A.makeArray(t,this)}).prototype=A.fn,L=A(y);var I=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function P(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t-1:1===n.nodeType&&A.find.matchesSelector(n,t))){a.push(n);break}return this.pushStack(a.length>1?A.uniqueSort(a):a)},index:function(t){return t?"string"==typeof t?u.call(A(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,n){return T(t,"parentNode",n)},next:function(t){return P(t,"nextSibling")},prev:function(t){return P(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,n){return T(t,"nextSibling",n)},prevUntil:function(t,e,n){return T(t,"previousSibling",n)},siblings:function(t){return k((t.parentNode||{}).firstChild,t)},children:function(t){return k(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(D(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(N[t]||A.uniqueSort(i),I.test(t)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function B(t){return t}function j(t){throw t}function q(t,e,n,r){var i;try{t&&b(i=t.promise)?i.call(t).done(e).fail(n):t&&b(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match(R)||[],(function(t,n){e[n]=!0})),e}(t):A.extend({},t);var e,n,r,i,a=[],o=[],s=-1,l=function(){for(i=i||t.once,r=e=!0;o.length;s=-1)for(n=o.shift();++s-1;)a.splice(n,1),n<=s&&s--})),this},has:function(t){return t?A.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=o=[],n||e||(a=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],o.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return A.Deferred((function(n){A.each(e,(function(e,r){var i=b(t[r[4]])&&t[r[4]];a[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&b(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,i){var a=0;function o(t,e,r,i){return function(){var s=this,l=arguments,c=function(){var n,c;if(!(t=a&&(r!==j&&(s=void 0,l=[n]),e.rejectWith(s,l))}};t?u():(A.Deferred.getStackHook&&(u.stackTrace=A.Deferred.getStackHook()),n.setTimeout(u))}}return A.Deferred((function(n){e[0][3].add(o(0,n,b(i)?i:B,n.notifyWith)),e[1][3].add(o(0,n,b(t)?t:B)),e[2][3].add(o(0,n,b(r)?r:j))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},a={};return A.each(e,(function(t,n){var o=n[2],s=n[5];i[n[1]]=o.add,s&&o.add((function(){r=s}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),o.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=o.fireWith})),i.promise(a),t&&t.call(a,a),a},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),a=A.Deferred(),o=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||a.resolveWith(r,i)}};if(e<=1&&(q(t,a.done(o(n)).resolve,a.reject,!e),"pending"===a.state()||b(i[n]&&i[n].then)))return a.then();for(;n--;)q(i[n],o(n),a.reject);return a.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&F.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){n.setTimeout((function(){throw t}))};var $=A.Deferred();function W(){y.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),A.ready()}A.fn.ready=function(t){return $.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||$.resolveWith(y,[A]))}}),A.ready.then=$.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?n.setTimeout(A.ready):(y.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var X=function(t,e,n,r,i,a,o){var s=0,l=t.length,c=null==n;if("object"===_(n))for(s in i=!0,n)X(t,e,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,b(r)||(o=!0),c&&(o?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(A(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each((function(){Q.remove(this,t)}))}}),A.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Z.get(t,e),n&&(!r||Array.isArray(n)?r=Z.access(t,e,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=A.queue(t,e),r=n.length,i=n.shift(),a=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete a.stop,i.call(t,(function(){A.dequeue(t,e)}),a)),!r&&a&&a.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Z.get(t,n)||Z.access(t,n,{empty:A.Callbacks("once memory").add((function(){Z.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,bt=/^$|^module$|\/(?:java|ecma)script/i;ht=y.createDocumentFragment().appendChild(y.createElement("div")),(pt=y.createElement("input")).setAttribute("type","radio"),pt.setAttribute("checked","checked"),pt.setAttribute("name","t"),ht.appendChild(pt),g.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="",g.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="",g.option=!!ht.lastChild;var vt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&D(t,e)?A.merge([t],n):n}function Mt(t,e){for(var n=0,r=t.length;n",""]);var wt=/<|&#?\w+;/;function _t(t,e,n,r,i){for(var a,o,s,l,c,u,d=e.createDocumentFragment(),f=[],h=0,p=t.length;h-1)i&&i.push(a);else if(c=ot(a),o=yt(d.appendChild(a),"script"),c&&Mt(o),n)for(u=0;a=o[u++];)bt.test(a.type||"")&&n.push(a);return d}var At=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,St=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function kt(){return!1}function Ct(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function Dt(t,e,n,r,i,a){var o,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)Dt(t,s,n,r,e[s],a);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=kt;else if(!i)return t;return 1===a&&(o=i,(i=function(t){return A().off(t),o.apply(this,arguments)}).guid=o.guid||(o.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function zt(t,e,n){n?(Z.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var r,i,a=Z.get(this,e);if(1&t.isTrigger&&this[e]){if(a.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(a=s.call(arguments),Z.set(this,e,a),r=n(this,e),this[e](),a!==(i=Z.get(this,e))||r?Z.set(this,e,!1):i={},a!==i)return t.stopImmediatePropagation(),t.preventDefault(),i.value}else a.length&&(Z.set(this,e,{value:A.event.trigger(A.extend(a[0],A.Event.prototype),a.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Z.get(t,e)&&A.event.add(t,e,Tt)}A.event={global:{},add:function(t,e,n,r,i){var a,o,s,l,c,u,d,f,h,p,m,g=Z.get(t);if(Y(t))for(n.handler&&(n=(a=n).handler,i=a.selector),i&&A.find.matchesSelector(at,i),n.guid||(n.guid=A.guid++),(l=g.events)||(l=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(e){return void 0!==A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(R)||[""]).length;c--;)h=m=(s=St.exec(e[c])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=A.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=A.event.special[h]||{},u=A.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.expr.match.needsContext.test(i),namespace:p.join(".")},a),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(h,o)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,u):f.push(u),A.event.global[h]=!0)},remove:function(t,e,n,r,i){var a,o,s,l,c,u,d,f,h,p,m,g=Z.hasData(t)&&Z.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(R)||[""]).length;c--;)if(h=m=(s=St.exec(e[c])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=A.event.special[h]||{},f=l[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=f.length;a--;)u=f[a],!i&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(f.splice(a,1),u.selector&&f.delegateCount--,d.remove&&d.remove.call(t,u));o&&!f.length&&(d.teardown&&!1!==d.teardown.call(t,p,g.handle)||A.removeEvent(t,h,g.handle),delete l[h])}else for(h in l)A.event.remove(t,h+e[c],n,r,!0);A.isEmptyObject(l)&&Z.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,a,o,s=new Array(arguments.length),l=A.event.fix(t),c=(Z.get(this,"events")||Object.create(null))[l.type]||[],u=A.event.special[l.type]||{};for(s[0]=l,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(a=[],o={},n=0;n-1:A.find(i,this,null,[c]).length),o[i]&&a.push(r);a.length&&s.push({elem:c,handlers:a})}return c=this,l\s*$/g;function It(t,e){return D(t,"table")&&D(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function Nt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Rt(t,e){var n,r,i,a,o,s;if(1===e.nodeType){if(Z.hasData(t)&&(s=Z.get(t).events))for(i in Z.remove(e,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof p&&!g.checkClone&&Lt.test(p))return t.each((function(i){var a=t.eq(i);m&&(e[0]=p.call(this,i,a.html())),jt(a,e,n,r)}));if(f&&(a=(i=_t(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(s=(o=A.map(yt(i,"script"),Nt)).length;d0&&Mt(o,!l&&yt(t,"script")),s},cleanData:function(t){for(var e,n,r,i=A.event.special,a=0;void 0!==(n=t[a]);a++)if(Y(n)){if(e=n[Z.expando]){if(e.events)for(r in e.events)i[r]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Z.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),A.fn.extend({detach:function(t){return qt(this,t,!0)},remove:function(t){return qt(this,t)},text:function(t){return X(this,(function(t){return void 0===t?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return jt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||It(this,t).appendChild(t)}))},prepend:function(){return jt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=It(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return jt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return jt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(A.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return X(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Et.test(t)&&!vt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n3,at.removeChild(t)),s}}))}();var Vt=["Webkit","Moz","ms"],Gt=y.createElement("div").style,Yt={};function Kt(t){var e=A.cssProps[t]||Yt[t];return e||(t in Gt?t:Yt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Vt.length;n--;)if((t=Vt[n]+e)in Gt)return t}(t)||t)}var Zt=/^(none|table(?!-c[ea]).+)/,Qt=/^--/,Jt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=rt.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(t,e,n,r,i,a){var o="width"===e?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(l+=A.css(t,n+it[o],!0,i)),r?("content"===n&&(l-=A.css(t,"padding"+it[o],!0,i)),"margin"!==n&&(l-=A.css(t,"border"+it[o]+"Width",!0,i))):(l+=A.css(t,"padding"+it[o],!0,i),"padding"!==n?l+=A.css(t,"border"+it[o]+"Width",!0,i):s+=A.css(t,"border"+it[o]+"Width",!0,i));return!r&&a>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-a-l-s-.5))||0),l}function re(t,e,n){var r=$t(t),i=(!g.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),a=i,o=Ht(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Ft.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&D(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(a=s in t)&&(o=t[s])),(o=parseFloat(o)||0)+ne(t,e,n||(i?"border":"content"),a,r,o)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ht(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,a,o,s=G(e),l=Qt.test(e),c=t.style;if(l||(e=Kt(s)),o=A.cssHooks[e]||A.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(t,!1,r))?i:c[e];"string"===(a=typeof n)&&(i=rt.exec(n))&&i[1]&&(n=ct(t,e,i),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=i&&i[3]||(A.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,r))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,a,o,s=G(e);return Qt.test(e)||(e=Kt(s)),(o=A.cssHooks[e]||A.cssHooks[s])&&"get"in o&&(i=o.get(t,!0,n)),void 0===i&&(i=Ht(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Zt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):Wt(t,Jt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,a=$t(t),o=!g.scrollboxSize()&&"absolute"===a.position,s=(o||r)&&"border-box"===A.css(t,"boxSizing",!1,a),l=r?ne(t,e,r,s,a):0;return s&&o&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-ne(t,e,"border",!1,a)-.5)),l&&(i=rt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ee(0,n,l)}}})),A.cssHooks.marginLeft=Ut(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Ht(t,"marginLeft"))||t.getBoundingClientRect().left-Wt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var r=0,i={},a="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+it[r]+e]=a[r]||a[r-2]||a[0];return i}},"margin"!==t&&(A.cssHooks[t+e].set=ee)})),A.fn.extend({css:function(t,e){return X(this,(function(t,e,n){var r,i,a={},o=0;if(Array.isArray(e)){for(r=$t(t),i=e.length;o1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,a){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=a||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Kt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=ie.prototype.init,A.fx.step={};var ae,oe,se=/^(?:toggle|show|hide)$/,le=/queueHooks$/;function ce(){oe&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ce):n.setTimeout(ce,A.fx.interval),A.fx.tick())}function ue(){return n.setTimeout((function(){ae=void 0})),ae=Date.now()}function de(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=it[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function fe(t,e,n){for(var r,i=(he.tweeners[e]||[]).concat(he.tweeners["*"]),a=0,o=i.length;a1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===t.getAttribute?A.prop(t,e,n):(1===a&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&D(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(R);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||A.find.attr;me[e]=function(t,e,r){var i,a,o=e.toLowerCase();return r||(a=me[o],me[o]=i,i=null!=n(t,e,r)?o:null,me[o]=a),i}}));var ge=/^(?:input|select|textarea|button)$/i,be=/^(?:a|area)$/i;function ve(t){return(t.match(R)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function Me(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(R)||[]}A.fn.extend({prop:function(t,e){return X(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):ge.test(t.nodeName)||be.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(A.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,a,o,s,l=0;if(b(t))return this.each((function(e){A(this).addClass(t.call(this,e,ye(this)))}));if((e=Me(t)).length)for(;n=this[l++];)if(i=ye(n),r=1===n.nodeType&&" "+ve(i)+" "){for(o=0;a=e[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=ve(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,a,o,s,l=0;if(b(t))return this.each((function(e){A(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=Me(t)).length)for(;n=this[l++];)if(i=ye(n),r=1===n.nodeType&&" "+ve(i)+" "){for(o=0;a=e[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");i!==(s=ve(r))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,r="string"===n||Array.isArray(t);return"boolean"==typeof e&&r?e?this.addClass(t):this.removeClass(t):b(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,i,a,o;if(r)for(i=0,a=A(this),o=Me(t);e=o[i++];)a.hasClass(e)?a.removeClass(e):a.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&Z.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Z.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ve(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var we=/\r/g;A.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=b(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(we,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ve(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,a=t.selectedIndex,o="select-one"===t.type,s=o?null:[],l=o?a+1:i.length;for(r=a<0?l:o?a:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),a}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},g.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in n;var _e=/^(?:focusinfocus|focusoutblur)$/,Ae=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,r,i){var a,o,s,l,c,u,d,f,p=[r||y],m=h.call(t,"type")?t.type:t,g=h.call(t,"namespace")?t.namespace.split("."):[];if(o=f=s=r=r||y,3!==r.nodeType&&8!==r.nodeType&&!_e.test(m+A.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:A.makeArray(e,[t]),d=A.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(r,e))){if(!i&&!d.noBubble&&!v(r)){for(l=d.delegateType||m,_e.test(l+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(r.ownerDocument||y)&&p.push(s.defaultView||s.parentWindow||n)}for(a=0;(o=p[a++])&&!t.isPropagationStopped();)f=o,t.type=a>1?l:d.bindType||m,(u=(Z.get(o,"events")||Object.create(null))[t.type]&&Z.get(o,"handle"))&&u.apply(o,e),(u=c&&o[c])&&u.apply&&Y(o)&&(t.result=u.apply(o,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!Y(r)||c&&b(r[m])&&!v(r)&&((s=r[c])&&(r[c]=null),A.event.triggered=m,t.isPropagationStopped()&&f.addEventListener(m,Ae),r[m](),t.isPropagationStopped()&&f.removeEventListener(m,Ae),A.event.triggered=void 0,s&&(r[c]=s)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),g.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=Z.access(r,e);i||r.addEventListener(t,n,!0),Z.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Z.access(r,e)-1;i?Z.access(r,e,i):(r.removeEventListener(t,n,!0),Z.remove(r,e))}}}));var xe=n.location,Se={guid:Date.now()},Te=/\?/;A.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||A.error("Invalid XML: "+t),e};var ke=/\[\]$/,Ce=/\r?\n/g,De=/^(?:submit|button|image|reset|file)$/i,ze=/^(?:input|select|textarea|keygen)/i;function Ee(t,e,n,r){var i;if(Array.isArray(e))A.each(e,(function(e,i){n||ke.test(t)?r(t,i):Ee(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==_(e))r(t,e);else for(i in e)Ee(t+"["+i+"]",e[i],n,r)}A.param=function(t,e){var n,r=[],i=function(t,e){var n=b(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)Ee(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&ze.test(this.nodeName)&&!De.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}})):{name:e.name,value:n.replace(Ce,"\r\n")}})).get()}});var Le=/%20/g,Oe=/#.*$/,Ie=/([?&])_=[^&]*/,Ne=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,Re=/^\/\//,Be={},je={},qe="*/".concat("*"),Fe=y.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,a=e.toLowerCase().match(R)||[];if(b(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function We(t,e,n,r){var i={},a=t===je;function o(s){var l;return i[s]=!0,A.each(t[s]||[],(function(t,s){var c=s(e,n,r);return"string"!=typeof c||a||i[c]?a?!(l=c):void 0:(e.dataTypes.unshift(c),o(c),!1)})),l}return o(e.dataTypes[0])||!i["*"]&&o("*")}function Xe(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}Fe.href=xe.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Xe(Xe(t,A.ajaxSettings),e):Xe(A.ajaxSettings,t)},ajaxPrefilter:$e(Be),ajaxTransport:$e(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,a,o,s,l,c,u,d,f,h=A.ajaxSetup({},e),p=h.context||h,m=h.context&&(p.nodeType||p.jquery)?A(p):A.event,g=A.Deferred(),b=A.Callbacks("once memory"),v=h.statusCode||{},M={},w={},_="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(c){if(!o)for(o={};e=Ne.exec(a);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,M[t]=e),this},overrideMimeType:function(t){return null==c&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)x.always(t[x.status]);else for(e in t)v[e]=[v[e],t[e]];return this},abort:function(t){var e=t||_;return r&&r.abort(e),S(0,e),this}};if(g.promise(x),h.url=((t||h.url||xe.href)+"").replace(Re,xe.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(R)||[""],null==h.crossDomain){l=y.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Fe.protocol+"//"+Fe.host!=l.protocol+"//"+l.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=A.param(h.data,h.traditional)),We(Be,h,e,x),c)return x;for(d in(u=A.event&&h.global)&&0==A.active++&&A.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Pe.test(h.type),i=h.url.replace(Oe,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Le,"+")):(f=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Te.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Ie,"$1"),f=(Te.test(i)?"&":"?")+"_="+Se.guid+++f),h.url=i+f),h.ifModified&&(A.lastModified[i]&&x.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&x.setRequestHeader("If-None-Match",A.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+qe+"; q=0.01":""):h.accepts["*"]),h.headers)x.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(p,x,h)||c))return x.abort();if(_="abort",b.add(h.complete),x.done(h.success),x.fail(h.error),r=We(je,h,e,x)){if(x.readyState=1,u&&m.trigger("ajaxSend",[x,h]),c)return x;h.async&&h.timeout>0&&(s=n.setTimeout((function(){x.abort("timeout")}),h.timeout));try{c=!1,r.send(M,S)}catch(t){if(c)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,e,o,l){var d,f,y,M,w,_=e;c||(c=!0,s&&n.clearTimeout(s),r=void 0,a=l||"",x.readyState=t>0?4:0,d=t>=200&&t<300||304===t,o&&(M=function(t,e,n){for(var r,i,a,o,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)a=l[0];else{for(i in n){if(!l[0]||t.converters[i+" "+l[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}(h,x,o)),!d&&A.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),M=function(t,e,n,r){var i,a,o,s,l,c={},u=t.dataTypes.slice();if(u[1])for(o in t.converters)c[o.toLowerCase()]=t.converters[o];for(a=u.shift();a;)if(t.responseFields[a]&&(n[t.responseFields[a]]=e),!l&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=a,a=u.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(o=c[l+" "+a]||c["* "+a]))for(i in c)if((s=i.split(" "))[1]===a&&(o=c[l+" "+s[0]]||c["* "+s[0]])){!0===o?o=c[i]:!0!==c[i]&&(a=s[0],u.unshift(s[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+l+" to "+a}}}return{state:"success",data:e}}(h,M,x,d),d?(h.ifModified&&((w=x.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=w),(w=x.getResponseHeader("etag"))&&(A.etag[i]=w)),204===t||"HEAD"===h.type?_="nocontent":304===t?_="notmodified":(_=M.state,f=M.data,d=!(y=M.error))):(y=_,!t&&_||(_="error",t<0&&(t=0))),x.status=t,x.statusText=(e||_)+"",d?g.resolveWith(p,[f,_,x]):g.rejectWith(p,[x,_,y]),x.statusCode(v),v=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[x,h,d?f:y]),b.fireWith(p,[x,_]),u&&(m.trigger("ajaxComplete",[x,h]),--A.active||A.event.trigger("ajaxStop")))}return x},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return b(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(b(t)&&(t=t.call(this[0])),e=A(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return b(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=b(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var He={0:200,1223:204},Ue=A.ajaxSettings.xhr();g.cors=!!Ue&&"withCredentials"in Ue,g.ajax=Ue=!!Ue,A.ajaxTransport((function(t){var e,r;if(g.cors||Ue&&!t.crossDomain)return{send:function(i,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(He[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){e&&r()}))},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("