3 lines
508 KiB
JavaScript
3 lines
508 KiB
JavaScript
/*! For license information please see main.js.LICENSE.txt */
|
||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=38)}([function(e,t){e.exports={options:{usePureJavaScript:!1}}},function(e,t,r){(function(t,n,i,a,o){var s=r(0),u=r(49),l=e.exports=s.util=s.util||{};function c(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function f(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(l.isArrayBuffer(e)||l.isArrayBufferView(e))if(void 0!==a&&e instanceof a)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof f||"object"==typeof e&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}!function(){if(void 0!==t&&t.nextTick&&!t.browser)return l.nextTick=t.nextTick,void(l.setImmediate="function"==typeof n?n:l.nextTick);if("function"==typeof n)return l.setImmediate=function(){return n.apply(void 0,arguments)},void(l.nextTick=function(e){return n(e)});if(l.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",r=[];l.setImmediate=function(t){r.push(t),1===r.length&&window.postMessage(e,"*")},window.addEventListener("message",(function(t){if(t.source===window&&t.data===e){t.stopPropagation();var n=r.slice();r.length=0,n.forEach((function(e){e()}))}}),!0)}if("undefined"!=typeof MutationObserver){var i=Date.now(),a=!0,o=document.createElement("div");r=[];new MutationObserver((function(){var e=r.slice();r.length=0,e.forEach((function(e){e()}))})).observe(o,{attributes:!0});var s=l.setImmediate;l.setImmediate=function(e){Date.now()-i>15?(i=Date.now(),s(e)):(r.push(e),1===r.length&&o.setAttribute("a",a=!a))}}l.nextTick=l.setImmediate}(),l.isNodejs=void 0!==t&&t.versions&&t.versions.node,l.globalScope=l.isNodejs?i:"undefined"==typeof self?window:self,l.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},l.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},l.isArrayBufferView=function(e){return e&&l.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},l.ByteBuffer=f,l.ByteStringBuffer=f;l.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},l.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},l.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},l.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},l.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},l.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},l.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(l.encodeUtf8(e))},l.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},l.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},l.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},l.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},l.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},l.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},l.ByteStringBuffer.prototype.putInt=function(e,t){c(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},l.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},l.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},l.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},l.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},l.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},l.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},l.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},l.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},l.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},l.ByteStringBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0);return t},l.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},l.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},l.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},l.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},l.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},l.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},l.ByteStringBuffer.prototype.copy=function(){var e=l.createBuffer(this.data);return e.read=this.read,e},l.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},l.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},l.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},l.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e},l.ByteStringBuffer.prototype.toString=function(){return l.decodeUtf8(this.bytes())},l.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=l.isArrayBuffer(e),n=l.isArrayBufferView(e);if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength);this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!=e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},l.DataBuffer.prototype.length=function(){return this.write-this.read},l.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},l.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this},l.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},l.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this},l.DataBuffer.prototype.putBytes=function(e,t){if(l.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset;return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(l.isArrayBuffer(e)){var n=new Uint8Array(e);return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof l.DataBuffer||"object"==typeof e&&"number"==typeof e.read&&"number"==typeof e.write&&l.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length());return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof l.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var i;if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=l.binary.hex.decode(e,i,this.write),this;if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),i=new Uint8Array(this.data.buffer,this.write),this.write+=l.binary.base64.decode(e,i,this.write),this;if("utf8"===t&&(e=l.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=l.binary.raw.decode(i),this;if("utf16"===t)return this.accommodate(2*e.length),i=new Uint16Array(this.data.buffer,this.write),this.write+=l.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},l.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},l.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},l.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},l.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},l.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},l.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},l.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},l.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},l.DataBuffer.prototype.putInt=function(e,t){c(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},l.DataBuffer.prototype.putSignedInt=function(e,t){return c(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},l.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},l.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},l.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},l.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},l.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},l.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},l.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},l.DataBuffer.prototype.getInt=function(e){c(e);var t=0;do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0);return t},l.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t},l.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},l.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},l.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},l.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},l.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},l.DataBuffer.prototype.copy=function(){return new l.DataBuffer(this)},l.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},l.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},l.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},l.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e},l.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if("binary"===(e=e||"utf8")||"raw"===e)return l.binary.raw.encode(t);if("hex"===e)return l.binary.hex.encode(t);if("base64"===e)return l.binary.base64.encode(t);if("utf8"===e)return l.text.utf8.decode(t);if("utf16"===e)return l.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)},l.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=l.encodeUtf8(e)),new l.ByteBuffer(e)},l.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},l.xorBytes=function(e,t,r){for(var n="",i="",a="",o=0,s=0;r>0;--r,++o)i=e.charCodeAt(o)^t.charCodeAt(o),s>=10&&(n+=a,a="",s=0),a+=String.fromCharCode(i),++s;return n+=a},l.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},l.bytesToHex=function(e){return l.createBuffer(e).toHex()},l.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";l.encode64=function(e,t){for(var r,n,i,a="",o="",s=0;s<e.length;)r=e.charCodeAt(s++),n=e.charCodeAt(s++),i=e.charCodeAt(s++),a+=h.charAt(r>>2),a+=h.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=h.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":h.charAt(63&i)),t&&a.length>t&&(o+=a.substr(0,t)+"\r\n",a=a.substr(t));return o+=a},l.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,a="",o=0;o<e.length;)t=p[e.charCodeAt(o++)-43],r=p[e.charCodeAt(o++)-43],n=p[e.charCodeAt(o++)-43],i=p[e.charCodeAt(o++)-43],a+=String.fromCharCode(t<<2|r>>4),64!==n&&(a+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(a+=String.fromCharCode((3&n)<<6|i)));return a},l.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},l.decodeUtf8=function(e){return decodeURIComponent(escape(e))},l.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:u.encode,decode:u.decode}},l.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},l.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,a=0;a<e.length;++a)n[i++]=e.charCodeAt(a);return t?i-r:n},l.binary.hex.encode=l.bytesToHex,l.binary.hex.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/2)));var i=0,a=r=r||0;for(1&e.length&&(i=1,n[a++]=parseInt(e[0],16));i<e.length;i+=2)n[a++]=parseInt(e.substr(i,2),16);return t?a-r:n},l.binary.base64.encode=function(e,t){for(var r,n,i,a="",o="",s=0;s<e.byteLength;)r=e[s++],n=e[s++],i=e[s++],a+=h.charAt(r>>2),a+=h.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=h.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":h.charAt(63&i)),t&&a.length>t&&(o+=a.substr(0,t)+"\r\n",a=a.substr(t));return o+=a},l.binary.base64.decode=function(e,t,r){var n,i,a,o,s=t;s||(s=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,l=r=r||0;u<e.length;)n=p[e.charCodeAt(u++)-43],i=p[e.charCodeAt(u++)-43],a=p[e.charCodeAt(u++)-43],o=p[e.charCodeAt(u++)-43],s[l++]=n<<2|i>>4,64!==a&&(s[l++]=(15&i)<<4|a>>2,64!==o&&(s[l++]=(3&a)<<6|o));return t?l-r:s.subarray(0,l)},l.binary.base58.encode=function(e,t){return l.binary.baseN.encode(e,d,t)},l.binary.base58.decode=function(e,t){return l.binary.baseN.decode(e,d,t)},l.text={utf8:{},utf16:{}},l.text.utf8.encode=function(e,t,r){e=l.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,a=0;a<e.length;++a)n[i++]=e.charCodeAt(a);return t?i-r:n},l.text.utf8.decode=function(e){return l.decodeUtf8(String.fromCharCode.apply(null,e))},l.text.utf16.encode=function(e,t,r){var n=t;n||(n=new Uint8Array(2*e.length));for(var i=new Uint16Array(n.buffer),a=r=r||0,o=r,s=0;s<e.length;++s)i[o++]=e.charCodeAt(s),a+=2;return t?a-r:n},l.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},l.deflate=function(e,t,r){if(t=l.decode64(e.deflate(l.encode64(t)).rval),r){var n=2;32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},l.inflate=function(e,t,r){var n=e.inflate(l.encode64(t)).rval;return null===n?null:l.decode64(n)};var g=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var n;if(null===r?n=e.removeItem(t):(r=l.encode64(JSON.stringify(r)),n=e.setItem(t,r)),void 0!==n&&!0!==n.rval){var i=new Error(n.error.message);throw i.id=n.error.id,i.name=n.error.name,i}},y=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message);throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval;return null!==r&&(r=JSON.parse(l.decode64(r))),r},m=function(e,t,r,n){var i=y(e,t);null===i&&(i={}),i[r]=n,g(e,t,i)},v=function(e,t,r){var n=y(e,t);return null!==n&&(n=r in n?n[r]:null),n},E=function(e,t,r){var n=y(e,t);if(null!==n&&r in n){delete n[r];var i=!0;for(var a in n){i=!1;break}i&&(n=null),g(e,t,n)}},C=function(e,t){g(e,t,null)},b=function(e,t,r){var n,i=null;void 0===r&&(r=["web","flash"]);var a=!1,o=null;for(var s in r){n=r[s];try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.");i=e.apply(this,t),a="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,i=e.apply(this,t),a=!0)}catch(e){o=e}if(a)break}if(!a)throw o;return i};l.setItem=function(e,t,r,n,i){b(m,arguments,i)},l.getItem=function(e,t,r,n){return b(v,arguments,n)},l.removeItem=function(e,t,r,n){b(E,arguments,n)},l.clearItems=function(e,t,r){b(C,arguments,r)},l.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var r=t.exec(e),n=null===r?null:{full:e,scheme:r[1],host:r[2],port:r[3],path:r[4]};return n&&(n.fullHost=n.host,n.port?(80!==n.port&&"http"===n.scheme||443!==n.port&&"https"===n.scheme)&&(n.fullHost+=":"+n.port):"http"===n.scheme?n.port=80:"https"===n.scheme&&(n.port=443),n.full=n.scheme+"://"+n.fullHost),n};var T=null;l.getQueryVariables=function(e){var t,r=function(e){for(var t={},r=e.split("&"),n=0;n<r.length;n++){var i,a,o=r[n].indexOf("=");o>0?(i=r[n].substring(0,o),a=r[n].substring(o+1)):(i=r[n],a=null),i in t||(t[i]=[]),i in Object.prototype||null===a||t[i].push(unescape(a))}return t};return void 0===e?(null===T&&(T="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=T):t=r(e),t},l.parseFragment=function(e){var t=e,r="",n=e.indexOf("?");n>0&&(t=e.substring(0,n),r=e.substring(n+1));var i=t.split("/");return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:l.getQueryVariables(r)}},l.makeRequest=function(e){var t=l.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n;return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e);return n?n[n.length-1]:t}};return r},l.makeLink=function(e,t,r){e=o.isArray(e)?e.join("/"):e;var n=o.param(t||{});return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},l.setPath=function(e,t,r){if("object"==typeof e&&null!==e)for(var n=0,i=t.length;n<i;){var a=t[n++];if(n==i)e[a]=r;else{var o=a in e;(!o||o&&"object"!=typeof e[a]||o&&null===e[a])&&(e[a]={}),e=e[a]}}},l.getPath=function(e,t,r){for(var n=0,i=t.length,a=!0;a&&n<i&&"object"==typeof e&&null!==e;){var o=t[n++];(a=o in e)&&(e=e[o])}return a?e:r},l.deletePath=function(e,t){if("object"==typeof e&&null!==e)for(var r=0,n=t.length;r<n;){var i=t[r++];if(r==n)delete e[i];else{if(!(i in e)||"object"!=typeof e[i]||null===e[i])break;e=e[i]}}},l.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},l.format=function(e){for(var t,r,n=/%./g,i=0,a=[],o=0;t=n.exec(e);){(r=e.substring(o,n.lastIndex-2)).length>0&&a.push(r),o=n.lastIndex;var s=t[0][1];switch(s){case"s":case"o":i<arguments.length?a.push(arguments[1+i++]):a.push("<?>");break;case"%":a.push("%");break;default:a.push("<%"+s+"?>")}}return a.push(e.substring(o)),a.join("")},l.formatNumber=function(e,t,r,n){var i=e,a=isNaN(t=Math.abs(t))?2:t,o=void 0===r?",":r,s=void 0===n?".":n,u=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",c=l.length>3?l.length%3:0;return u+(c?l.substr(0,c)+s:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+s)+(a?o+Math.abs(i-l).toFixed(a).slice(2):"")},l.formatSize=function(e){return e=e>=1073741824?l.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?l.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?l.formatNumber(e/1024,0)+" KiB":l.formatNumber(e,0)+" bytes"},l.bytesFromIP=function(e){return-1!==e.indexOf(".")?l.bytesFromIPv4(e):-1!==e.indexOf(":")?l.bytesFromIPv6(e):null},l.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=l.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10);if(isNaN(n))return null;t.putByte(n)}return t.getBytes()},l.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter((function(e){return 0===e.length&&++t,!0}))).length+t),n=l.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var a=l.hexToBytes(e[i]);a.length<2&&n.putByte(0),n.putBytes(a)}else n.fillWithByte(0,r),r=0;return n.getBytes()},l.bytesToIP=function(e){return 4===e.length?l.bytesToIPv4(e):16===e.length?l.bytesToIPv6(e):null},l.bytesToIPv4=function(e){if(4!==e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")},l.bytesToIPv6=function(e){if(16!==e.length)return null;for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var a=l.bytesToHex(e[i]+e[i+1]);"0"===a[0]&&"0"!==a;)a=a.substr(1);if("0"===a){var o=r[r.length-1],s=t.length;o&&s===o.end+1?(o.end=s,o.end-o.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:s,end:s})}t.push(a)}if(r.length>0){var u=r[n];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),0===u.start&&t.unshift(""),7===u.end&&t.push(""))}return t.join(":")},l.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in l&&!e.update)return t(null,l.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return l.cores=navigator.hardwareConcurrency,t(null,l.cores);if("undefined"==typeof Worker)return l.cores=1,t(null,l.cores);if("undefined"==typeof Blob)return l.cores=2,t(null,l.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})}))}.toString(),")()"],{type:"application/javascript"}));!function e(n,i,a){if(0===i){var o=Math.floor(n.reduce((function(e,t){return e+t}),0)/n.length);return l.cores=Math.max(1,o),URL.revokeObjectURL(r),t(null,l.cores)}!function(e,t){for(var n=[],i=[],a=0;a<e;++a){var o=new Worker(r);o.addEventListener("message",(function(r){if(i.push(r.data),i.length===e){for(var a=0;a<e;++a)n[a].terminate();t(null,i)}})),n.push(o)}for(a=0;a<e;++a)n[a].postMessage(a)}(a,(function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var i=t[n],a=r[n]=[],o=0;o<e;++o)if(n!==o){var s=t[o];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&a.push(o)}return r.reduce((function(e,t){return Math.max(e,t.length)}),0)}(a,r)),e(n,i-1,a)}))}([],5,16)}}).call(this,r(17),r(44).setImmediate,r(9),r(12).Buffer,r(5))},function(e,t,r){var n=r(0);r(1),r(7);var i=e.exports=n.asn1=n.asn1||{};function a(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.create=function(e,t,r,a,o){if(n.util.isArray(a)){for(var s=[],u=0;u<a.length;++u)void 0!==a[u]&&s.push(a[u]);a=s}var l={tagClass:e,type:t,constructed:r,composed:r||n.util.isArray(a),value:a};return o&&"bitStringContents"in o&&(l.bitStringContents=o.bitStringContents,l.original=i.copy(l)),l},i.copy=function(e,t){var r;if(n.util.isArray(e)){r=[];for(var a=0;a<e.length;++a)r.push(i.copy(e[a],t));return r}return"string"==typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:i.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},i.equals=function(e,t,r){if(n.util.isArray(e)){if(!n.util.isArray(t))return!1;if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!i.equals(e[a],t[a]))return!1;return!0}if(typeof e!=typeof t)return!1;if("string"==typeof e)return e===t;var o=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&i.equals(e.value,t.value);return r&&r.includeBitStringContents&&(o=o&&e.bitStringContents===t.bitStringContents),o},i.getBerValueLength=function(e){var t=e.getByte();if(128!==t)return 128&t?e.getInt((127&t)<<3):t};i.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=n.util.createBuffer(e)),function e(t,r,n,o){var s;a(t,r,2);var u=t.getByte();r--;var l=192&u,c=31&u;s=t.length();var f,h,p=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;a(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(t,r);if(r-=s-t.length(),void 0!==p&&p>r){if(o.strict){var d=new Error("Too few bytes to read ASN.1 value.");throw d.available=t.length(),d.remaining=r,d.requested=p,d}p=r}var g=32==(32&u);if(g)if(f=[],void 0===p)for(;;){if(a(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2;break}s=t.length(),f.push(e(t,r,n+1,o)),r-=s-t.length()}else for(;p>0;)s=t.length(),f.push(e(t,p,n+1,o)),r-=s-t.length(),p-=s-t.length();void 0===f&&l===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&(h=t.bytes(p));if(void 0===f&&o.decodeBitStrings&&l===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&p>1){var y=t.read,m=r,v=0;if(c===i.Type.BITSTRING&&(a(t,r,1),v=t.getByte(),r--),0===v)try{s=t.length();var E={verbose:o.verbose,strict:!0,decodeBitStrings:!0},C=e(t,r,n+1,E),b=s-t.length();r-=b,c==i.Type.BITSTRING&&b++;var T=C.tagClass;b!==p||T!==i.Class.UNIVERSAL&&T!==i.Class.CONTEXT_SPECIFIC||(f=[C])}catch(e){}void 0===f&&(t.read=y,r=m)}if(void 0===f){if(void 0===p){if(o.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");p=r}if(c===i.Type.BMPSTRING)for(f="";p>0;p-=2)a(t,r,2),f+=String.fromCharCode(t.getInt16()),r-=2;else f=t.getBytes(p)}var S=void 0===h?null:{bitStringContents:h};return i.create(l,c,g,f,S)}(e,e.length(),0,t)},i.toDer=function(e){var t=n.util.createBuffer(),r=e.tagClass|e.type,a=n.util.createBuffer(),o=!1;if("bitStringContents"in e&&(o=!0,e.original&&(o=i.equals(e,e.original))),o)a.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:a.putByte(0);for(var s=0;s<e.value.length;++s)void 0!==e.value[s]&&a.putBuffer(i.toDer(e.value[s]))}else if(e.type===i.Type.BMPSTRING)for(s=0;s<e.value.length;++s)a.putInt16(e.value.charCodeAt(s));else e.type===i.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?a.putBytes(e.value.substr(1)):a.putBytes(e.value);if(t.putByte(r),a.length()<=127)t.putByte(127&a.length());else{var u=a.length(),l="";do{l+=String.fromCharCode(255&u),u>>>=8}while(u>0);t.putByte(128|l.length);for(s=l.length-1;s>=0;--s)t.putByte(l.charCodeAt(s))}return t.putBuffer(a),t},i.oidToDer=function(e){var t,r,i,a,o=e.split("."),s=n.util.createBuffer();s.putByte(40*parseInt(o[0],10)+parseInt(o[1],10));for(var u=2;u<o.length;++u){t=!0,r=[],i=parseInt(o[u],10);do{a=127&i,i>>>=7,t||(a|=128),r.push(a),t=!1}while(i>0);for(var l=r.length-1;l>=0;--l)s.putByte(r[l])}return s},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),a=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),s=0;if(e.length>11){var u=e.charAt(10),l=10;"+"!==u&&"-"!==u&&(s=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(a,o,s,0),l&&("+"===(u=e.charAt(l))||"-"===u)){var c=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10);c*=6e4,"+"===u?t.setTime(+t-c):t.setTime(+t+c)}return t},i.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),o=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),u=0,l=0,c=!1;"Z"===e.charAt(e.length-1)&&(c=!0);var f=e.length-5,h=e.charAt(f);"+"!==h&&"-"!==h||(l=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),l*=6e4,"+"===h&&(l*=-1),c=!0);return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),c?(t.setUTCFullYear(r,n,i),t.setUTCHours(a,o,s,u),t.setTime(+t+l)):(t.setFullYear(r,n,i),t.setHours(a,o,s,u)),t},i.dateToUtcTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.dateToGeneralizedTime=function(e){if("string"==typeof e)return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n];return t+="Z"},i.integerToDer=function(e){var t=n.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,a){var o=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)a&&(e.tagClass!==t.tagClass&&a.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&a.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(o=!0,t.value&&n.util.isArray(t.value))for(var s=0,u=0;o&&u<t.value.length;++u)o=t.value[u].optional||!1,e.value[s]&&((o=i.validate(e.value[s],t.value[u],r,a))?++s:t.value[u].optional&&(o=!0)),!o&&a&&a.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(o&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else a&&a.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');return o};var o=/[^\\u0000-\\u00ff]/;i.prettyPrint=function(e,t,r){var a="";r=r||2,(t=t||0)>0&&(a+="\n");for(var s="",u=0;u<t*r;++u)s+=" ";switch(a+=s+"Tag: ",e.tagClass){case i.Class.UNIVERSAL:a+="Universal:";break;case i.Class.APPLICATION:a+="Application:";break;case i.Class.CONTEXT_SPECIFIC:a+="Context-Specific:";break;case i.Class.PRIVATE:a+="Private:"}if(e.tagClass===i.Class.UNIVERSAL)switch(a+=e.type,e.type){case i.Type.NONE:a+=" (None)";break;case i.Type.BOOLEAN:a+=" (Boolean)";break;case i.Type.INTEGER:a+=" (Integer)";break;case i.Type.BITSTRING:a+=" (Bit string)";break;case i.Type.OCTETSTRING:a+=" (Octet string)";break;case i.Type.NULL:a+=" (Null)";break;case i.Type.OID:a+=" (Object Identifier)";break;case i.Type.ODESC:a+=" (Object Descriptor)";break;case i.Type.EXTERNAL:a+=" (External or Instance of)";break;case i.Type.REAL:a+=" (Real)";break;case i.Type.ENUMERATED:a+=" (Enumerated)";break;case i.Type.EMBEDDED:a+=" (Embedded PDV)";break;case i.Type.UTF8:a+=" (UTF8)";break;case i.Type.ROID:a+=" (Relative Object Identifier)";break;case i.Type.SEQUENCE:a+=" (Sequence)";break;case i.Type.SET:a+=" (Set)";break;case i.Type.PRINTABLESTRING:a+=" (Printable String)";break;case i.Type.IA5String:a+=" (IA5String (ASCII))";break;case i.Type.UTCTIME:a+=" (UTC time)";break;case i.Type.GENERALIZEDTIME:a+=" (Generalized time)";break;case i.Type.BMPSTRING:a+=" (BMP String)"}else a+=e.type;if(a+="\n",a+=s+"Constructed: "+e.constructed+"\n",e.composed){var l=0,c="";for(u=0;u<e.value.length;++u)void 0!==e.value[u]&&(l+=1,c+=i.prettyPrint(e.value[u],t+1,r),u+1<e.value.length&&(c+=","));a+=s+"Sub values: "+l+c}else{if(a+=s+"Value: ",e.type===i.Type.OID){var f=i.derToOid(e.value);a+=f,n.pki&&n.pki.oids&&f in n.pki.oids&&(a+=" ("+n.pki.oids[f]+") ")}if(e.type===i.Type.INTEGER)try{a+=i.derToInteger(e.value)}catch(t){a+="0x"+n.util.bytesToHex(e.value)}else if(e.type===i.Type.BITSTRING){if(e.value.length>1?a+="0x"+n.util.bytesToHex(e.value.slice(1)):a+="(none)",e.value.length>0){var h=e.value.charCodeAt(0);1==h?a+=" (1 unused bit shown)":h>1&&(a+=" ("+h+" unused bits shown)")}}else e.type===i.Type.OCTETSTRING?(o.test(e.value)||(a+="("+e.value+") "),a+="0x"+n.util.bytesToHex(e.value)):e.type===i.Type.UTF8?a+=n.util.decodeUtf8(e.value):e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?a+=e.value:o.test(e.value)?a+="0x"+n.util.bytesToHex(e.value):0===e.value.length?a+="[null]":a+=e.value}return a}},function(e,t,r){(function(t){var n=r(0);r(6),r(28),r(29),r(1),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),a=n.util.createBuffer();function o(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),a.putInt32(i[0]),a.putInt32(i[1]),a.putInt32(i[2]),a.putInt32(i[3]),a.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var s=o(),u=null,l=n.util.globalScope,c=l.crypto||l.msCrypto;if(c&&c.getRandomValues&&(u=function(e){return c.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,s.collectInt(+new Date,32),"undefined"!=typeof navigator){var f="";for(var h in navigator)try{"string"==typeof navigator[h]&&(f+=navigator[h])}catch(e){}s.collect(f),f=null}t&&(t().mousemove((function(e){s.collectInt(e.clientX,16),s.collectInt(e.clientY,16)})),t().keypress((function(e){s.collectInt(e.charCode,8)})))}if(n.random)for(var h in s)n.random[h]=s[h];else n.random=s;n.random.createInstance=o,e.exports=n.random}(void 0!==t?t:null)}).call(this,r(5))},function(e,t,r){var n=r(0);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){var n;!function(t,r){"use strict";"object"==typeof e.exports?e.exports=t.document?r(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return r(e)}:r(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var a=[],o=Object.getPrototypeOf,s=a.slice,u=a.flat?function(e){return a.flat.call(e)}:function(e){return a.concat.apply([],e)},l=a.push,c=a.indexOf,f={},h=f.toString,p=f.hasOwnProperty,d=p.toString,g=d.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},v=function(e){return null!=e&&e===e.window},E=r.document,C={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,r){var n,i,a=(r=r||E).createElement("script");if(a.text=e,t)for(n in C)(i=t[n]||t.getAttribute&&t.getAttribute(n))&&a.setAttribute(n,i);r.head.appendChild(a).parentNode.removeChild(a)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[h.call(e)]||"object":typeof e}var S=function(e,t){return new S.fn.init(e,t)};function A(e){var t=!!e&&"length"in e&&e.length,r=T(e);return!m(e)&&!v(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:"3.5.0",constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,r){return e.call(t,r,t)})))},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(S.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,r=+e+(e<0?t:0);return this.pushStack(r>=0&&r<t?[this[r]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:a.sort,splice:a.splice},S.extend=S.fn.extend=function(){var e,t,r,n,i,a,o=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[s]||{},s++),"object"==typeof o||m(o)||(o={}),s===u&&(o=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=e[t],"__proto__"!==t&&o!==n&&(l&&n&&(S.isPlainObject(n)||(i=Array.isArray(n)))?(r=o[t],a=i&&!Array.isArray(r)?[]:i||S.isPlainObject(r)?r:{},i=!1,o[t]=S.extend(l,a,n)):void 0!==n&&(o[t]=n));return o},S.extend({expando:"jQuery"+("3.5.0"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,r;return!(!e||"[object Object]"!==h.call(e))&&(!(t=o(e))||"function"==typeof(r=p.call(t,"constructor")&&t.constructor)&&d.call(r)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,r){b(e,{nonce:t&&t.nonce},r)},each:function(e,t){var r,n=0;if(A(e))for(r=e.length;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},makeArray:function(e,t){var r=t||[];return null!=e&&(A(Object(e))?S.merge(r,"string"==typeof e?[e]:e):l.call(r,e)),r},inArray:function(e,t,r){return null==t?-1:c.call(t,e,r)},merge:function(e,t){for(var r=+t.length,n=0,i=e.length;n<r;n++)e[i++]=t[n];return e.length=i,e},grep:function(e,t,r){for(var n=[],i=0,a=e.length,o=!r;i<a;i++)!t(e[i],i)!==o&&n.push(e[i]);return n},map:function(e,t,r){var n,i,a=0,o=[];if(A(e))for(n=e.length;a<n;a++)null!=(i=t(e[a],a,r))&&o.push(i);else for(a in e)null!=(i=t(e[a],a,r))&&o.push(i);return u(o)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=a[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){f["[object "+t+"]"]=t.toLowerCase()}));var _=function(e){var t,r,n,i,a,o,s,u,l,c,f,h,p,d,g,y,m,v,E,C="sizzle"+1*new Date,b=e.document,T=0,S=0,A=ue(),_=ue(),I=ue(),w=ue(),B=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,k=[],D=k.pop,L=k.push,R=k.push,x=k.slice,O=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",U="[\\x20\\t\\r\\n\\f]",M="(?:\\\\[\\da-fA-F]{1,6}"+U+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",V="\\["+U+"*("+M+")(?:"+U+"*([*^$|!~]?=)"+U+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+U+"*\\]",j=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+V+")*)|.*)\\)|)",K=new RegExp(U+"+","g"),F=new RegExp("^"+U+"+|((?:^|[^\\\\])(?:\\\\.)*)"+U+"+$","g"),H=new RegExp("^"+U+"*,"+U+"*"),q=new RegExp("^"+U+"*([>+~]|"+U+")"+U+"*"),G=new RegExp(U+"|>"),W=new RegExp(j),Q=new RegExp("^"+M+"$"),z={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+V),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+U+"*(even|odd|(([+-]|)(\\d*)n|)"+U+"*(?:([+-]|)"+U+"*(\\d+)|))"+U+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+U+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+U+"*((?:-\\d)?\\d*)"+U+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+U+"?|\\\\([^\\r\\n\\f])","g"),re=function(e,t){var r="0x"+e.slice(1)-65536;return t||(r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320))},ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){h()},oe=Ce((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{R.apply(k=x.call(b.childNodes),b.childNodes),k[b.childNodes.length].nodeType}catch(e){R={apply:k.length?function(e,t){L.apply(e,x.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function se(e,t,n,i){var a,s,l,c,f,d,m,v=t&&t.ownerDocument,b=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return n;if(!i&&(h(t),t=t||p,g)){if(11!==b&&(f=J.exec(e)))if(a=f[1]){if(9===b){if(!(l=t.getElementById(a)))return n;if(l.id===a)return n.push(l),n}else if(v&&(l=v.getElementById(a))&&E(t,l)&&l.id===a)return n.push(l),n}else{if(f[2])return R.apply(n,t.getElementsByTagName(e)),n;if((a=f[3])&&r.getElementsByClassName&&t.getElementsByClassName)return R.apply(n,t.getElementsByClassName(a)),n}if(r.qsa&&!w[e+" "]&&(!y||!y.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(m=e,v=t,1===b&&(G.test(e)||q.test(e))){for((v=ee.test(e)&&me(t.parentNode)||t)===t&&r.scope||((c=t.getAttribute("id"))?c=c.replace(ne,ie):t.setAttribute("id",c=C)),s=(d=o(e)).length;s--;)d[s]=(c?"#"+c:":scope")+" "+Ee(d[s]);m=d.join(",")}try{return R.apply(n,v.querySelectorAll(m)),n}catch(t){w(e,!0)}finally{c===C&&t.removeAttribute("id")}}}return u(e.replace(F,"$1"),t,n,i)}function ue(){var e=[];return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function le(e){return e[C]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var r=e.split("|"),i=r.length;i--;)n.attrHandle[r[i]]=t}function he(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&oe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ye(e){return le((function(t){return t=+t,le((function(r,n){for(var i,a=e([],r.length,t),o=a.length;o--;)r[i=a[o]]&&(r[i]=!(n[i]=r[i]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in r=se.support={},a=se.isXML=function(e){var t=e.namespaceURI,r=(e.ownerDocument||e).documentElement;return!Y.test(t||r&&r.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:b;return o!=p&&9===o.nodeType&&o.documentElement?(d=(p=o).documentElement,g=!a(p),b!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ae,!1):i.attachEvent&&i.attachEvent("onunload",ae)),r.scope=ce((function(e){return d.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),r.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),r.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),r.getElementsByClassName=Z.test(p.getElementsByClassName),r.getById=ce((function(e){return d.appendChild(e).id=C,!p.getElementsByName||!p.getElementsByName(C).length})),r.getById?(n.filter.ID=function(e){var t=e.replace(te,re);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var r=t.getElementById(e);return r?[r]:[]}}):(n.filter.ID=function(e){var t=e.replace(te,re);return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return r&&r.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var r,n,i,a=t.getElementById(e);if(a){if((r=a.getAttributeNode("id"))&&r.value===e)return[a];for(i=t.getElementsByName(e),n=0;a=i[n++];)if((r=a.getAttributeNode("id"))&&r.value===e)return[a]}return[]}}),n.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,n=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;r=a[i++];)1===r.nodeType&&n.push(r);return n}return a},n.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],y=[],(r.qsa=Z.test(p.querySelectorAll))&&(ce((function(e){var t;d.appendChild(e).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+U+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+U+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+C+"-]").length||y.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+U+"*name"+U+"*="+U+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+U+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),d.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")}))),(r.matchesSelector=Z.test(v=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ce((function(e){r.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),m.push("!=",j)})),y=y.length&&new RegExp(y.join("|")),m=m.length&&new RegExp(m.join("|")),t=Z.test(d.compareDocumentPosition),E=t||Z.test(d.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=t?function(e,t){if(e===t)return f=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===n?e==p||e.ownerDocument==b&&E(b,e)?-1:t==p||t.ownerDocument==b&&E(b,t)?1:c?O(c,e)-O(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return f=!0,0;var r,n=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e==p?-1:t==p?1:i?-1:a?1:c?O(c,e)-O(c,t):0;if(i===a)return he(e,t);for(r=e;r=r.parentNode;)o.unshift(r);for(r=t;r=r.parentNode;)s.unshift(r);for(;o[n]===s[n];)n++;return n?he(o[n],s[n]):o[n]==b?-1:s[n]==b?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),r.matchesSelector&&g&&!w[t+" "]&&(!m||!m.test(t))&&(!y||!y.test(t)))try{var n=v.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){w(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&h(e),E(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&h(e);var i=n.attrHandle[t.toLowerCase()],a=i&&N.call(n.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==a?a:r.attributes||!g?e.getAttribute(t):(a=e.getAttributeNode(t))&&a.specified?a.value:null},se.escape=function(e){return(e+"").replace(ne,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],i=0,a=0;if(f=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(B),f){for(;t=e[a++];)t===e[a]&&(i=n.push(a));for(;i--;)e.splice(n[i],1)}return c=null,e},i=se.getText=function(e){var t,r="",n=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=i(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[n++];)r+=i(t);return r},(n=se.selectors={cacheLength:50,createPseudo:le,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,re),e[3]=(e[3]||e[4]||e[5]||"").replace(te,re),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&W.test(r)&&(t=o(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,re).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=A[e+" "];return t||(t=new RegExp("(^|"+U+")"+e+"("+U+"|$)"))&&A(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,r){return function(n){var i=se.attr(n,e);return null==i?"!="===t:!t||(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(K," ")+" ").indexOf(r)>-1:"|="===t&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,i){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,r,u){var l,c,f,h,p,d,g=a!==o?"nextSibling":"previousSibling",y=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!u&&!s,E=!1;if(y){if(a){for(;g;){for(h=t;h=h[g];)if(s?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?y.firstChild:y.lastChild],o&&v){for(E=(p=(l=(c=(f=(h=y)[C]||(h[C]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],h=p&&y.childNodes[p];h=++p&&h&&h[g]||(E=p=0)||d.pop();)if(1===h.nodeType&&++E&&h===t){c[e]=[T,p,E];break}}else if(v&&(E=p=(l=(c=(f=(h=t)[C]||(h[C]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===E)for(;(h=++p&&h&&h[g]||(E=p=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++E||(v&&((c=(f=h[C]||(h[C]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[T,E]),h!==t)););return(E-=i)===n||E%n==0&&E/n>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[C]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,r){for(var n,a=i(e,t),o=a.length;o--;)e[n=O(e,a[o])]=!(r[n]=a[o])})):function(e){return i(e,0,r)}):i}},pseudos:{not:le((function(e){var t=[],r=[],n=s(e.replace(F,"$1"));return n[C]?le((function(e,t,r,i){for(var a,o=n(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))})):function(e,i,a){return t[0]=e,n(t,null,a,r),t[0]=null,!r.pop()}})),has:le((function(e){return function(t){return se(e,t).length>0}})),contains:le((function(e){return e=e.replace(te,re),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:le((function(e){return Q.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,re).toLowerCase(),function(t){var r;do{if(r=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return $.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye((function(){return[0]})),last:ye((function(e,t){return[t-1]})),eq:ye((function(e,t,r){return[r<0?r+t:r]})),even:ye((function(e,t){for(var r=0;r<t;r+=2)e.push(r);return e})),odd:ye((function(e,t){for(var r=1;r<t;r+=2)e.push(r);return e})),lt:ye((function(e,t,r){for(var n=r<0?r+t:r>t?t:r;--n>=0;)e.push(n);return e})),gt:ye((function(e,t,r){for(var n=r<0?r+t:r;++n<t;)e.push(n);return e}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=de(t);function ve(){}function Ee(e){for(var t=0,r=e.length,n="";t<r;t++)n+=e[t].value;return n}function Ce(e,t,r){var n=t.dir,i=t.next,a=i||n,o=r&&"parentNode"===a,s=S++;return t.first?function(t,r,i){for(;t=t[n];)if(1===t.nodeType||o)return e(t,r,i);return!1}:function(t,r,u){var l,c,f,h=[T,s];if(u){for(;t=t[n];)if((1===t.nodeType||o)&&e(t,r,u))return!0}else for(;t=t[n];)if(1===t.nodeType||o)if(c=(f=t[C]||(t[C]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[n]||t;else{if((l=c[a])&&l[0]===T&&l[1]===s)return h[2]=l[2];if(c[a]=h,h[2]=e(t,r,u))return!0}return!1}}function be(e){return e.length>1?function(t,r,n){for(var i=e.length;i--;)if(!e[i](t,r,n))return!1;return!0}:e[0]}function Te(e,t,r,n,i){for(var a,o=[],s=0,u=e.length,l=null!=t;s<u;s++)(a=e[s])&&(r&&!r(a,n,i)||(o.push(a),l&&t.push(s)));return o}function Se(e,t,r,n,i,a){return n&&!n[C]&&(n=Se(n)),i&&!i[C]&&(i=Se(i,a)),le((function(a,o,s,u){var l,c,f,h=[],p=[],d=o.length,g=a||function(e,t,r){for(var n=0,i=t.length;n<i;n++)se(e,t[n],r);return r}(t||"*",s.nodeType?[s]:s,[]),y=!e||!a&&t?g:Te(g,h,e,s,u),m=r?i||(a?e:d||n)?[]:o:y;if(r&&r(y,m,s,u),n)for(l=Te(m,p),n(l,[],s,u),c=l.length;c--;)(f=l[c])&&(m[p[c]]=!(y[p[c]]=f));if(a){if(i||e){if(i){for(l=[],c=m.length;c--;)(f=m[c])&&l.push(y[c]=f);i(null,m=[],l,u)}for(c=m.length;c--;)(f=m[c])&&(l=i?O(a,f):h[c])>-1&&(a[l]=!(o[l]=f))}}else m=Te(m===o?m.splice(d,m.length):m),i?i(null,o,m,u):R.apply(o,m)}))}function Ae(e){for(var t,r,i,a=e.length,o=n.relative[e[0].type],s=o||n.relative[" "],u=o?1:0,c=Ce((function(e){return e===t}),s,!0),f=Ce((function(e){return O(t,e)>-1}),s,!0),h=[function(e,r,n){var i=!o&&(n||r!==l)||((t=r).nodeType?c(e,r,n):f(e,r,n));return t=null,i}];u<a;u++)if(r=n.relative[e[u].type])h=[Ce(be(h),r)];else{if((r=n.filter[e[u].type].apply(null,e[u].matches))[C]){for(i=++u;i<a&&!n.relative[e[i].type];i++);return Se(u>1&&be(h),u>1&&Ee(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(F,"$1"),r,u<i&&Ae(e.slice(u,i)),i<a&&Ae(e=e.slice(i)),i<a&&Ee(e))}h.push(r)}return be(h)}return ve.prototype=n.filters=n.pseudos,n.setFilters=new ve,o=se.tokenize=function(e,t){var r,i,a,o,s,u,l,c=_[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=n.preFilter;s;){for(o in r&&!(i=H.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(a=[])),r=!1,(i=q.exec(s))&&(r=i.shift(),a.push({value:r,type:i[0].replace(F," ")}),s=s.slice(r.length)),n.filter)!(i=z[o].exec(s))||l[o]&&!(i=l[o](i))||(r=i.shift(),a.push({value:r,type:o,matches:i}),s=s.slice(r.length));if(!r)break}return t?s.length:s?se.error(e):_(e,u).slice(0)},s=se.compile=function(e,t){var r,i=[],a=[],s=I[e+" "];if(!s){for(t||(t=o(e)),r=t.length;r--;)(s=Ae(t[r]))[C]?i.push(s):a.push(s);(s=I(e,function(e,t){var r=t.length>0,i=e.length>0,a=function(a,o,s,u,c){var f,d,y,m=0,v="0",E=a&&[],C=[],b=l,S=a||i&&n.find.TAG("*",c),A=T+=null==b?1:Math.random()||.1,_=S.length;for(c&&(l=o==p||o||c);v!==_&&null!=(f=S[v]);v++){if(i&&f){for(d=0,o||f.ownerDocument==p||(h(f),s=!g);y=e[d++];)if(y(f,o||p,s)){u.push(f);break}c&&(T=A)}r&&((f=!y&&f)&&m--,a&&E.push(f))}if(m+=v,r&&v!==m){for(d=0;y=t[d++];)y(E,C,o,s);if(a){if(m>0)for(;v--;)E[v]||C[v]||(C[v]=D.call(u));C=Te(C)}R.apply(u,C),c&&!a&&C.length>0&&m+t.length>1&&se.uniqueSort(u)}return c&&(T=A,l=b),E};return r?le(a):a}(a,i))).selector=e}return s},u=se.select=function(e,t,r,i){var a,u,l,c,f,h="function"==typeof e&&e,p=!i&&o(e=h.selector||e);if(r=r||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&n.relative[u[1].type]){if(!(t=(n.find.ID(l.matches[0].replace(te,re),t)||[])[0]))return r;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(a=z.needsContext.test(e)?0:u.length;a--&&(l=u[a],!n.relative[c=l.type]);)if((f=n.find[c])&&(i=f(l.matches[0].replace(te,re),ee.test(u[0].type)&&me(t.parentNode)||t))){if(u.splice(a,1),!(e=i.length&&Ee(u)))return R.apply(r,i),r;break}}return(h||s(e,p))(i,t,!g,r,!t||ee.test(e)&&me(t.parentNode)||t),r},r.sortStable=C.split("").sort(B).join("")===C,r.detectDuplicates=!!f,h(),r.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),r.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||fe(P,(function(e,t,r){var n;if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),se}(r);S.find=_,S.expr=_.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=_.uniqueSort,S.text=_.getText,S.isXMLDoc=_.isXML,S.contains=_.contains,S.escapeSelector=_.escape;var I=function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&S(e).is(r))break;n.push(e)}return n},w=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},B=S.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var k=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,r){return m(t)?S.grep(e,(function(e,n){return!!t.call(e,n,e)!==r})):t.nodeType?S.grep(e,(function(e){return e===t!==r})):"string"!=typeof t?S.grep(e,(function(e){return c.call(t,e)>-1!==r})):S.filter(t,e,r)}S.filter=function(e,t,r){var n=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?S.find.matchesSelector(n,e)?[n]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,r,n=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t<n;t++)if(S.contains(i[t],this))return!0})));for(r=this.pushStack([]),t=0;t<n;t++)S.find(e,i[t],r);return n>1?S.uniqueSort(r):r},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&B.test(e)?S(e):e||[],!1).length}});var L,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,r){var n,i;if(!e)return this;if(r=r||L,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!n[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),k.test(n[1])&&S.isPlainObject(t))for(n in t)m(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(i=E.getElementById(n[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==r.ready?r.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,L=S(E);var x=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),r=t.length;return this.filter((function(){for(var e=0;e<r;e++)if(S.contains(this,t[e]))return!0}))},closest:function(e,t){var r,n=0,i=this.length,a=[],o="string"!=typeof e&&S(e);if(!B.test(e))for(;n<i;n++)for(r=this[n];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(o?o.index(r)>-1:1===r.nodeType&&S.find.matchesSelector(r,e))){a.push(r);break}return this.pushStack(a.length>1?S.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?c.call(S(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,r){return I(e,"parentNode",r)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,r){return I(e,"nextSibling",r)},prevUntil:function(e,t,r){return I(e,"previousSibling",r)},siblings:function(e){return w((e.parentNode||{}).firstChild,e)},children:function(e){return w(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(N(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(r,n){var i=S.map(this,t,r);return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=S.filter(n,i)),this.length>1&&(O[e]||S.uniqueSort(i),x.test(e)&&i.reverse()),this.pushStack(i)}}));var U=/[^\x20\t\r\n\f]+/g;function M(e){return e}function V(e){throw e}function j(e,t,r,n){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(r):e&&m(i=e.then)?i.call(e,t,r):t.apply(void 0,[e].slice(n))}catch(e){r.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(U)||[],(function(e,r){t[r]=!0})),t}(e):S.extend({},e);var t,r,n,i,a=[],o=[],s=-1,u=function(){for(i=i||e.once,n=t=!0;o.length;s=-1)for(r=o.shift();++s<a.length;)!1===a[s].apply(r[0],r[1])&&e.stopOnFalse&&(s=a.length,r=!1);e.memory||(r=!1),t=!1,i&&(a=r?[]:"")},l={add:function(){return a&&(r&&!t&&(s=a.length-1,o.push(r)),function t(r){S.each(r,(function(r,n){m(n)?e.unique&&l.has(n)||a.push(n):n&&n.length&&"string"!==T(n)&&t(n)}))}(arguments),r&&!t&&u()),this},remove:function(){return S.each(arguments,(function(e,t){for(var r;(r=S.inArray(t,a,r))>-1;)a.splice(r,1),r<=s&&s--})),this},has:function(e){return e?S.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=o=[],a=r="",this},disabled:function(){return!a},lock:function(){return i=o=[],r||t||(a=r=""),this},locked:function(){return!!i},fireWith:function(e,r){return i||(r=[e,(r=r||[]).slice?r.slice():r],o.push(r),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!n}};return l},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(r){S.each(t,(function(t,n){var i=m(e[n[4]])&&e[n[4]];a[n[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[n[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var a=0;function o(e,t,n,i){return function(){var s=this,u=arguments,l=function(){var r,l;if(!(e<a)){if((r=n.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");l=r&&("object"==typeof r||"function"==typeof r)&&r.then,m(l)?i?l.call(r,o(a,t,M,i),o(a,t,V,i)):(a++,l.call(r,o(a,t,M,i),o(a,t,V,i),o(a,t,M,t.notifyWith))):(n!==M&&(s=void 0,u=[r]),(i||t.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(r){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(r,c.stackTrace),e+1>=a&&(n!==V&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?c():(S.Deferred.getStackHook&&(c.stackTrace=S.Deferred.getStackHook()),r.setTimeout(c))}}return S.Deferred((function(r){t[0][3].add(o(0,r,m(i)?i:M,r.notifyWith)),t[1][3].add(o(0,r,m(e)?e:M)),t[2][3].add(o(0,r,m(n)?n:V))})).promise()},promise:function(e){return null!=e?S.extend(e,i):i}},a={};return S.each(t,(function(e,r){var o=r[2],s=r[5];i[r[1]]=o.add,s&&o.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),a[r[0]]=function(){return a[r[0]+"With"](this===a?void 0:this,arguments),this},a[r[0]+"With"]=o.fireWith})),i.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,r=t,n=Array(r),i=s.call(arguments),a=S.Deferred(),o=function(e){return function(r){n[e]=this,i[e]=arguments.length>1?s.call(arguments):r,--t||a.resolveWith(n,i)}};if(t<=1&&(j(e,a.done(o(r)).resolve,a.reject,!t),"pending"===a.state()||m(i[r]&&i[r].then)))return a.then();for(;r--;)j(i[r],o(r),a.reject);return a.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&K.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){r.setTimeout((function(){throw e}))};var F=S.Deferred();function H(){E.removeEventListener("DOMContentLoaded",H),r.removeEventListener("load",H),S.ready()}S.fn.ready=function(e){return F.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||F.resolveWith(E,[S]))}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?r.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",H),r.addEventListener("load",H));var q=function(e,t,r,n,i,a,o){var s=0,u=e.length,l=null==r;if("object"===T(r))for(s in i=!0,r)q(e,t,s,r[s],!0,a,o);else if(void 0!==n&&(i=!0,m(n)||(o=!0),l&&(o?(t.call(e,n),t=null):(l=t,t=function(e,t,r){return l.call(S(e),r)})),t))for(;s<u;s++)t(e[s],r,o?n:n.call(e[s],s,t(e[s],r)));return i?e:l?t.call(e):u?t(e[0],r):a},G=/^-ms-/,W=/-([a-z])/g;function Q(e,t){return t.toUpperCase()}function z(e){return e.replace(G,"ms-").replace(W,Q)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function X(){this.expando=S.expando+X.uid++}X.uid=1,X.prototype={cache:function(e){var t=e[this.expando];return t||(t=Object.create(null),Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,r){var n,i=this.cache(e);if("string"==typeof t)i[z(t)]=r;else for(n in t)i[z(n)]=t[n];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][z(t)]},access:function(e,t,r){return void 0===t||t&&"string"==typeof t&&void 0===r?this.get(e,t):(this.set(e,t,r),void 0!==r?r:t)},remove:function(e,t){var r,n=e[this.expando];if(void 0!==n){if(void 0!==t){r=(t=Array.isArray(t)?t.map(z):(t=z(t))in n?[t]:t.match(U)||[]).length;for(;r--;)delete n[t[r]]}(void 0===t||S.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var $=new X,Z=new X,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,r){var n;if(void 0===r&&1===e.nodeType)if(n="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(r=e.getAttribute(n))){try{r=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:J.test(e)?JSON.parse(e):e)}(r)}catch(e){}Z.set(e,t,r)}else r=void 0;return r}S.extend({hasData:function(e){return Z.hasData(e)||$.hasData(e)},data:function(e,t,r){return Z.access(e,t,r)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,r){return $.access(e,t,r)},_removeData:function(e,t){$.remove(e,t)}}),S.fn.extend({data:function(e,t){var r,n,i,a=this[0],o=a&&a.attributes;if(void 0===e){if(this.length&&(i=Z.get(a),1===a.nodeType&&!$.get(a,"hasDataAttrs"))){for(r=o.length;r--;)o[r]&&0===(n=o[r].name).indexOf("data-")&&(n=z(n.slice(5)),te(a,n,i[n]));$.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Z.set(this,e)})):q(this,(function(t){var r;if(a&&void 0===t)return void 0!==(r=Z.get(a,e))||void 0!==(r=te(a,e))?r:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),S.extend({queue:function(e,t,r){var n;if(e)return t=(t||"fx")+"queue",n=$.get(e,t),r&&(!n||Array.isArray(r)?n=$.access(e,t,S.makeArray(r)):n.push(r)),n||[]},dequeue:function(e,t){t=t||"fx";var r=S.queue(e,t),n=r.length,i=r.shift(),a=S._queueHooks(e,t);"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===t&&r.unshift("inprogress"),delete a.stop,i.call(e,(function(){S.dequeue(e,t)}),a)),!n&&a&&a.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return $.get(e,r)||$.access(e,r,{empty:S.Callbacks("once memory").add((function(){$.remove(e,[t+"queue",r])}))})}}),S.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?S.queue(this[0],e):void 0===t?this:this.each((function(){var r=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&S.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){S.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,n=1,i=S.Deferred(),a=this,o=this.length,s=function(){--n||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(r=$.get(a[o],e+"queueHooks"))&&r.empty&&(n++,r.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],ae=E.documentElement,oe=function(e){return S.contains(e.ownerDocument,e)},se={composed:!0};ae.getRootNode&&(oe=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===S.css(e,"display")};function le(e,t,r,n){var i,a,o=20,s=n?function(){return n.cur()}:function(){return S.css(e,t,"")},u=s(),l=r&&r[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&ne.exec(S.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;o--;)S.style(e,t,c+l),(1-a)*(1-(a=s()/u||.5))<=0&&(o=0),c/=a;c*=2,S.style(e,t,c+l),r=r||[]}return r&&(c=+c||+u||0,i=r[1]?c+(r[1]+1)*r[2]:+r[2],n&&(n.unit=l,n.start=c,n.end=i)),i}var ce={};function fe(e){var t,r=e.ownerDocument,n=e.nodeName,i=ce[n];return i||(t=r.body.appendChild(r.createElement(n)),i=S.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ce[n]=i,i)}function he(e,t){for(var r,n,i=[],a=0,o=e.length;a<o;a++)(n=e[a]).style&&(r=n.style.display,t?("none"===r&&(i[a]=$.get(n,"display")||null,i[a]||(n.style.display="")),""===n.style.display&&ue(n)&&(i[a]=fe(n))):"none"!==r&&(i[a]="none",$.set(n,"display",r)));for(a=0;a<o;a++)null!=i[a]&&(e[a].style.display=i[a]);return e}S.fn.extend({show:function(){return he(this,!0)},hide:function(){return he(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ue(this)?S(this).show():S(this).hide()}))}});var pe,de,ge=/^(?:checkbox|radio)$/i,ye=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,me=/^$|^module$|\/(?:java|ecma)script/i;pe=E.createDocumentFragment().appendChild(E.createElement("div")),(de=E.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),pe.appendChild(de),y.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",y.option=!!pe.lastChild;var ve={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Ee(e,t){var r;return r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?S.merge([e],r):r}function Ce(e,t){for(var r=0,n=e.length;r<n;r++)$.set(e[r],"globalEval",!t||$.get(t[r],"globalEval"))}ve.tbody=ve.tfoot=ve.colgroup=ve.caption=ve.thead,ve.th=ve.td,y.option||(ve.optgroup=ve.option=[1,"<select multiple='multiple'>","</select>"]);var be=/<|&#?\w+;/;function Te(e,t,r,n,i){for(var a,o,s,u,l,c,f=t.createDocumentFragment(),h=[],p=0,d=e.length;p<d;p++)if((a=e[p])||0===a)if("object"===T(a))S.merge(h,a.nodeType?[a]:a);else if(be.test(a)){for(o=o||f.appendChild(t.createElement("div")),s=(ye.exec(a)||["",""])[1].toLowerCase(),u=ve[s]||ve._default,o.innerHTML=u[1]+S.htmlPrefilter(a)+u[2],c=u[0];c--;)o=o.lastChild;S.merge(h,o.childNodes),(o=f.firstChild).textContent=""}else h.push(t.createTextNode(a));for(f.textContent="",p=0;a=h[p++];)if(n&&S.inArray(a,n)>-1)i&&i.push(a);else if(l=oe(a),o=Ee(f.appendChild(a),"script"),l&&Ce(o),r)for(c=0;a=o[c++];)me.test(a.type||"")&&r.push(a);return f}var Se=/^key/,Ae=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_e=/^([^.]*)(?:\.(.+)|)/;function Ie(){return!0}function we(){return!1}function Be(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ne(e,t,r,n,i,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof r&&(n=n||r,r=void 0),t)Ne(e,s,r,n,t[s],a);return e}if(null==n&&null==i?(i=r,n=r=void 0):null==i&&("string"==typeof r?(i=n,n=void 0):(i=n,n=r,r=void 0)),!1===i)i=we;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return S().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=S.guid++)),e.each((function(){S.event.add(this,t,i,n,r)}))}function ke(e,t,r){r?($.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,i,a=$.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=s.call(arguments),$.set(this,t,a),n=r(this,t),this[t](),a!==(i=$.get(this,t))||n?$.set(this,t,!1):i={},a!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else a.length&&($.set(this,t,{value:S.event.trigger(S.extend(a[0],S.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===$.get(e,t)&&S.event.add(e,t,Ie)}S.event={global:{},add:function(e,t,r,n,i){var a,o,s,u,l,c,f,h,p,d,g,y=$.get(e);if(Y(e))for(r.handler&&(r=(a=r).handler,i=a.selector),i&&S.find.matchesSelector(ae,i),r.guid||(r.guid=S.guid++),(u=y.events)||(u=y.events=Object.create(null)),(o=y.handle)||(o=y.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(U)||[""]).length;l--;)p=g=(s=_e.exec(t[l])||[])[1],d=(s[2]||"").split(".").sort(),p&&(f=S.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=S.event.special[p]||{},c=S.extend({type:p,origType:g,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:d.join(".")},a),(h=u[p])||((h=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,n,d,o)||e.addEventListener&&e.addEventListener(p,o)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),S.event.global[p]=!0)},remove:function(e,t,r,n,i){var a,o,s,u,l,c,f,h,p,d,g,y=$.hasData(e)&&$.get(e);if(y&&(u=y.events)){for(l=(t=(t||"").match(U)||[""]).length;l--;)if(p=g=(s=_e.exec(t[l])||[])[1],d=(s[2]||"").split(".").sort(),p){for(f=S.event.special[p]||{},h=u[p=(n?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)c=h[a],!i&&g!==c.origType||r&&r.guid!==c.guid||s&&!s.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(h.splice(a,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(e,c));o&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,d,y.handle)||S.removeEvent(e,p,y.handle),delete u[p])}else for(p in u)S.event.remove(e,p+t[l],r,n,!0);S.isEmptyObject(u)&&$.remove(e,"handle events")}},dispatch:function(e){var t,r,n,i,a,o,s=new Array(arguments.length),u=S.event.fix(e),l=($.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(o=S.event.handlers.call(this,u,l),t=0;(i=o[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,r=0;(a=i.handlers[r++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==a.namespace&&!u.rnamespace.test(a.namespace)||(u.handleObj=a,u.data=a.data,void 0!==(n=((S.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s))&&!1===(u.result=n)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var r,n,i,a,o,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(a=[],o={},r=0;r<u;r++)void 0===o[i=(n=t[r]).selector+" "]&&(o[i]=n.needsContext?S(i,this).index(l)>-1:S.find(i,this,null,[l]).length),o[i]&&a.push(n);a.length&&s.push({elem:l,handlers:a})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ge.test(t.type)&&t.click&&N(t,"input")&&ke(t,"click",Ie),!1},trigger:function(e){var t=this||e;return ge.test(t.type)&&t.click&&N(t,"input")&&ke(t,"click"),!0},_default:function(e){var t=e.target;return ge.test(t.type)&&t.click&&N(t,"input")&&$.get(t,"click")||N(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ie:we,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:we,isPropagationStopped:we,isImmediatePropagationStopped:we,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ie,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ie,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ie,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Se.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ae.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},(function(e,t){S.event.special[e]={setup:function(){return ke(this,e,Be),!1},trigger:function(){return ke(this,e),!0},delegateType:t}})),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,n=this,i=e.relatedTarget,a=e.handleObj;return i&&(i===n||S.contains(n,i))||(e.type=a.origType,r=a.handler.apply(this,arguments),e.type=t),r}}})),S.fn.extend({on:function(e,t,r,n){return Ne(this,e,t,r,n)},one:function(e,t,r,n){return Ne(this,e,t,r,n,1)},off:function(e,t,r){var n,i;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,S(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(r=t,t=void 0),!1===r&&(r=we),this.each((function(){S.event.remove(this,e,r,t)}))}});var De=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,Re=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function xe(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ue(e,t){var r,n,i,a,o,s;if(1===t.nodeType){if($.hasData(e)&&(s=$.get(e).events))for(i in $.remove(t,"handle events"),s)for(r=0,n=s[i].length;r<n;r++)S.event.add(t,i,s[i][r]);Z.hasData(e)&&(a=Z.access(e),o=S.extend({},a),Z.set(t,o))}}function Me(e,t){var r=t.nodeName.toLowerCase();"input"===r&&ge.test(e.type)?t.checked=e.checked:"input"!==r&&"textarea"!==r||(t.defaultValue=e.defaultValue)}function Ve(e,t,r,n){t=u(t);var i,a,o,s,l,c,f=0,h=e.length,p=h-1,d=t[0],g=m(d);if(g||h>1&&"string"==typeof d&&!y.checkClone&&Le.test(d))return e.each((function(i){var a=e.eq(i);g&&(t[0]=d.call(this,i,a.html())),Ve(a,t,r,n)}));if(h&&(a=(i=Te(t,e[0].ownerDocument,!1,e,n)).firstChild,1===i.childNodes.length&&(i=a),a||n)){for(s=(o=S.map(Ee(i,"script"),Oe)).length;f<h;f++)l=i,f!==p&&(l=S.clone(l,!0,!0),s&&S.merge(o,Ee(l,"script"))),r.call(e[f],l,f);if(s)for(c=o[o.length-1].ownerDocument,S.map(o,Pe),f=0;f<s;f++)l=o[f],me.test(l.type||"")&&!$.access(l,"globalEval")&&S.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?S._evalUrl&&!l.noModule&&S._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):b(l.textContent.replace(Re,""),l,c))}return e}function je(e,t,r){for(var n,i=t?S.filter(t,e):e,a=0;null!=(n=i[a]);a++)r||1!==n.nodeType||S.cleanData(Ee(n)),n.parentNode&&(r&&oe(n)&&Ce(Ee(n,"script")),n.parentNode.removeChild(n));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,r){var n,i,a,o,s=e.cloneNode(!0),u=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(o=Ee(s),n=0,i=(a=Ee(e)).length;n<i;n++)Me(a[n],o[n]);if(t)if(r)for(a=a||Ee(e),o=o||Ee(s),n=0,i=a.length;n<i;n++)Ue(a[n],o[n]);else Ue(e,s);return(o=Ee(s,"script")).length>0&&Ce(o,!u&&Ee(e,"script")),s},cleanData:function(e){for(var t,r,n,i=S.event.special,a=0;void 0!==(r=e[a]);a++)if(Y(r)){if(t=r[$.expando]){if(t.events)for(n in t.events)i[n]?S.event.remove(r,n):S.removeEvent(r,n,t.handle);r[$.expando]=void 0}r[Z.expando]&&(r[Z.expando]=void 0)}}}),S.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return q(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||xe(this,e).appendChild(e)}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=xe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(Ee(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return q(this,(function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!ve[(ye.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;r<n;r++)1===(t=this[r]||{}).nodeType&&(S.cleanData(Ee(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ve(this,arguments,(function(t){var r=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(Ee(this)),r&&r.replaceChild(t,this))}),e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){S.fn[e]=function(e){for(var r,n=[],i=S(e),a=i.length-1,o=0;o<=a;o++)r=o===a?this:this.clone(!0),S(i[o])[t](r),l.apply(n,r.get());return this.pushStack(n)}}));var Ke=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},He=function(e,t,r){var n,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in n=r.call(e),t)e.style[i]=a[i];return n},qe=new RegExp(ie.join("|"),"i");function Ge(e,t,r){var n,i,a,o,s=e.style;return(r=r||Fe(e))&&(""!==(o=r.getPropertyValue(t)||r[t])||oe(e)||(o=S.style(e,t)),!y.pixelBoxStyles()&&Ke.test(o)&&qe.test(t)&&(n=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=r.width,s.width=n,s.minWidth=i,s.maxWidth=a)),void 0!==o?o+"":o}function We(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(l).appendChild(c);var e=r.getComputedStyle(c);n="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",o=36===t(e.right),i=36===t(e.width),c.style.position="absolute",a=12===t(c.offsetWidth/3),ae.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var n,i,a,o,s,u,l=E.createElement("div"),c=E.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===c.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",ae.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height)>3,ae.removeChild(e)),s}}))}();var Qe=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ye={};function Xe(e){var t=S.cssProps[e]||Ye[e];return t||(e in ze?e:Ye[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),r=Qe.length;r--;)if((e=Qe[r]+t)in ze)return e}(e)||e)}var $e=/^(none|table(?!-c[ea]).+)/,Ze=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,r){var n=ne.exec(t);return n?Math.max(0,n[2]-(r||0))+(n[3]||"px"):t}function rt(e,t,r,n,i,a){var o="width"===t?1:0,s=0,u=0;if(r===(n?"border":"content"))return 0;for(;o<4;o+=2)"margin"===r&&(u+=S.css(e,r+ie[o],!0,i)),n?("content"===r&&(u-=S.css(e,"padding"+ie[o],!0,i)),"margin"!==r&&(u-=S.css(e,"border"+ie[o]+"Width",!0,i))):(u+=S.css(e,"padding"+ie[o],!0,i),"padding"!==r?u+=S.css(e,"border"+ie[o]+"Width",!0,i):s+=S.css(e,"border"+ie[o]+"Width",!0,i));return!n&&a>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-u-s-.5))||0),u}function nt(e,t,r){var n=Fe(e),i=(!y.boxSizingReliable()||r)&&"border-box"===S.css(e,"boxSizing",!1,n),a=i,o=Ge(e,t,n),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ke.test(o)){if(!r)return o;o="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&N(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===S.css(e,"display",!1,n))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,n),(a=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+rt(e,t,r||(i?"border":"content"),a,n,o)+"px"}function it(e,t,r,n,i){return new it.prototype.init(e,t,r,n,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=Ge(e,"opacity");return""===r?"1":r}}}},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(e,t,r,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,o,s=z(t),u=Ze.test(t),l=e.style;if(u||(t=Xe(s)),o=S.cssHooks[t]||S.cssHooks[s],void 0===r)return o&&"get"in o&&void 0!==(i=o.get(e,!1,n))?i:l[t];"string"===(a=typeof r)&&(i=ne.exec(r))&&i[1]&&(r=le(e,t,i),a="number"),null!=r&&r==r&&("number"!==a||u||(r+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==r||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(r=o.set(e,r,n))||(u?l.setProperty(t,r):l[t]=r))}},css:function(e,t,r,n){var i,a,o,s=z(t);return Ze.test(t)||(t=Xe(s)),(o=S.cssHooks[t]||S.cssHooks[s])&&"get"in o&&(i=o.get(e,!0,r)),void 0===i&&(i=Ge(e,t,n)),"normal"===i&&t in et&&(i=et[t]),""===r||r?(a=parseFloat(i),!0===r||isFinite(a)?a||0:i):i}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,r,n){if(r)return!$e.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,n):He(e,Je,(function(){return nt(e,t,n)}))},set:function(e,r,n){var i,a=Fe(e),o=!y.scrollboxSize()&&"absolute"===a.position,s=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,a),u=n?rt(e,t,n,s,a):0;return s&&o&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-rt(e,t,"border",!1,a)-.5)),u&&(i=ne.exec(r))&&"px"!==(i[3]||"px")&&(e.style[t]=r,r=S.css(e,t)),tt(0,r,u)}}})),S.cssHooks.marginLeft=We(y.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-He(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(r){for(var n=0,i={},a="string"==typeof r?r.split(" "):[r];n<4;n++)i[e+ie[n]+t]=a[n]||a[n-2]||a[0];return i}},"margin"!==e&&(S.cssHooks[e+t].set=tt)})),S.fn.extend({css:function(e,t){return q(this,(function(e,t,r){var n,i,a={},o=0;if(Array.isArray(t)){for(n=Fe(e),i=t.length;o<i;o++)a[t[o]]=S.css(e,t[o],!1,n);return a}return void 0!==r?S.style(e,t,r):S.css(e,t)}),e,t,arguments.length>1)}}),S.Tween=it,it.prototype={constructor:it,init:function(e,t,r,n,i,a){this.elem=e,this.prop=r,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=a||(S.cssNumber[r]?"":"px")},cur:function(){var e=it.propHooks[this.prop];return e&&e.get?e.get(this):it.propHooks._default.get(this)},run:function(e){var t,r=it.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):it.propHooks._default.set(this),this}},it.prototype.init.prototype=it.prototype,it.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},it.propHooks.scrollTop=it.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=it.prototype.init,S.fx.step={};var at,ot,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){ot&&(!1===E.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(lt):r.setTimeout(lt,S.fx.interval),S.fx.tick())}function ct(){return r.setTimeout((function(){at=void 0})),at=Date.now()}function ft(e,t){var r,n=0,i={height:e};for(t=t?1:0;n<4;n+=2-t)i["margin"+(r=ie[n])]=i["padding"+r]=e;return t&&(i.opacity=i.width=e),i}function ht(e,t,r){for(var n,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),a=0,o=i.length;a<o;a++)if(n=i[a].call(r,t,e))return n}function pt(e,t,r){var n,i,a=0,o=pt.prefilters.length,s=S.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=at||ct(),r=Math.max(0,l.startTime+l.duration-t),n=1-(r/l.duration||0),a=0,o=l.tweens.length;a<o;a++)l.tweens[a].run(n);return s.notifyWith(e,[l,n,r]),n<1&&o?r:(o||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},r),originalProperties:t,originalOptions:r,startTime:at||ct(),duration:r.duration,tweens:[],createTween:function(t,r){var n=S.Tween(e,l.opts,t,r,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(n),n},stop:function(t){var r=0,n=t?l.tweens.length:0;if(i)return this;for(i=!0;r<n;r++)l.tweens[r].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var r,n,i,a,o;for(r in e)if(i=t[n=z(r)],a=e[r],Array.isArray(a)&&(i=a[1],a=e[r]=a[0]),r!==n&&(e[n]=a,delete e[r]),(o=S.cssHooks[n])&&"expand"in o)for(r in a=o.expand(a),delete e[n],a)r in e||(e[r]=a[r],t[r]=i);else t[n]=i}(c,l.opts.specialEasing);a<o;a++)if(n=pt.prefilters[a].call(l,e,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ht,l),m(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(pt,{tweeners:{"*":[function(e,t){var r=this.createTween(e,t);return le(r.elem,e,ne.exec(t),r),r}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(U);for(var r,n=0,i=e.length;n<i;n++)r=e[n],pt.tweeners[r]=pt.tweeners[r]||[],pt.tweeners[r].unshift(t)},prefilters:[function(e,t,r){var n,i,a,o,s,u,l,c,f="width"in t||"height"in t,h=this,p={},d=e.style,g=e.nodeType&&ue(e),y=$.get(e,"fxshow");for(n in r.queue||(null==(o=S._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,h.always((function(){h.always((function(){o.unqueued--,S.queue(e,"fx").length||o.empty.fire()}))}))),t)if(i=t[n],st.test(i)){if(delete t[n],a=a||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[n])continue;g=!0}p[n]=y&&y[n]||S.style(e,n)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(p))for(n in f&&1===e.nodeType&&(r.overflow=[d.overflow,d.overflowX,d.overflowY],null==(l=y&&y.display)&&(l=$.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(he([e],!0),l=e.style.display||l,c=S.css(e,"display"),he([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(h.done((function(){d.display=l})),null==l&&(c=d.display,l="none"===c?"":c)),d.display="inline-block")),r.overflow&&(d.overflow="hidden",h.always((function(){d.overflow=r.overflow[0],d.overflowX=r.overflow[1],d.overflowY=r.overflow[2]}))),u=!1,p)u||(y?"hidden"in y&&(g=y.hidden):y=$.access(e,"fxshow",{display:l}),a&&(y.hidden=!g),g&&he([e],!0),h.done((function(){for(n in g||he([e]),$.remove(e,"fxshow"),p)S.style(e,n,p[n])}))),u=ht(g?y[n]:0,n,h),n in y||(y[n]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),S.speed=function(e,t,r){var n=e&&"object"==typeof e?S.extend({},e):{complete:r||!r&&t||m(e)&&e,duration:e,easing:r&&t||t&&!m(t)&&t};return S.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in S.fx.speeds?n.duration=S.fx.speeds[n.duration]:n.duration=S.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){m(n.old)&&n.old.call(this),n.queue&&S.dequeue(this,n.queue)},n},S.fn.extend({fadeTo:function(e,t,r,n){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,r,n)},animate:function(e,t,r,n){var i=S.isEmptyObject(e),a=S.speed(t,r,n),o=function(){var t=pt(this,S.extend({},e),a);(i||$.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(e,t,r){var n=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",a=S.timers,o=$.get(this);if(i)o[i]&&o[i].stop&&n(o[i]);else for(i in o)o[i]&&o[i].stop&&ut.test(i)&&n(o[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(r),t=!1,a.splice(i,1));!t&&r||S.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,r=$.get(this),n=r[e+"queue"],i=r[e+"queueHooks"],a=S.timers,o=n?n.length:0;for(r.finish=!0,S.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete r.finish}))}}),S.each(["toggle","show","hide"],(function(e,t){var r=S.fn[t];S.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(ft(t,!0),e,n,i)}})),S.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){S.fn[e]=function(e,r,n){return this.animate(t,e,r,n)}})),S.timers=[],S.fx.tick=function(){var e,t=0,r=S.timers;for(at=Date.now();t<r.length;t++)(e=r[t])()||r[t]!==e||r.splice(t--,1);r.length||S.fx.stop(),at=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){ot||(ot=!0,lt())},S.fx.stop=function(){ot=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},function(){var e=E.createElement("input"),t=E.createElement("select").appendChild(E.createElement("option"));e.type="checkbox",y.checkOn=""!==e.value,y.optSelected=t.selected,(e=E.createElement("input")).value="t",e.type="radio",y.radioValue="t"===e.value}();var dt,gt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return q(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,r){var n,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?S.prop(e,t,r):(1===a&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?dt:void 0)),void 0!==r?null===r?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:(e.setAttribute(t,r+""),r):i&&"get"in i&&null!==(n=i.get(e,t))?n:null==(n=S.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&N(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}},removeAttr:function(e,t){var r,n=0,i=t&&t.match(U);if(i&&1===e.nodeType)for(;r=i[n++];)e.removeAttribute(r)}}),dt={set:function(e,t,r){return!1===t?S.removeAttr(e,r):e.setAttribute(r,r),r}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var r=gt[t]||S.find.attr;gt[t]=function(e,t,n){var i,a,o=t.toLowerCase();return n||(a=gt[o],gt[o]=i,i=null!=r(e,t,n)?o:null,gt[o]=a),i}}));var yt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function vt(e){return(e.match(U)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(U)||[]}S.fn.extend({prop:function(e,t){return q(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,r){var n,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,r,n,i,a,o,s,u=0;if(m(e))return this.each((function(t){S(this).addClass(e.call(this,t,Et(this)))}));if((t=Ct(e)).length)for(;r=this[u++];)if(i=Et(r),n=1===r.nodeType&&" "+vt(i)+" "){for(o=0;a=t[o++];)n.indexOf(" "+a+" ")<0&&(n+=a+" ");i!==(s=vt(n))&&r.setAttribute("class",s)}return this},removeClass:function(e){var t,r,n,i,a,o,s,u=0;if(m(e))return this.each((function(t){S(this).removeClass(e.call(this,t,Et(this)))}));if(!arguments.length)return this.attr("class","");if((t=Ct(e)).length)for(;r=this[u++];)if(i=Et(r),n=1===r.nodeType&&" "+vt(i)+" "){for(o=0;a=t[o++];)for(;n.indexOf(" "+a+" ")>-1;)n=n.replace(" "+a+" "," ");i!==(s=vt(n))&&r.setAttribute("class",s)}return this},toggleClass:function(e,t){var r=typeof e,n="string"===r||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):m(e)?this.each((function(r){S(this).toggleClass(e.call(this,r,Et(this),t),t)})):this.each((function(){var t,i,a,o;if(n)for(i=0,a=S(this),o=Ct(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==r||((t=Et(this))&&$.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":$.get(this,"__className__")||""))}))},hasClass:function(e){var t,r,n=0;for(t=" "+e+" ";r=this[n++];)if(1===r.nodeType&&(" "+vt(Et(r))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;S.fn.extend({val:function(e){var t,r,n,i=this[0];return arguments.length?(n=m(e),this.each((function(r){var i;1===this.nodeType&&(null==(i=n?e.call(this,r,S(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(i,"value"))?r:"string"==typeof(r=i.value)?r.replace(bt,""):null==r?"":r:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,r,n,i=e.options,a=e.selectedIndex,o="select-one"===e.type,s=o?null:[],u=o?a+1:i.length;for(n=a<0?u:o?a:0;n<u;n++)if(((r=i[n]).selected||n===a)&&!r.disabled&&(!r.parentNode.disabled||!N(r.parentNode,"optgroup"))){if(t=S(r).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var r,n,i=e.options,a=S.makeArray(t),o=i.length;o--;)((n=i[o]).selected=S.inArray(S.valHooks.option.get(n),a)>-1)&&(r=!0);return r||(e.selectedIndex=-1),a}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),y.focusin="onfocusin"in r;var Tt=/^(?:focusinfocus|focusoutblur)$/,St=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,i){var a,o,s,u,l,c,f,h,d=[n||E],g=p.call(e,"type")?e.type:e,y=p.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(y=g.split("."),g=y.shift(),y.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[S.expando]?e:new S.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),f=S.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!v(n)){for(u=f.delegateType||g,Tt.test(u+g)||(o=o.parentNode);o;o=o.parentNode)d.push(o),s=o;s===(n.ownerDocument||E)&&d.push(s.defaultView||s.parentWindow||r)}for(a=0;(o=d[a++])&&!e.isPropagationStopped();)h=o,e.type=a>1?u:f.bindType||g,(c=($.get(o,"events")||Object.create(null))[e.type]&&$.get(o,"handle"))&&c.apply(o,t),(c=l&&o[l])&&c.apply&&Y(o)&&(e.result=c.apply(o,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),t)||!Y(n)||l&&m(n[g])&&!v(n)&&((s=n[l])&&(n[l]=null),S.event.triggered=g,e.isPropagationStopped()&&h.addEventListener(g,St),n[g](),e.isPropagationStopped()&&h.removeEventListener(g,St),S.event.triggered=void 0,s&&(n[l]=s)),e.result}},simulate:function(e,t,r){var n=S.extend(new S.Event,r,{type:e,isSimulated:!0});S.event.trigger(n,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var r=this[0];if(r)return S.event.trigger(e,t,r,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var r=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,i=$.access(n,t);i||n.addEventListener(e,r,!0),$.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,i=$.access(n,t)-1;i?$.access(n,t,i):(n.removeEventListener(e,r,!0),$.remove(n,t))}}}));var At=r.location,_t={guid:Date.now()},It=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var wt=/\[\]$/,Bt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,r,n){var i;if(Array.isArray(t))S.each(t,(function(t,i){r||wt.test(e)?n(e,i):Dt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,n)}));else if(r||"object"!==T(t))n(e,t);else for(i in t)Dt(e+"["+i+"]",t[i],r,n)}S.param=function(e,t){var r,n=[],i=function(e,t){var r=m(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==r?"":r)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){i(this.name,this.value)}));else for(r in e)Dt(r,e[r],t,i);return n.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var r=S(this).val();return null==r?null:Array.isArray(r)?S.map(r,(function(e){return{name:t.name,value:e.replace(Bt,"\r\n")}})):{name:t.name,value:r.replace(Bt,"\r\n")}})).get()}});var Lt=/%20/g,Rt=/#.*$/,xt=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Ut=/^\/\//,Mt={},Vt={},jt="*/".concat("*"),Kt=E.createElement("a");function Ft(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var n,i=0,a=t.toLowerCase().match(U)||[];if(m(r))for(;n=a[i++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function Ht(e,t,r,n){var i={},a=e===Vt;function o(s){var u;return i[s]=!0,S.each(e[s]||[],(function(e,s){var l=s(t,r,n);return"string"!=typeof l||a||i[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)})),u}return o(t.dataTypes[0])||!i["*"]&&o("*")}function qt(e,t){var r,n,i=S.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&S.extend(!0,e,n),e}Kt.href=At.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,S.ajaxSettings),t):qt(S.ajaxSettings,e)},ajaxPrefilter:Ft(Mt),ajaxTransport:Ft(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,a,o,s,u,l,c,f,h,p=S.ajaxSetup({},t),d=p.context||p,g=p.context&&(d.nodeType||d.jquery)?S(d):S.event,y=S.Deferred(),m=S.Callbacks("once memory"),v=p.statusCode||{},C={},b={},T="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Ot.exec(a);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return null==l&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,C[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)A.always(e[A.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||T;return n&&n.abort(t),_(0,t),this}};if(y.promise(A),p.url=((e||p.url||At.href)+"").replace(Ut,At.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(U)||[""],null==p.crossDomain){u=E.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Kt.protocol+"//"+Kt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),Ht(Mt,p,t,A),l)return A;for(f in(c=S.event&&p.global)&&0==S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Pt.test(p.type),i=p.url.replace(Rt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Lt,"+")):(h=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(It.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(xt,"$1"),h=(It.test(i)?"&":"?")+"_="+_t.guid+++h),p.url=i+h),p.ifModified&&(S.lastModified[i]&&A.setRequestHeader("If-Modified-Since",S.lastModified[i]),S.etag[i]&&A.setRequestHeader("If-None-Match",S.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&A.setRequestHeader("Content-Type",p.contentType),A.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+jt+"; q=0.01":""):p.accepts["*"]),p.headers)A.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(d,A,p)||l))return A.abort();if(T="abort",m.add(p.complete),A.done(p.success),A.fail(p.error),n=Ht(Vt,p,t,A)){if(A.readyState=1,c&&g.trigger("ajaxSend",[A,p]),l)return A;p.async&&p.timeout>0&&(s=r.setTimeout((function(){A.abort("timeout")}),p.timeout));try{l=!1,n.send(C,_)}catch(e){if(l)throw e;_(-1,e)}}else _(-1,"No Transport");function _(e,t,o,u){var f,h,E,C,b,T=t;l||(l=!0,s&&r.clearTimeout(s),n=void 0,a=u||"",A.readyState=e>0?4:0,f=e>=200&&e<300||304===e,o&&(C=function(e,t,r){for(var n,i,a,o,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(i in s)if(s[i]&&s[i].test(n)){u.unshift(i);break}if(u[0]in r)a=u[0];else{for(i in r){if(!u[0]||e.converters[i+" "+u[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==u[0]&&u.unshift(a),r[a]}(p,A,o)),!f&&S.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),C=function(e,t,r,n){var i,a,o,s,u,l={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=c.shift();a;)if(e.responseFields[a]&&(r[e.responseFields[a]]=t),!u&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=a,a=c.shift())if("*"===a)a=u;else if("*"!==u&&u!==a){if(!(o=l[u+" "+a]||l["* "+a]))for(i in l)if((s=i.split(" "))[1]===a&&(o=l[u+" "+s[0]]||l["* "+s[0]])){!0===o?o=l[i]:!0!==l[i]&&(a=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+a}}}return{state:"success",data:t}}(p,C,A,f),f?(p.ifModified&&((b=A.getResponseHeader("Last-Modified"))&&(S.lastModified[i]=b),(b=A.getResponseHeader("etag"))&&(S.etag[i]=b)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=C.state,h=C.data,f=!(E=C.error))):(E=T,!e&&T||(T="error",e<0&&(e=0))),A.status=e,A.statusText=(t||T)+"",f?y.resolveWith(d,[h,T,A]):y.rejectWith(d,[A,T,E]),A.statusCode(v),v=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[A,p,f?h:E]),m.fireWith(d,[A,T]),c&&(g.trigger("ajaxComplete",[A,p]),--S.active||S.event.trigger("ajaxStop")))}return A},getJSON:function(e,t,r){return S.get(e,t,r,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],(function(e,t){S[t]=function(e,r,n,i){return m(r)&&(i=i||n,n=r,r=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:r,success:n},S.isPlainObject(e)&&e))}})),S.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),S._evalUrl=function(e,t,r){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,r)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(r){S(this).wrapAll(t?e.call(this,r):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Wt=S.ajaxSettings.xhr();y.cors=!!Wt&&"withCredentials"in Wt,y.ajax=Wt=!!Wt,S.ajaxTransport((function(e){var t,n;if(y.cors||Wt&&!e.crossDomain)return{send:function(i,a){var o,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];for(o in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(o,i[o]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),S.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),S.ajaxTransport("script",(function(e){var t,r;if(e.crossDomain||e.scriptAttrs)return{send:function(n,i){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove(),r=null,e&&i("error"===e.type?404:200,e.type)}),E.head.appendChild(t[0])},abort:function(){r&&r()}}}));var Qt,zt=[],Yt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+_t.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",(function(e,t,n){var i,a,o,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+i):!1!==e.jsonp&&(e.url+=(It.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||S.error(i+" was not called"),o[0]},e.dataTypes[0]="json",a=r[i],r[i]=function(){o=arguments},n.always((function(){void 0===a?S(r).removeProp(i):r[i]=a,e[i]&&(e.jsonpCallback=t.jsonpCallback,zt.push(i)),o&&m(a)&&a(o[0]),o=a=void 0})),"script"})),y.createHTMLDocument=((Qt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qt.childNodes.length),S.parseHTML=function(e,t,r){return"string"!=typeof e?[]:("boolean"==typeof t&&(r=t,t=!1),t||(y.createHTMLDocument?((n=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(n)):t=E),a=!r&&[],(i=k.exec(e))?[t.createElement(i[1])]:(i=Te([e],t,a),a&&a.length&&S(a).remove(),S.merge([],i.childNodes)));var n,i,a},S.fn.load=function(e,t,r){var n,i,a,o=this,s=e.indexOf(" ");return s>-1&&(n=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(r=t,t=void 0):t&&"object"==typeof t&&(i="POST"),o.length>0&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){a=arguments,o.html(n?S("<div>").append(S.parseHTML(e)).find(n):e)})).always(r&&function(e,t){o.each((function(){r.apply(this,a||[e.responseText,t,e])}))}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,(function(t){return e===t.elem})).length},S.offset={setOffset:function(e,t,r){var n,i,a,o,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),a=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&(a+u).indexOf("auto")>-1?(o=(n=c.position()).top,i=n.left):(o=parseFloat(a)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,r,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){S.offset.setOffset(this,e,t)}));var t,r,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),r=n.ownerDocument.defaultView,{top:t.top+r.pageYOffset,left:t.left+r.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,r,n=this[0],i={top:0,left:0};if("fixed"===S.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),r=n.ownerDocument,e=n.offsetParent||r.documentElement;e&&(e===r.body||e===r.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(n,"marginTop",!0),left:t.left-i.left-S.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ae}))}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var r="pageYOffset"===t;S.fn[e]=function(n){return q(this,(function(e,n,i){var a;if(v(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===i)return a?a[t]:e[n];a?a.scrollTo(r?a.pageXOffset:i,r?i:a.pageYOffset):e[n]=i}),e,n,arguments.length)}})),S.each(["top","left"],(function(e,t){S.cssHooks[t]=We(y.pixelPosition,(function(e,r){if(r)return r=Ge(e,t),Ke.test(r)?S(e).position()[t]+"px":r}))})),S.each({Height:"height",Width:"width"},(function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},(function(r,n){S.fn[n]=function(i,a){var o=arguments.length&&(r||"boolean"!=typeof i),s=r||(!0===i||!0===a?"margin":"border");return q(this,(function(t,r,i){var a;return v(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===i?S.css(t,r,s):S.style(t,r,i,s)}),t,o?i:void 0,o)}}))})),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){S.fn[t]=function(e){return this.on(t,e)}})),S.fn.extend({bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,n){return this.on(t,e,r,n)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){S.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}}));var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var r,n,i;if("string"==typeof t&&(r=e[t],t=e,e=r),m(e))return n=s.call(arguments,2),(i=function(){return e.apply(t||this,n.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=N,S.isFunction=m,S.isWindow=v,S.camelCase=z,S.type=T,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},void 0===(n=function(){return S}.apply(t,[]))||(e.exports=n);var $t=r.jQuery,Zt=r.$;return S.noConflict=function(e){return r.$===S&&(r.$=Zt),e&&r.jQuery===S&&(r.jQuery=$t),S},void 0===i&&(r.jQuery=r.$=S),S}))},function(e,t,r){var n=r(0);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(16),r(25),r(1),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){c||f();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return p(r._w,e,t,!1)},decrypt:function(e,t){return p(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i<t.length;++i)r.putByte(t[i])}}else r=n.util.createBuffer(r);if(!n.util.isArray(r)){t=r,r=[];var a=t.length();if(16===a||24===a||32===a){a>>>=2;for(i=0;i<a;++i)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.");var o=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(o);this._w=h(r,e.decrypt&&!s),this._init=!0}},n.aes._expandKey=function(e,t){return c||f(),h(e,t)},n.aes._updateBlock=p,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm);var a,o,s,u,l,c=!1;function f(){c=!0,s=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;a=new Array(256),o=new Array(256),u=new Array(4),l=new Array(4);for(t=0;t<4;++t)u[t]=new Array(256),l[t]=new Array(256);var r,n,i,f,h,p,d,g=0,y=0;for(t=0;t<256;++t){f=(f=y^y<<1^y<<2^y<<3^y<<4)>>8^255&f^99,a[g]=f,o[f]=g,p=(h=e[f])<<24^f<<16^f<<8^f^h,d=((r=e[g])^(n=e[r])^(i=e[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var m=0;m<4;++m)u[m][g]=p,l[m][f]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===g?g=y=1:(g=r^e[e[e[r^i]]],y^=e[e[y]])}}function h(e,t){for(var r,n=e.slice(0),i=1,o=n.length,u=4*(o+6+1),c=o;c<u;++c)r=n[c-1],c%o==0?(r=a[r>>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^s[i]<<24,i++):o>6&&c%o==4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),n[c]=n[c-o]^r;if(t){for(var f,h=l[0],p=l[1],d=l[2],g=l[3],y=n.slice(0),m=(c=0,(u=n.length)-4);c<u;c+=4,m-=4)if(0===c||c===u-4)y[c]=n[m],y[c+1]=n[m+3],y[c+2]=n[m+2],y[c+3]=n[m+1];else for(var v=0;v<4;++v)f=n[m+v],y[c+(3&-v)]=h[a[f>>>24]]^p[a[f>>>16&255]]^d[a[f>>>8&255]]^g[a[255&f]];n=y}return n}function p(e,t,r,n){var i,s,c,f,h,p,d,g,y,m,v,E,C=e.length/4-1;n?(i=l[0],s=l[1],c=l[2],f=l[3],h=o):(i=u[0],s=u[1],c=u[2],f=u[3],h=a),p=t[0]^e[0],d=t[n?3:1]^e[1],g=t[2]^e[2],y=t[n?1:3]^e[3];for(var b=3,T=1;T<C;++T)m=i[p>>>24]^s[d>>>16&255]^c[g>>>8&255]^f[255&y]^e[++b],v=i[d>>>24]^s[g>>>16&255]^c[y>>>8&255]^f[255&p]^e[++b],E=i[g>>>24]^s[y>>>16&255]^c[p>>>8&255]^f[255&d]^e[++b],y=i[y>>>24]^s[p>>>16&255]^c[d>>>8&255]^f[255&g]^e[++b],p=m,d=v,g=E;r[0]=h[p>>>24]<<24^h[d>>>16&255]<<16^h[g>>>8&255]<<8^h[255&y]^e[++b],r[n?3:1]=h[d>>>24]<<24^h[g>>>16&255]<<16^h[y>>>8&255]<<8^h[255&p]^e[++b],r[2]=h[g>>>24]<<24^h[y>>>16&255]<<16^h[p>>>8&255]<<8^h[255&d]^e[++b],r[n?1:3]=h[y>>>24]<<24^h[p>>>16&255]<<16^h[d>>>8&255]<<8^h[255&g]^e[++b]}function d(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(0);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function a(e,t){i[e]=t,i[t]=e}function o(e,t){i[e]=t}a("1.2.840.113549.1.1.1","rsaEncryption"),a("1.2.840.113549.1.1.4","md5WithRSAEncryption"),a("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),a("1.2.840.113549.1.1.7","RSAES-OAEP"),a("1.2.840.113549.1.1.8","mgf1"),a("1.2.840.113549.1.1.9","pSpecified"),a("1.2.840.113549.1.1.10","RSASSA-PSS"),a("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),a("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),a("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),a("1.3.101.112","EdDSA25519"),a("1.2.840.10040.4.3","dsa-with-sha1"),a("1.3.14.3.2.7","desCBC"),a("1.3.14.3.2.26","sha1"),a("2.16.840.1.101.3.4.2.1","sha256"),a("2.16.840.1.101.3.4.2.2","sha384"),a("2.16.840.1.101.3.4.2.3","sha512"),a("1.2.840.113549.2.5","md5"),a("1.2.840.113549.1.7.1","data"),a("1.2.840.113549.1.7.2","signedData"),a("1.2.840.113549.1.7.3","envelopedData"),a("1.2.840.113549.1.7.4","signedAndEnvelopedData"),a("1.2.840.113549.1.7.5","digestedData"),a("1.2.840.113549.1.7.6","encryptedData"),a("1.2.840.113549.1.9.1","emailAddress"),a("1.2.840.113549.1.9.2","unstructuredName"),a("1.2.840.113549.1.9.3","contentType"),a("1.2.840.113549.1.9.4","messageDigest"),a("1.2.840.113549.1.9.5","signingTime"),a("1.2.840.113549.1.9.6","counterSignature"),a("1.2.840.113549.1.9.7","challengePassword"),a("1.2.840.113549.1.9.8","unstructuredAddress"),a("1.2.840.113549.1.9.14","extensionRequest"),a("1.2.840.113549.1.9.20","friendlyName"),a("1.2.840.113549.1.9.21","localKeyId"),a("1.2.840.113549.1.9.22.1","x509Certificate"),a("1.2.840.113549.1.12.10.1.1","keyBag"),a("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),a("1.2.840.113549.1.12.10.1.3","certBag"),a("1.2.840.113549.1.12.10.1.4","crlBag"),a("1.2.840.113549.1.12.10.1.5","secretBag"),a("1.2.840.113549.1.12.10.1.6","safeContentsBag"),a("1.2.840.113549.1.5.13","pkcs5PBES2"),a("1.2.840.113549.1.5.12","pkcs5PBKDF2"),a("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),a("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),a("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),a("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),a("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),a("1.2.840.113549.2.7","hmacWithSHA1"),a("1.2.840.113549.2.8","hmacWithSHA224"),a("1.2.840.113549.2.9","hmacWithSHA256"),a("1.2.840.113549.2.10","hmacWithSHA384"),a("1.2.840.113549.2.11","hmacWithSHA512"),a("1.2.840.113549.3.7","des-EDE3-CBC"),a("2.16.840.1.101.3.4.1.2","aes128-CBC"),a("2.16.840.1.101.3.4.1.22","aes192-CBC"),a("2.16.840.1.101.3.4.1.42","aes256-CBC"),a("2.5.4.3","commonName"),a("2.5.4.5","serialName"),a("2.5.4.6","countryName"),a("2.5.4.7","localityName"),a("2.5.4.8","stateOrProvinceName"),a("2.5.4.9","streetAddress"),a("2.5.4.10","organizationName"),a("2.5.4.11","organizationalUnitName"),a("2.5.4.13","description"),a("2.5.4.15","businessCategory"),a("2.5.4.17","postalCode"),a("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),a("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),a("2.16.840.1.113730.1.1","nsCertType"),a("2.16.840.1.113730.1.13","nsComment"),o("2.5.29.1","authorityKeyIdentifier"),o("2.5.29.2","keyAttributes"),o("2.5.29.3","certificatePolicies"),o("2.5.29.4","keyUsageRestriction"),o("2.5.29.5","policyMapping"),o("2.5.29.6","subtreesConstraint"),o("2.5.29.7","subjectAltName"),o("2.5.29.8","issuerAltName"),o("2.5.29.9","subjectDirectoryAttributes"),o("2.5.29.10","basicConstraints"),o("2.5.29.11","nameConstraints"),o("2.5.29.12","policyConstraints"),o("2.5.29.13","basicConstraints"),a("2.5.29.14","subjectKeyIdentifier"),a("2.5.29.15","keyUsage"),o("2.5.29.16","privateKeyUsagePeriod"),a("2.5.29.17","subjectAltName"),a("2.5.29.18","issuerAltName"),a("2.5.29.19","basicConstraints"),o("2.5.29.20","cRLNumber"),o("2.5.29.21","cRLReason"),o("2.5.29.22","expirationDate"),o("2.5.29.23","instructionCode"),o("2.5.29.24","invalidityDate"),o("2.5.29.25","cRLDistributionPoints"),o("2.5.29.26","issuingDistributionPoint"),o("2.5.29.27","deltaCRLIndicator"),o("2.5.29.28","issuingDistributionPoint"),o("2.5.29.29","certificateIssuer"),o("2.5.29.30","nameConstraints"),a("2.5.29.31","cRLDistributionPoints"),a("2.5.29.32","certificatePolicies"),o("2.5.29.33","policyMappings"),o("2.5.29.34","policyConstraints"),a("2.5.29.35","authorityKeyIdentifier"),o("2.5.29.36","policyConstraints"),a("2.5.29.37","extKeyUsage"),o("2.5.29.46","freshestCRL"),o("2.5.29.54","inhibitAnyPolicy"),a("1.3.6.1.4.1.11129.2.4.2","timestampList"),a("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),a("1.3.6.1.5.5.7.3.1","serverAuth"),a("1.3.6.1.5.5.7.3.2","clientAuth"),a("1.3.6.1.5.5.7.3.3","codeSigning"),a("1.3.6.1.5.5.7.3.4","emailProtection"),a("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){var n=r(0);r(1);var i=e.exports=n.pem=n.pem||{};function a(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n));t+=r.join(",")+"\r\n";var a=0,o=-1;for(i=0;i<t.length;++i,++a)if(a>65&&-1!==o){var s=t[o];","===s?(++o,t=t.substr(0,o)+"\r\n "+t.substr(o)):t=t.substr(0,o)+"\r\n"+s+t.substr(o+1),a=i-o-1,o=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(o=i);return t}function o(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=a(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=a(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=a(r)),e.headers)for(var o=0;o<e.headers.length;++o)i+=a(e.headers[o]);return e.procType&&(i+="\r\n"),i+=n.util.encode64(e.body,t.maxline||64)+"\r\n",i+="-----END "+e.type+"-----\r\n"},i.decode=function(e){for(var t,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,a=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/;t=i.exec(e);){var u={type:t[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])};if(r.push(u),t[2]){for(var l=t[2].split(s),c=0;t&&c<l.length;){for(var f=l[c].replace(/\s+$/,""),h=c+1;h<l.length;++h){var p=l[h];if(!/\s/.test(p[0]))break;f+=p,c=h}if(t=f.match(a)){for(var d={name:t[1],values:[]},g=t[2].split(","),y=0;y<g.length;++y)d.values.push(o(g[y]));if(u.procType)if(u.contentDomain||"Content-Domain"!==d.name)if(u.dekInfo||"DEK-Info"!==d.name)u.headers.push(d);else{if(0===d.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:g[0],parameters:g[1]||null}}else u.contentDomain=g[0]||"";else{if("Proc-Type"!==d.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==d.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:g[0],type:g[1]}}}++c}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.");return r}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(0);r(4),r(1),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,a={start:function(a,o){if(null!==a)if("string"==typeof a){if(!((a=a.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+a+'"');t=n.md.algorithms[a].create()}else t=a;if(null===o)o=e;else{if("string"==typeof o)o=n.util.createBuffer(o);else if(n.util.isArray(o)){var s=o;o=n.util.createBuffer();for(var u=0;u<s.length;++u)o.putByte(s[u])}var l=o.length();l>t.blockLength&&(t.start(),t.update(o.bytes()),o=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),l=o.length();for(u=0;u<l;++u){s=o.at(u);r.putByte(54^s),i.putByte(92^s)}if(l<t.blockLength)for(s=t.blockLength-l,u=0;u<s;++u)r.putByte(54),i.putByte(92);e=o,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes();return t.start(),t.update(i),t.update(e),t.digest()}};return a.digest=a.getMac,a}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var u=a.length;i.messageLength+=u,u=[u/4294967296>>>0,u>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=u[1],u[1]=u[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,u[0]=u[1]/4294967296>>>0;return t.putBytes(a),s(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var u,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-l));for(var c=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)c+=(u=8*i.fullMessageLength[f+1])/4294967296>>>0,o.putInt32(c>>>0),c=u>>>0;o.putInt32(c);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};s(h,r,o);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p},i};var a=null,o=!1;function s(e,t,r){for(var n,i,a,o,s,u,l,c=r.length();c>=64;){for(i=e.h0,a=e.h1,o=e.h2,s=e.h3,u=e.h4,l=0;l<16;++l)n=r.getInt32(),t[l]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+u+1518500249+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;l<20;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(s^a&(o^s))+u+1518500249+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;l<32;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(a^o^s)+u+1859775393+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;l<40;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(a^o^s)+u+1859775393+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;l<60;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(a&o|s&(a^o))+u+2400959708+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;for(;l<80;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(a^o^s)+u+3395469782+n,u=s,s=o,o=(a<<30|a>>>2)>>>0,a=i,i=n;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+o|0,e.h3=e.h3+s|0,e.h4=e.h4+u|0,c-=64}}},function(e,t,r){"use strict";(function(e){var n=r(46),i=r(47),a=r(48);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,r)}function l(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|p(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):h(e,t);if("Buffer"===t.type&&a(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return j(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return w(this,t,r);case"latin1":case"binary":return B(this,t,r);case"base64":return _(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;a<s;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(l(e,a+h)!==l(t,h)){f=!1;break}if(f)return a}return-1}function E(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function C(e,t,r,n){return F(j(t,e.length-r),e,r,n)}function b(e,t,r,n){return F(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function T(e,t,r,n){return b(e,t,r,n)}function S(e,t,r,n){return F(K(t),e,r,n)}function A(e,t,r,n){return F(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function _(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return l(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return c(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f<s;++f)if(l[f]!==c[f]){a=l[f],o=c[f];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=V(e[a]);return i}function k(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function x(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function O(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,a){return a||O(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,a){return a||O(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||D(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||L(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||L(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=u.isBuffer(e)?e:j(new u(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function K(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(9))},function(e,t,r){var n=r(0);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(16),r(25),r(1),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=d({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return d({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return p(r._keys,e,t,!1)},decrypt:function(e,t){return p(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],o=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],c=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],p=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],d=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],g=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length()>8?3:1,m=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],E=0,C=0;C<y;C++){var b=e.getInt32(),T=e.getInt32();b^=(t=252645135&(b>>>4^T))<<4,b^=t=65535&((T^=t)>>>-16^b),b^=(t=858993459&(b>>>2^(T^=t<<-16)))<<2,b^=t=65535&((T^=t)>>>-16^b),b^=(t=1431655765&(b>>>1^(T^=t<<-16)))<<1,b^=t=16711935&((T^=t)>>>8^b),t=(b^=(t=1431655765&(b>>>1^(T^=t<<8)))<<1)<<8|(T^=t)>>>20&240,b=T<<24|T<<8&16711680|T>>>8&65280|T>>>24&240,T=t;for(var S=0;S<v.length;++S){v[S]?(b=b<<2|b>>>26,T=T<<2|T>>>26):(b=b<<1|b>>>27,T=T<<1|T>>>27);var A=r[(b&=-15)>>>28]|n[b>>>24&15]|i[b>>>20&15]|a[b>>>16&15]|o[b>>>12&15]|s[b>>>8&15]|u[b>>>4&15],_=l[(T&=-15)>>>28]|c[T>>>24&15]|f[T>>>20&15]|h[T>>>16&15]|p[T>>>12&15]|d[T>>>8&15]|g[T>>>4&15];t=65535&(_>>>16^A),m[E++]=A^t,m[E++]=_^t<<16}}return m}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var a=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],o=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],s=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],l=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],c=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(e,t,r,n){var i,p,d=32===e.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=t[0],y=t[1];g^=(p=252645135&(g>>>4^y))<<4,g^=(p=65535&(g>>>16^(y^=p)))<<16,g^=p=858993459&((y^=p)>>>2^g),g^=p=16711935&((y^=p<<2)>>>8^g),g=(g^=(p=1431655765&(g>>>1^(y^=p<<8)))<<1)<<1|g>>>31,y=(y^=p)<<1|y>>>31;for(var m=0;m<d;m+=3){for(var v=i[m+1],E=i[m+2],C=i[m];C!=v;C+=E){var b=y^e[C],T=(y>>>4|y<<28)^e[C+1];p=g,g=y,y=p^(o[b>>>24&63]|u[b>>>16&63]|c[b>>>8&63]|h[63&b]|a[T>>>24&63]|s[T>>>16&63]|l[T>>>8&63]|f[63&T])}p=g,g=y,y=p}y=y>>>1|y<<31,y^=p=1431655765&((g=g>>>1|g<<31)>>>1^y),y^=(p=16711935&(y>>>8^(g^=p<<1)))<<8,y^=(p=858993459&(y>>>2^(g^=p)))<<2,y^=p=65535&((g^=p)>>>16^y),y^=p=252645135&((g^=p<<16)>>>4^y),g^=p<<4,r[0]=g,r[1]=y}function d(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(0);if(r(2),r(15),r(7),r(31),r(32),r(3),r(1),void 0===i)var i=n.jsbn.BigInteger;var a=n.util.isNodejs?r(21):null,o=n.asn1,s=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,l=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},f={name:"RSAPrivateKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},h={name:"RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},p=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},d=function(e){var t;if(!(e.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=u.oids[e.algorithm];var n=o.oidToDer(t).getBytes(),i=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]);a.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,n)),a.value.push(o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,""));var s=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(a),i.value.push(s),o.toDer(i).getBytes()},g=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);var a;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{a=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(a.compareTo(t.n)>=0||!a.gcd(t.n).equals(i.ONE));for(var o=(e=e.multiply(a.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);o.compareTo(s)<0;)o=o.add(t.p);var u=o.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return u=u.multiply(a.modInverse(t.n)).mod(t.n)};function y(e,t,r){var i=n.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=e.length,o.max=a-11,o}i.putByte(0),i.putByte(r);var s,u=a-3-e.length;if(0===r||1===r){s=0===r?0:255;for(var l=0;l<u;++l)i.putByte(s)}else for(;u>0;){var c=0,f=n.random.getBytes(u);for(l=0;l<u;++l)0===(s=f.charCodeAt(l))?++c:i.putByte(s);u=c}return i.putByte(0),i.putBytes(e),i}function m(e,t,r,i){var a=Math.ceil(t.n.bitLength()/8),o=n.util.createBuffer(e),s=o.getByte(),u=o.getByte();if(0!==s||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&void 0===i)throw new Error("Encryption block is invalid.");var l=0;if(0===u){l=a-3-i;for(var c=0;c<l;++c)if(0!==o.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(l=0;o.length()>1;){if(255!==o.getByte()){--o.read;break}++l}else if(2===u)for(l=0;o.length()>1;){if(0===o.getByte()){--o.read;break}++l}if(0!==o.getByte()||l!==a-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}function v(e,t,r){"function"==typeof t&&(r=t,t={});var a={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function o(){s(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?l(t,e.q):void s(e.qBits,l))}))}function s(e,t){n.prime.generateProbablePrime(e,a,t)}function l(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var a=e.p;e.p=e.q,e.q=a}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void o();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void s(e.qBits,l);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void o();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void s(e.qBits,l);var c=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(a.prng=t.prng),o()}function E(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function C(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function b(e){return n.util.isNodejs&&"function"==typeof a[e]}function T(e){return void 0!==s.globalScope&&"object"==typeof s.globalScope.crypto&&"object"==typeof s.globalScope.crypto.subtle&&"function"==typeof s.globalScope.crypto.subtle[e]}function S(e){return void 0!==s.globalScope&&"object"==typeof s.globalScope.msCrypto&&"object"==typeof s.globalScope.msCrypto.subtle&&"function"==typeof s.globalScope.msCrypto.subtle[e]}function A(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}u.rsa.encrypt=function(e,t,r){var a,o=r,s=Math.ceil(t.n.bitLength()/8);!1!==r&&!0!==r?(o=2===r,a=y(e,t,r)):(a=n.util.createBuffer()).putBytes(e);for(var u=new i(a.toHex(),16),l=g(u,t,o).toString(16),c=n.util.createBuffer(),f=s-Math.ceil(l.length/2);f>0;)c.putByte(0),--f;return c.putBytes(n.util.hexToBytes(l)),c.getBytes()},u.rsa.decrypt=function(e,t,r,a){var o=Math.ceil(t.n.bitLength()/8);if(e.length!==o){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=o,s}var u=new i(n.util.createBuffer(e).toHex(),16);if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=g(u,t,r).toString(16),c=n.util.createBuffer(),f=o-Math.ceil(l.length/2);f>0;)c.putByte(0),--f;return c.putBytes(n.util.hexToBytes(l)),!1!==a?m(c.getBytes(),t,r):c.getBytes()},u.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var a,o=(r=r||{}).prng||n.random,s={nextBytes:function(e){for(var t=o.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},u=r.algorithm||"PRIMEINC";if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u);return(a={algorithm:u,state:0,bits:e,rng:s,eInt:t||65537,e:new i(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},u.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,a=0,o=function(e,t){return e|t},s=+new Date,c=0;null===e.keys&&(t<=0||c<t);){if(0===e.state){var f=null===e.p?e.pBits:e.qBits,h=f-1;0===e.pqState?(e.num=new i(f,e.rng),e.num.testBit(h)||e.num.bitwiseTo(i.ONE.shiftLeft(h),o,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),a=0,++e.pqState):1===e.pqState?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(C(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(l[a++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var p=e.e.modInverse(e.phi);e.keys={privateKey:u.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:u.rsa.setPublicKey(e.n,e.e)}}c+=(n=+new Date)-s,s=n}return null!==e.keys},u.rsa.generateKeyPair=function(e,t,r,i){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(i=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(i=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(i){if(b("generateKeyPair"))return a.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return i(e);i(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(t)})}));if(T("generateKey")&&T("exportKey"))return s.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return s.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var t=u.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(e)));i(null,{privateKey:t,publicKey:u.setRsaPublicKey(t.n,t.e)})}}));if(S("generateKey")&&S("exportKey")){var l=s.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:A(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return l.oncomplete=function(e){var t=e.target.result,r=s.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=u.privateKeyFromAsn1(o.fromDer(n.util.createBuffer(t)));i(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){i(e)}},void(l.onerror=function(e){i(e)})}}else if(b("generateKeyPairSync")){var c=a.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(c.privateKey),publicKey:u.publicKeyFromPem(c.publicKey)}}var f=u.rsa.createKeyPairGenerationState(e,t,r);if(!i)return u.rsa.stepKeyPairGenerationState(f,0),f.keys;v(f,r,i)},u.setRsaPublicKey=u.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return y(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var a=t.encode(e,r,!0);return u.rsa.encrypt(a,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=m(t,r,!0),e===o.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=m(t,r,!0))}});var i=u.rsa.decrypt(t,r,!0,!1);return n.verify(e,i,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(e,t,r,i,a,o,s,l){var c={n:e,e:t,d:r,p:i,q:a,dP:o,dQ:s,qInv:l,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=u.rsa.decrypt(e,c,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:m};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,c,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:d},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,c.n.bitLength());return u.rsa.encrypt(n,c,r)}};return c},u.wrapRsaPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(u.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,o.toDer(e).getBytes())])},u.privateKeyFromAsn1=function(e){var t,r,a,s,l,h,p,d,g={},y=[];if(o.validate(e,c,g,y)&&(e=o.fromDer(n.util.createBuffer(g.privateKey))),g={},y=[],!o.validate(e,f,g,y)){var m=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw m.errors=y,m}return t=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),s=n.util.createBuffer(g.privateKeyPrime1).toHex(),l=n.util.createBuffer(g.privateKeyPrime2).toHex(),h=n.util.createBuffer(g.privateKeyExponent1).toHex(),p=n.util.createBuffer(g.privateKeyExponent2).toHex(),d=n.util.createBuffer(g.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new i(t,16),new i(r,16),new i(a,16),new i(s,16),new i(l,16),new i(h,16),new i(p,16),new i(d,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(0).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.e)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.d)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.p)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.q)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.dP)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.dQ)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.qInv))])},u.publicKeyFromAsn1=function(e){var t={},r=[];if(o.validate(e,p,t,r)){var a,s=o.derToOid(t.publicKeyOid);if(s!==u.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=s,a;e=t.rsaPublicKey}if(r=[],!o.validate(e,h,t,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var l=n.util.createBuffer(t.publicKeyModulus).toHex(),c=n.util.createBuffer(t.publicKeyExponent).toHex();return u.setRsaPublicKey(new i(l,16),new i(c,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(u.oids.rsaEncryption).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(e)])])},u.publicKeyToRSAPublicKey=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.n)),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,E(e.e))])}},function(e,t,r){var n,i=r(0);e.exports=i.jsbn=i.jsbn||{};function a(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function o(){return new a(null)}function s(e,t,r,n,i,a){for(var o=16383&t,s=t>>14;--a>=0;){var u=16383&this.data[e],l=this.data[e++]>>14,c=s*u+l*o;i=((u=o*u+((16383&c)<<14)+r.data[n]+i)>>28)+(c>>14)+s*l,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(e,t,r,n,i,a){for(var o=32767&t,s=t>>15;--a>=0;){var u=32767&this.data[e],l=this.data[e++]>>15,c=s*u+l*o;i=((u=o*u+((32767&c)<<15)+r.data[n]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(a.prototype.am=function(e,t,r,n,i,a){for(;--a>=0;){var o=t*this.data[e++]+r.data[n]+i;i=Math.floor(o/67108864),r.data[n++]=67108863&o}return i},n=26):(a.prototype.am=s,n=28),a.prototype.DB=n,a.prototype.DM=(1<<n)-1,a.prototype.DV=1<<n;a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-n,a.prototype.F2=2*n-52;var u,l,c=new Array;for(u="0".charCodeAt(0),l=0;l<=9;++l)c[u++]=l;for(u="a".charCodeAt(0),l=10;l<36;++l)c[u++]=l;for(u="A".charCodeAt(0),l=10;l<36;++l)c[u++]=l;function f(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function h(e,t){var r=c[e.charCodeAt(t)];return null==r?-1:r}function p(e){var t=o();return t.fromInt(e),t}function d(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function y(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function m(e,t){return e&t}function v(e,t){return e|t}function E(e,t){return e^t}function C(e,t){return e&~t}function b(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function T(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function S(){}function A(e){return e}function _(e){this.r2=o(),this.q3=o(),a.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},y.prototype.convert=function(e){var t=o();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(a.ZERO)>0&&this.m.subTo(t,t),t},y.prototype.revert=function(e){var t=o();return e.copyTo(t),this.reduce(t),t},y.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},a.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},a.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},a.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,o=0;--n>=0;){var s=8==r?255&e[n]:h(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this.data[this.t++]=s:o+r>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this.data[this.t++]=s>>this.DB-o):this.data[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},a.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s},a.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s},a.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,a=(1<<i)-1,o=Math.floor(e/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t.data[r+o+1]=this.data[r]>>i|s,s=(this.data[r]&a)<<n;for(r=o-1;r>=0;--r)t.data[r]=0;t.data[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()},a.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,a=(1<<n)-1;t.data[0]=this.data[r]>>n;for(var o=r+1;o<this.t;++o)t.data[o-r-1]|=(this.data[o]&a)<<i,t.data[o-r]=this.data[o]>>n;n>0&&(t.data[this.t-r-1]|=(this.s&a)<<i),t.t=this.t-r,t.clamp()}},a.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},a.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t.data[i]=0;for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&a.ZERO.subTo(t,t)},a.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},a.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=o());var s=o(),u=this.s,l=e.s,c=this.DB-d(n.data[n.t-1]);c>0?(n.lShiftTo(c,s),i.lShiftTo(c,r)):(n.copyTo(s),i.copyTo(r));var f=s.t,h=s.data[f-1];if(0!=h){var p=h*(1<<this.F1)+(f>1?s.data[f-2]>>this.F2:0),g=this.FV/p,y=(1<<this.F1)/p,m=1<<this.F2,v=r.t,E=v-f,C=null==t?o():t;for(s.dlShiftTo(E,C),r.compareTo(C)>=0&&(r.data[r.t++]=1,r.subTo(C,r)),a.ONE.dlShiftTo(f,C),C.subTo(s,s);s.t<f;)s.data[s.t++]=0;for(;--E>=0;){var b=r.data[--v]==h?this.DM:Math.floor(r.data[v]*g+(r.data[v-1]+m)*y);if((r.data[v]+=s.am(0,b,r,E,0,f))<b)for(s.dlShiftTo(E,C),r.subTo(C,r);r.data[v]<--b;)r.subTo(C,r)}null!=t&&(r.drShiftTo(f,t),u!=l&&a.ZERO.subTo(t,t)),r.t=f,r.clamp(),c>0&&r.rShiftTo(c,r),u<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(e,t){if(e>4294967295||e<1)return a.ONE;var r=o(),n=o(),i=t.convert(this),s=d(e)-1;for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<<s)>0)t.mulTo(n,i,r);else{var u=r;r=n,n=u}return t.revert(r)},a.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,a="",o=this.t,s=this.DB-o*this.DB%t;if(o-- >0)for(s<this.DB&&(r=this.data[o]>>s)>0&&(i=!0,a=f(r));o>=0;)s<t?(r=(this.data[o]&(1<<s)-1)<<t-s,r|=this.data[--o]>>(s+=this.DB-t)):(r=this.data[o]>>(s-=t)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=f(r));return i?a:"0"},a.prototype.negate=function(){var e=o();return a.ZERO.subTo(this,e),e},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(e){var t=o();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(a.ZERO)>0&&e.subTo(t,t),t},a.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new y(t),this.exp(e,r)},a.ZERO=p(0),a.ONE=p(1),S.prototype.convert=A,S.prototype.revert=A,S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},S.prototype.sqrTo=function(e,t){e.squareTo(t)},_.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=o();return e.copyTo(t),this.reduce(t),t},_.prototype.revert=function(e){return e},_.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},_.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},_.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var I=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],w=(1<<26)/I[I.length-1];a.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},a.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=p(r),i=o(),a=o(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(e)+s},a.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,o=0,s=0,u=0;u<e.length;++u){var l=h(e,u);l<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(s=t*s+l,++o>=r&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(a.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(a.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},a.prototype.bitwiseTo=function(e,t,r){var n,i,a=Math.min(e.t,this.t);for(n=0;n<a;++n)r.data[n]=t(this.data[n],e.data[n]);if(e.t<this.t){for(i=e.s&this.DM,n=a;n<this.t;++n)r.data[n]=t(this.data[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=a;n<e.t;++n)r.data[n]=t(i,e.data[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},a.prototype.changeBit=function(e,t){var r=a.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r},a.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},a.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},a.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()},a.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},a.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},a.prototype.millerRabin=function(e){var t=this.subtract(a.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),o={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},s=0;s<e;++s){do{n=new a(this.bitLength(),o)}while(n.compareTo(a.ONE)<=0||n.compareTo(t)>=0);var u=n.modPow(i,this);if(0!=u.compareTo(a.ONE)&&0!=u.compareTo(t)){for(var l=1;l++<r&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=u.compareTo(t))return!1}}return!0},a.prototype.clone=function(){var e=o();return this.copyTo(e),e},a.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},a.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},a.prototype.equals=function(e){return 0==this.compareTo(e)},a.prototype.min=function(e){return this.compareTo(e)<0?this:e},a.prototype.max=function(e){return this.compareTo(e)>0?this:e},a.prototype.and=function(e){var t=o();return this.bitwiseTo(e,m,t),t},a.prototype.or=function(e){var t=o();return this.bitwiseTo(e,v,t),t},a.prototype.xor=function(e){var t=o();return this.bitwiseTo(e,E,t),t},a.prototype.andNot=function(e){var t=o();return this.bitwiseTo(e,C,t),t},a.prototype.not=function(){for(var e=o(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e},a.prototype.shiftLeft=function(e){var t=o();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},a.prototype.shiftRight=function(e){var t=o();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},a.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+b(this.data[e]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=T(this.data[r]^t);return e},a.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},a.prototype.setBit=function(e){return this.changeBit(e,v)},a.prototype.clearBit=function(e){return this.changeBit(e,C)},a.prototype.flipBit=function(e){return this.changeBit(e,E)},a.prototype.add=function(e){var t=o();return this.addTo(e,t),t},a.prototype.subtract=function(e){var t=o();return this.subTo(e,t),t},a.prototype.multiply=function(e){var t=o();return this.multiplyTo(e,t),t},a.prototype.divide=function(e){var t=o();return this.divRemTo(e,t,null),t},a.prototype.remainder=function(e){var t=o();return this.divRemTo(e,null,t),t},a.prototype.divideAndRemainder=function(e){var t=o(),r=o();return this.divRemTo(e,t,r),new Array(t,r)},a.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),a=p(1);if(i<=0)return a;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new g(t):t.isEven()?new _(t):new y(t);var s=new Array,u=3,l=r-1,c=(1<<r)-1;if(s[1]=n.convert(this),r>1){var f=o();for(n.sqrTo(s[1],f);u<=c;)s[u]=o(),n.mulTo(f,s[u-2],s[u]),u+=2}var h,m,v=e.t-1,E=!0,C=o();for(i=d(e.data[v])-1;v>=0;){for(i>=l?h=e.data[v]>>i-l&c:(h=(e.data[v]&(1<<i+1)-1)<<l-i,v>0&&(h|=e.data[v-1]>>this.DB+i-l)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--v),E)s[h].copyTo(a),E=!1;else{for(;u>1;)n.sqrTo(a,C),n.sqrTo(C,a),u-=2;u>0?n.sqrTo(a,C):(m=a,a=C,C=m),n.mulTo(C,s[h],a)}for(;v>=0&&0==(e.data[v]&1<<i);)n.sqrTo(a,C),m=a,a=C,C=m,--i<0&&(i=this.DB-1,--v)}return n.revert(a)},a.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return a.ZERO;for(var r=e.clone(),n=this.clone(),i=p(1),o=p(0),s=p(0),u=p(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;n.isEven();)n.rShiftTo(1,n),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(s,i),o.subTo(u,o)):(n.subTo(r,n),t&&s.subTo(i,s),u.subTo(o,u))}return 0!=n.compareTo(a.ONE)?a.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},a.prototype.pow=function(e){return this.exp(e,new S)},a.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=I[I.length-1]){for(t=0;t<I.length;++t)if(r.data[0]==I[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<I.length;){for(var n=I[t],i=t+1;i<I.length&&n<w;)n*=I[i++];for(n=r.modInt(n);t<i;)if(n%I[t++]==0)return!1}return r.millerRabin(e)}},function(e,t,r){var n=r(0);r(1),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};i.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t){var r,n,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u&&u[f].run();f=-1,t=l.length}u=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new d(e,t)),1!==l.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){l||function(){a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],s=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64);for(var e=0;e<64;++e)u[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));l=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=s[1],s[1]=s[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-s));for(var u,l=0,f=i.fullMessageLength.length-1;f>=0;--f)l=(u=8*i.fullMessageLength[f]+l)/4294967296>>>0,o.putInt32Le(u>>>0);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};c(h,r,o);var p=n.util.createBuffer();return p.putInt32Le(h.h0),p.putInt32Le(h.h1),p.putInt32Le(h.h2),p.putInt32Le(h.h3),p},i};var a=null,o=null,s=null,u=null,l=!1;function c(e,t,r){for(var n,i,a,l,c,f,h,p=r.length();p>=64;){for(i=e.h0,a=e.h1,l=e.h2,c=e.h3,h=0;h<16;++h)t[h]=r.getInt32Le(),n=i+(c^a&(l^c))+u[h]+t[h],i=c,c=l,l=a,a+=n<<(f=s[h])|n>>>32-f;for(;h<32;++h)n=i+(l^c&(a^l))+u[h]+t[o[h]],i=c,c=l,l=a,a+=n<<(f=s[h])|n>>>32-f;for(;h<48;++h)n=i+(a^l^c)+u[h]+t[o[h]],i=c,c=l,l=a,a+=n<<(f=s[h])|n>>>32-f;for(;h<64;++h)n=i+(l^(a|~c))+u[h]+t[o[h]],i=c,c=l,l=a,a+=n<<(f=s[h])|n>>>32-f;e.h0=e.h0+i|0,e.h1=e.h1+a|0,e.h2=e.h2+l|0,e.h3=e.h3+c|0,p-=64}}},function(e,t,r){var n=r(0);r(2),r(7),r(27),r(8),r(20),r(22),r(24),r(14),r(1),r(23);var i=n.asn1,a=e.exports=n.pki=n.pki||{};a.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},a.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.privateKeyFromAsn1(o)},a.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:i.toDer(a.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},function(e,t,r){(function(t){var n=r(0);r(10),r(4),r(1);var i,a=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(21)),e.exports=n.pbkdf2=a.pbkdf2=function(e,r,a,o,s,u){if("function"==typeof s&&(u=s,s=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!=typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),e=t.from(e,"binary"),r=t.from(r,"binary"),u?4===i.pbkdf2Sync.length?i.pbkdf2(e,r,a,o,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):i.pbkdf2(e,r,a,o,s,(function(e,t){if(e)return u(e);u(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,r,a,o).toString("binary"):i.pbkdf2Sync(e,r,a,o,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in n.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=n.md[s].create()}var l=s.digestLength;if(o>4294967295*l){var c=new Error("Derived key is too long.");if(u)return u(c);throw c}var f=Math.ceil(o/l),h=o-(f-1)*l,p=n.hmac.create();p.start(s,e);var d,g,y,m="";if(!u){for(var v=1;v<=f;++v){p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=y=p.digest().getBytes();for(var E=2;E<=a;++E)p.start(null,null),p.update(y),g=p.digest().getBytes(),d=n.util.xorBytes(d,g,l),y=g;m+=v<f?d:d.substr(0,h)}return m}v=1;function C(){if(v>f)return u(null,m);p.start(null,null),p.update(r),p.update(n.util.int32ToBytes(v)),d=y=p.digest().getBytes(),E=2,b()}function b(){if(E<=a)return p.start(null,null),p.update(y),g=p.digest().getBytes(),d=n.util.xorBytes(d,g,l),y=g,++E,n.util.setImmediate(b);m+=v<f?d:d.substr(0,h),++v,C()}C()}}).call(this,r(12).Buffer)},function(e,t){},function(e,t,r){var n=r(0);r(2),r(10),r(7),r(33),r(27),r(3),r(14),r(11),r(1),r(23);var i=n.asn1,a=n.pki,o=e.exports=n.pkcs12=n.pkcs12||{},s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},u={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},s,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},l={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},c={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},f={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function h(e,t,r,n){for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].safeBags.length;o++){var s=e[a].safeBags[o];void 0!==n&&s.type!==n||(null!==t?void 0!==s.attributes[t]&&s.attributes[t].indexOf(r)>=0&&i.push(s):i.push(s))}return i}function p(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function d(e,t){var r={},o=[];if(!i.validate(e,n.pkcs7.asn1.encryptedDataValidator,r,o))throw(s=new Error("Cannot read EncryptedContentInfo.")).errors=o,s;var s,u=i.derToOid(r.contentType);if(u!==a.oids.data)throw(s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=u,s;u=i.derToOid(r.encAlgorithm);var l=a.pbe.getCipher(u,r.encParameter,t),c=p(r.encryptedContentAsn1),f=n.util.createBuffer(c.value);if(l.update(f),!l.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return l.output.getBytes()}function g(e,t,r){if(!t&&0===e.length)return[];if((e=i.fromDer(e,t)).tagClass!==i.Class.UNIVERSAL||e.type!==i.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],o=0;o<e.value.length;o++){var s=e.value[o],u={},c=[];if(!i.validate(s,l,u,c))throw(m=new Error("Cannot read SafeBag.")).errors=c,m;var h,p,d={type:i.derToOid(u.bagId),attributes:y(u.bagAttributes)};n.push(d);var g=u.bagValue.value[0];switch(d.type){case a.oids.pkcs8ShroudedKeyBag:if(null===(g=a.decryptPrivateKeyInfo(g,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case a.oids.keyBag:try{d.key=a.privateKeyFromAsn1(g)}catch(e){d.key=null,d.asn1=g}continue;case a.oids.certBag:h=f,p=function(){if(i.derToOid(u.certId)!==a.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.");throw e.oid=i.derToOid(u.certId),e}var r=i.fromDer(u.cert,t);try{d.cert=a.certificateFromAsn1(r,!0)}catch(e){d.cert=null,d.asn1=r}};break;default:var m;throw(m=new Error("Unsupported PKCS#12 SafeBag type.")).oid=d.type,m}if(void 0!==h&&!i.validate(g,h,u,c))throw(m=new Error("Cannot read PKCS#12 "+h.name)).errors=c,m;p()}return n}function y(e){var t={};if(void 0!==e)for(var r=0;r<e.length;++r){var n={},o=[];if(!i.validate(e[r],c,n,o)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=o,s}var u=i.derToOid(n.oid);if(void 0!==a.oids[u]){t[a.oids[u]]=[];for(var l=0;l<n.values.length;++l)t[a.oids[u]].push(n.values[l].value)}}return t}o.pkcs12FromAsn1=function(e,t,r){"string"==typeof t?(r=t,t=!0):void 0===t&&(t=!0);var l={};if(!i.validate(e,u,l,[]))throw(c=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=c,c;var c,f={version:l.version.charCodeAt(0),safeContents:[],getBags:function(e){var t,r={};return"localKeyId"in e?t=e.localKeyId:"localKeyIdHex"in e&&(t=n.util.hexToBytes(e.localKeyIdHex)),void 0===t&&!("friendlyName"in e)&&"bagType"in e&&(r[e.bagType]=h(f.safeContents,null,null,e.bagType)),void 0!==t&&(r.localKeyId=h(f.safeContents,"localKeyId",t,e.bagType)),"friendlyName"in e&&(r.friendlyName=h(f.safeContents,"friendlyName",e.friendlyName,e.bagType)),r},getBagsByFriendlyName:function(e,t){return h(f.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return h(f.safeContents,"localKeyId",e,t)}};if(3!==l.version.charCodeAt(0))throw(c=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=l.version.charCodeAt(0),c;if(i.derToOid(l.contentType)!==a.oids.data)throw(c=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=i.derToOid(l.contentType),c;var y=l.content.value[0];if(y.tagClass!==i.Class.UNIVERSAL||y.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(y=p(y),l.mac){var m=null,v=0,E=i.derToOid(l.macAlgorithm);switch(E){case a.oids.sha1:m=n.md.sha1.create(),v=20;break;case a.oids.sha256:m=n.md.sha256.create(),v=32;break;case a.oids.sha384:m=n.md.sha384.create(),v=48;break;case a.oids.sha512:m=n.md.sha512.create(),v=64;break;case a.oids.md5:m=n.md.md5.create(),v=16}if(null===m)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+E);var C=new n.util.ByteBuffer(l.macSalt),b="macIterations"in l?parseInt(n.util.bytesToHex(l.macIterations),16):1,T=o.generateKey(r,C,3,b,v,m),S=n.hmac.create();if(S.start(m,T),S.update(y.value),S.getMac().getBytes()!==l.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(e,t,r,n){if((t=i.fromDer(t,r)).tagClass!==i.Class.UNIVERSAL||t.type!==i.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var o=0;o<t.value.length;o++){var u=t.value[o],l={},c=[];if(!i.validate(u,s,l,c))throw(m=new Error("Cannot read ContentInfo.")).errors=c,m;var f={encrypted:!1},h=null,y=l.content.value[0];switch(i.derToOid(l.contentType)){case a.oids.data:if(y.tagClass!==i.Class.UNIVERSAL||y.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=p(y).value;break;case a.oids.encryptedData:h=d(y,n),f.encrypted=!0;break;default:var m;throw(m=new Error("Unsupported PKCS#12 contentType.")).contentType=i.derToOid(l.contentType),m}f.safeBags=g(h,r,n),e.safeContents.push(f)}}(f,y.value,t,r),f},o.toPkcs12Asn1=function(e,t,r,s){(s=s||{}).saltSize=s.saltSize||8,s.count=s.count||2048,s.algorithm=s.algorithm||s.encAlgorithm||"aes128","useMac"in s||(s.useMac=!0),"localKeyId"in s||(s.localKeyId=null),"generateLocalKeyId"in s||(s.generateLocalKeyId=!0);var u,l=s.localKeyId;if(null!==l)l=n.util.hexToBytes(l);else if(s.generateLocalKeyId)if(t){var c=n.util.isArray(t)?t[0]:t;"string"==typeof c&&(c=a.certificateFromPem(c)),(w=n.md.sha1.create()).update(i.toDer(a.certificateToAsn1(c)).getBytes()),l=w.digest().getBytes()}else l=n.random.getBytes(20);var f=[];null!==l&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.localKeyId).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,l)])])),"friendlyName"in s&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.friendlyName).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.BMPSTRING,!1,s.friendlyName)])])),f.length>0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,f));var h=[],p=[];null!==t&&(p=n.util.isArray(t)?t:[t]);for(var d=[],g=0;g<p.length;++g){"string"==typeof(t=p[g])&&(t=a.certificateFromPem(t));var y=0===g?u:void 0,m=a.certificateToAsn1(t),v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.certBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.x509Certificate).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(m).getBytes())])])]),y]);d.push(v)}if(d.length>0){var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]);h.push(C)}var b=null;if(null!==e){var T=a.wrapRsaPrivateKey(a.privateKeyToAsn1(e));b=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[T]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(T,r,s)]),u]);var S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[b]),A=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(S).getBytes())])]);h.push(A)}var _,I=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h);if(s.useMac){var w=n.md.sha1.create(),B=new n.util.ByteBuffer(n.random.getBytes(s.saltSize)),N=s.count,k=(e=o.generateKey(r,B,3,N,20),n.hmac.create());k.start(w,e),k.update(i.toDer(I).getBytes());var D=k.getMac();_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,D.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,B.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(N).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(I).getBytes())])]),_])},o.generateKey=n.pbe.generatePkcs12Key},function(e,t,r){var n=r(0);r(6),r(2),r(13),r(4),r(51),r(7),r(8),r(24),r(14),r(1);var i=n.asn1,a=e.exports=n.pki=n.pki||{},o=a.oids,s={};s.CN=o.commonName,s.commonName="CN",s.C=o.countryName,s.countryName="C",s.L=o.localityName,s.localityName="L",s.ST=o.stateOrProvinceName,s.stateOrProvinceName="ST",s.O=o.organizationName,s.organizationName="O",s.OU=o.organizationalUnitName,s.organizationalUnitName="OU",s.E=o.emailAddress,s.emailAddress="E";var u=n.pki.rsa.publicKeyValidator,l={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},u,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},c={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},f={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},u,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},h={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[f,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function p(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,i=0;null===n&&i<e.attributes.length;++i)r=e.attributes[i],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(n=r);return n}a.RDNAttributesAsArray=function(e,t){for(var r,n,a,u=[],l=0;l<e.value.length;++l){r=e.value[l];for(var c=0;c<r.value.length;++c)a={},n=r.value[c],a.type=i.derToOid(n.value[0].value),a.value=n.value[1].value,a.valueTagClass=n.value[1].type,a.type in o&&(a.name=o[a.type],a.name in s&&(a.shortName=s[a.name])),t&&(t.update(a.type),t.update(a.value)),u.push(a)}return u},a.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],u=i.derToOid(n.value[0].value),l=n.value[1].value,c=0;c<l.length;++c){var f={};if(f.type=u,f.value=l[c].value,f.valueTagClass=l[c].type,f.type in o&&(f.name=o[f.type],f.name in s&&(f.shortName=s[f.name])),f.type===o.extensionRequest){f.extensions=[];for(var h=0;h<f.value.length;++h)f.extensions.push(a.certificateExtensionFromAsn1(f.value[h]))}t.push(f)}return t};var d=function(e,t,r){var n={};if(e!==o["RSASSA-PSS"])return n;r&&(n={hash:{algorithmOid:o.sha1},mgf:{algorithmOid:o.mgf1,hash:{algorithmOid:o.sha1}},saltLength:20});var a={},s=[];if(!i.validate(t,c,a,s)){var u=new Error("Cannot read RSASSA-PSS parameter block.");throw u.errors=s,u}return void 0!==a.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=i.derToOid(a.hashOid)),void 0!==a.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=i.derToOid(a.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=i.derToOid(a.maskGenHashOid)),void 0!==a.saltLength&&(n.saltLength=a.saltLength.charCodeAt(0)),n};function g(e){for(var t,r,a=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),o=e.attributes,s=0;s<o.length;++s){var u=(t=o[s]).value,l=i.Type.PRINTABLESTRING;"valueTagClass"in t&&(l=t.valueTagClass)===i.Type.UTF8&&(u=n.util.encodeUtf8(u)),r=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.type).getBytes()),i.create(i.Class.UNIVERSAL,l,!1,u)])]),a.value.push(r)}return a}function y(e){for(var t,r=0;r<e.length;++r){if(void 0===(t=e[r]).name&&(t.type&&t.type in a.oids?t.name=a.oids[t.type]:t.shortName&&t.shortName in s&&(t.name=a.oids[s[t.shortName]])),void 0===t.type){if(!t.name||!(t.name in a.oids))throw(u=new Error("Attribute type not specified.")).attribute=t,u;t.type=a.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in s&&(t.shortName=s[t.name]),t.type===o.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=i.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(a.certificateExtensionToAsn1(m(t.extensions[n])))}var u;if(void 0===t.value)throw(u=new Error("Attribute value not specified.")).attribute=t,u}}function m(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in a.oids&&(e.name=a.oids[e.id]),void 0===e.id){if(!e.name||!(e.name in a.oids))throw(b=new Error("Extension ID not specified.")).extension=e,b;e.id=a.oids[e.name]}if(void 0!==e.value)return e;if("keyUsage"===e.name){var r=0,s=0,u=0;e.digitalSignature&&(s|=128,r=7),e.nonRepudiation&&(s|=64,r=6),e.keyEncipherment&&(s|=32,r=5),e.dataEncipherment&&(s|=16,r=4),e.keyAgreement&&(s|=8,r=3),e.keyCertSign&&(s|=4,r=2),e.cRLSign&&(s|=2,r=1),e.encipherOnly&&(s|=1,r=0),e.decipherOnly&&(u|=128,r=7);var l=String.fromCharCode(r);0!==u?l+=String.fromCharCode(s)+String.fromCharCode(u):0!==s&&(l+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,l)}else if("basicConstraints"===e.name)e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.pathLenConstraint).getBytes()));else if("extKeyUsage"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);var c=e.value.value;for(var f in e)!0===e[f]&&(f in o?c.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o[f]).getBytes())):-1!==f.indexOf(".")&&c.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(f).getBytes())))}else if("nsCertType"===e.name){r=0,s=0;e.client&&(s|=128,r=7),e.server&&(s|=64,r=6),e.email&&(s|=32,r=5),e.objsign&&(s|=16,r=4),e.reserved&&(s|=8,r=3),e.sslCA&&(s|=4,r=2),e.emailCA&&(s|=2,r=1),e.objCA&&(s|=1,r=0);l=String.fromCharCode(r);0!==s&&(l+=String.fromCharCode(s)),e.value=i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,l)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);for(var h=0;h<e.altNames.length;++h){l=(v=e.altNames[h]).value;if(7===v.type&&v.ip){if(null===(l=n.util.bytesFromIP(v.ip)))throw(b=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,b}else 8===v.type&&(l=v.oid?i.oidToDer(i.oidToDer(v.oid)):i.oidToDer(l));e.value.value.push(i.create(i.Class.CONTEXT_SPECIFIC,v.type,!1,l))}}else if("nsComment"===e.name&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var p=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=p.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,p.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);c=e.value.value;if(e.keyIdentifier){var d=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;c.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var y=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[g(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];c.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,y))}if(e.serialNumber){var m=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);c.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);c=e.value.value;var v,E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),C=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(h=0;h<e.altNames.length;++h){l=(v=e.altNames[h]).value;if(7===v.type&&v.ip){if(null===(l=n.util.bytesFromIP(v.ip)))throw(b=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,b}else 8===v.type&&(l=v.oid?i.oidToDer(i.oidToDer(v.oid)):i.oidToDer(l));C.value.push(i.create(i.Class.CONTEXT_SPECIFIC,v.type,!1,l))}E.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[C])),c.push(E)}var b;if(void 0===e.value)throw(b=new Error("Extension value not specified.")).extension=e,b;return e}function v(e,t){switch(e){case o["RSASSA-PSS"]:var r=[];return void 0!==t.hash.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.mgf.hash.algorithmOid).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.saltLength).getBytes())])),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,r);default:return i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")}}function E(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===e.attributes.length)return t;for(var r=e.attributes,a=0;a<r.length;++a){var o=r[a],s=o.value,u=i.Type.UTF8;"valueTagClass"in o&&(u=o.valueTagClass),u===i.Type.UTF8&&(s=n.util.encodeUtf8(s));var l=!1;"valueConstructed"in o&&(l=o.valueConstructed);var c=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,u,l,s)])]);t.value.push(c)}return t}a.certificateFromPem=function(e,t,r){var o=n.pem.decode(e)[0];if("CERTIFICATE"!==o.type&&"X509 CERTIFICATE"!==o.type&&"TRUSTED CERTIFICATE"!==o.type){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=o.type,s}if(o.procType&&"ENCRYPTED"===o.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=i.fromDer(o.body,r);return a.certificateFromAsn1(u,t)},a.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:i.toDer(a.certificateToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.publicKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.publicKeyFromAsn1(o)},a.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:i.toDer(a.publicKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:i.toDer(a.publicKeyToRSAPublicKey(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.getPublicKeyFingerprint=function(e,t){var r,o=(t=t||{}).md||n.md.sha1.create();switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=i.toDer(a.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":r=i.toDer(a.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}o.start(),o.update(r);var s=o.digest();if("hex"===t.encoding){var u=s.toHex();return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return s},a.certificationRequestFromPem=function(e,t,r){var o=n.pem.decode(e)[0];if("CERTIFICATE REQUEST"!==o.type){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=o.type,s}if(o.procType&&"ENCRYPTED"===o.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var u=i.fromDer(o.body,r);return a.certificationRequestFromAsn1(u,t)},a.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:i.toDer(a.certificationRequestToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},a.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return p(e.issuer,t)},e.issuer.addField=function(t){y([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){y([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){y(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){y(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)m(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t});for(var r,n=null,i=0;null===n&&i<e.extensions.length;++i)r=e.extensions[i],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(n=r);return n},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=o[e.md.algorithm+"WithRSAEncryption"];if(!s){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=s,e.tbsCertificate=a.getTBSCertificate(e);var l=i.toDer(e.tbsCertificate);e.md.update(l.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var s=t.issuer,u=e.subject;throw(g=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.")).expectedIssuer=s.attributes,g.actualIssuer=u.attributes,g}var l=t.md;if(null===l){if(t.signatureOid in o)switch(o[t.signatureOid]){case"sha1WithRSAEncryption":l=n.md.sha1.create();break;case"md5WithRSAEncryption":l=n.md.md5.create();break;case"sha256WithRSAEncryption":l=n.md.sha256.create();break;case"sha384WithRSAEncryption":l=n.md.sha384.create();break;case"sha512WithRSAEncryption":l=n.md.sha512.create();break;case"RSASSA-PSS":l=n.md.sha256.create()}if(null===l)throw(g=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=t.signatureOid,g;var c=t.tbsCertificate||a.getTBSCertificate(t),f=i.toDer(c);l.update(f.getBytes())}if(null!==l){var h;switch(t.signatureOid){case o.sha1WithRSAEncryption:h=void 0;break;case o["RSASSA-PSS"]:var p,d,g;if(void 0===(p=o[t.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[p])throw(g=new Error("Unsupported MGF hash function.")).oid=t.signatureParameters.mgf.hash.algorithmOid,g.name=p,g;if(void 0===(d=o[t.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[d])throw(g=new Error("Unsupported MGF function.")).oid=t.signatureParameters.mgf.algorithmOid,g.name=d,g;if(d=n.mgf[d].create(n.md[p].create()),void 0===(p=o[t.signatureParameters.hash.algorithmOid])||void 0===n.md[p])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:p};h=n.pss.create(n.md[p].create(),d,t.signatureParameters.saltLength)}r=e.publicKey.verify(l.digest().getBytes(),t.signature,h)}return r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject;if(n.hash&&i.hash)r=n.hash===i.hash;else if(n.attributes.length===i.attributes.length){var a,o;r=!0;for(var s=0;r&&s<n.attributes.length;++s)a=n.attributes[s],o=i.attributes[s],a.type===o.type&&a.value===o.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return a.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=o.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var i=e.extensions[r];if(i.id===t){var a=e.generateSubjectKeyIdentifier().getBytes();return n.util.hexToBytes(i.subjectKeyIdentifier)===a}}return!1},e},a.certificateFromAsn1=function(e,t){var r={},s=[];if(!i.validate(e,l,r,s))throw(h=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.")).errors=s,h;if(i.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=a.createCertificate();u.version=r.certVersion?r.certVersion.charCodeAt(0):0;var c=n.util.createBuffer(r.certSerialNumber);u.serialNumber=c.toHex(),u.signatureOid=n.asn1.derToOid(r.certSignatureOid),u.signatureParameters=d(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=d(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature;var f=[];if(void 0!==r.certValidity1UTCTime&&f.push(i.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&f.push(i.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&f.push(i.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&f.push(i.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=f[0],u.validity.notAfter=f[1],u.tbsCertificate=r.tbsCertificate,t){var h;if(u.md=null,u.signatureOid in o)switch(o[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h;var g=i.toDer(u.tbsCertificate);u.md.update(g.getBytes())}var m=n.md.sha1.create();u.issuer.getField=function(e){return p(u.issuer,e)},u.issuer.addField=function(e){y([e]),u.issuer.attributes.push(e)},u.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer,m),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=m.digest().toHex();var v=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){y([e]),u.subject.attributes.push(e)},u.subject.attributes=a.RDNAttributesAsArray(r.certSubject,v),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=v.digest().toHex(),r.certExtensions?u.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},a.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(a.certificateExtensionFromAsn1(n.value[i]));return t},a.certificateExtensionFromAsn1=function(e){var t={};if(t.id=i.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===i.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in o)if(t.name=o[t.id],"keyUsage"===t.name){var r=0,a=0;(u=i.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1),a=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&a)}else if("basicConstraints"===t.name){(u=i.fromDer(t.value)).value.length>0&&u.value[0].type===i.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1;var s=null;u.value.length>0&&u.value[0].type===i.Type.INTEGER?s=u.value[0].value:u.value.length>1&&(s=u.value[1].value),null!==s&&(t.pathLenConstraint=i.derToInteger(s))}else if("extKeyUsage"===t.name)for(var u=i.fromDer(t.value),l=0;l<u.value.length;++l){var c=i.derToOid(u.value[l].value);c in o?t[o[c]]=!0:t[c]=!0}else if("nsCertType"===t.name){r=0;(u=i.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f;t.altNames=[];u=i.fromDer(t.value);for(var h=0;h<u.value.length;++h){var p={type:(f=u.value[h]).type,value:f.value};switch(t.altNames.push(p),f.type){case 1:case 2:case 6:break;case 7:p.ip=n.util.bytesToIP(f.value);break;case 8:p.oid=i.derToOid(f.value)}}}else if("subjectKeyIdentifier"===t.name){u=i.fromDer(t.value);t.subjectKeyIdentifier=n.util.bytesToHex(u.value)}return t},a.certificationRequestFromAsn1=function(e,t){var r={},s=[];if(!i.validate(e,h,r,s))throw(l=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.")).errors=s,l;if(i.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var u=a.createCertificationRequest();if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=n.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=d(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=n.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=d(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,t){var l;if(u.md=null,u.signatureOid in o)switch(o[u.signatureOid]){case"sha1WithRSAEncryption":u.md=n.md.sha1.create();break;case"md5WithRSAEncryption":u.md=n.md.md5.create();break;case"sha256WithRSAEncryption":u.md=n.md.sha256.create();break;case"sha384WithRSAEncryption":u.md=n.md.sha384.create();break;case"sha512WithRSAEncryption":u.md=n.md.sha512.create();break;case"RSASSA-PSS":u.md=n.md.sha256.create()}if(null===u.md)throw(l=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=u.signatureOid,l;var c=i.toDer(u.certificationRequestInfo);u.md.update(c.getBytes())}var f=n.md.sha1.create();return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){y([e]),u.subject.attributes.push(e)},u.subject.attributes=a.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),u.subject.hash=f.digest().toHex(),u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(e){return p(u,e)},u.addAttribute=function(e){y([e]),u.attributes.push(e)},u.attributes=a.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},a.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}};return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){y([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return p(e,t)},e.addAttribute=function(t){y([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){y(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){y(t),e.attributes=t},e.sign=function(t,r){e.md=r||n.md.sha1.create();var s=o[e.md.algorithm+"WithRSAEncryption"];if(!s){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=s,e.certificationRequestInfo=a.getCertificationRequestInfo(e);var l=i.toDer(e.certificationRequestInfo);e.md.update(l.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(null===r){if(e.signatureOid in o)switch(o[e.signatureOid]){case"sha1WithRSAEncryption":r=n.md.sha1.create();break;case"md5WithRSAEncryption":r=n.md.md5.create();break;case"sha256WithRSAEncryption":r=n.md.sha256.create();break;case"sha384WithRSAEncryption":r=n.md.sha384.create();break;case"sha512WithRSAEncryption":r=n.md.sha512.create();break;case"RSASSA-PSS":r=n.md.sha256.create()}if(null===r)throw(h=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=e.signatureOid,h;var s=e.certificationRequestInfo||a.getCertificationRequestInfo(e),u=i.toDer(s);r.update(u.getBytes())}if(null!==r){var l;switch(e.signatureOid){case o.sha1WithRSAEncryption:break;case o["RSASSA-PSS"]:var c,f,h;if(void 0===(c=o[e.signatureParameters.mgf.hash.algorithmOid])||void 0===n.md[c])throw(h=new Error("Unsupported MGF hash function.")).oid=e.signatureParameters.mgf.hash.algorithmOid,h.name=c,h;if(void 0===(f=o[e.signatureParameters.mgf.algorithmOid])||void 0===n.mgf[f])throw(h=new Error("Unsupported MGF function.")).oid=e.signatureParameters.mgf.algorithmOid,h.name=f,h;if(f=n.mgf[f].create(n.md[c].create()),void 0===(c=o[e.signatureParameters.hash.algorithmOid])||void 0===n.md[c])throw(h=new Error("Unsupported RSASSA-PSS hash function.")).oid=e.signatureParameters.hash.algorithmOid,h.name=c,h;l=n.pss.create(n.md[c].create(),f,e.signatureParameters.saltLength)}t=e.publicKey.verify(r.digest().getBytes(),e.signature,l)}return t},e};var C=new Date("1950-01-01T00:00:00Z"),b=new Date("2050-01-01T00:00:00Z");function T(e){return e>=C&&e<b?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(e)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(e))}a.getTBSCertificate=function(e){var t=T(e.validity.notBefore),r=T(e.validity.notAfter),o=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.siginfo.algorithmOid).getBytes()),v(e.siginfo.algorithmOid,e.siginfo.parameters)]),g(e.issuer),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,r]),g(e.subject),a.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&o.value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&o.value.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!0,[i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&o.value.push(a.certificateExtensionsToAsn1(e.extensions)),o},a.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),g(e.subject),a.publicKeyToAsn1(e.publicKey),E(e)])},a.distinguishedNameToAsn1=function(e){return g(e)},a.certificateToAsn1=function(e){var t=e.tbsCertificate||a.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n<e.length;++n)r.value.push(a.certificateExtensionToAsn1(e[n]));return t},a.certificateExtensionToAsn1=function(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.id).getBytes())),e.critical&&t.value.push(i.create(i.Class.UNIVERSAL,i.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return"string"!=typeof e.value&&(r=i.toDer(r).getBytes()),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)),t},a.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||a.getCertificationRequestInfo(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.createCaStore=function(e){var t={certs:{}};function r(e){return o(e),t.certs[e.hash]||null}function o(e){if(!e.hash){var t=n.md.sha1.create();e.attributes=a.RDNAttributesAsArray(g(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),o(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash];n.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=n.pki.certificateFromPem(e));var t=r(e.subject);if(!t)return!1;n.util.isArray(t)||(t=[t]);for(var o=i.toDer(a.certificateToAsn1(e)).getBytes(),s=0;s<t.length;++s){if(o===i.toDer(a.certificateToAsn1(t[s])).getBytes())return!0}return!1},t.listAllCertificates=function(){var e=[];for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var i=t.certs[r];if(n.util.isArray(i))for(var a=0;a<i.length;++a)e.push(i[a]);else e.push(i)}return e},t.removeCertificate=function(e){var s;if("string"==typeof e&&(e=n.pki.certificateFromPem(e)),o(e.subject),!t.hasCertificate(e))return null;var u=r(e.subject);if(!n.util.isArray(u))return s=t.certs[e.subject.hash],delete t.certs[e.subject.hash],s;for(var l=i.toDer(a.certificateToAsn1(e)).getBytes(),c=0;c<u.length;++c){l===i.toDer(a.certificateToAsn1(u[c])).getBytes()&&(s=u[c],u.splice(c,1))}return 0===u.length&&delete t.certs[e.subject.hash],s},e)for(var s=0;s<e.length;++s){var u=e[s];t.addCertificate(u)}return t},a.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},a.verifyCertificateChain=function(e,t,r){"function"==typeof r&&(r={verify:r}),r=r||{};var i=(t=t.slice(0)).slice(0),o=r.validityCheckDate;void 0===o&&(o=new Date);var s=!0,u=null,l=0;do{var c=t.shift(),f=null,h=!1;if(o&&(o<c.validity.notBefore||o>c.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:o}),null===u){if(null===(f=t[0]||e.getIssuer(c))&&c.isIssuer(c)&&(h=!0,f=c),f){var p=f;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){f=p.shift();try{d=f.verify(c)}catch(e){}}d||(u={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==u||f&&!h||e.hasCertificate(c)||(u={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===u&&f&&!c.isIssuer(f)&&(u={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===u)for(var g={keyUsage:!0,basicConstraints:!0},y=0;null===u&&y<c.extensions.length;++y){var m=c.extensions[y];m.critical&&!(m.name in g)&&(u={message:"Certificate has an unsupported critical extension.",error:a.certificateError.unsupported_certificate})}if(null===u&&(!s||0===t.length&&(!f||h))){var v=c.getExtension("basicConstraints"),E=c.getExtension("keyUsage");if(null!==E&&(E.keyCertSign&&null!==v||(u={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:a.certificateError.bad_certificate})),null!==u||null===v||v.cA||(u={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:a.certificateError.bad_certificate}),null===u&&null!==E&&"pathLenConstraint"in v)l-1>v.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var C=null===u||u.error,b=r.verify?r.verify(C,l,i):C;if(!0!==b)throw!0===C&&(u={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(b||0===b)&&("object"!=typeof b||n.util.isArray(b)?"string"==typeof b&&(u.error=b):(b.message&&(u.message=b.message),b.error&&(u.error=b.error))),u;u=null,s=!1,++l}while(t.length>0);return!0}},function(e,t,r){var n=r(0);r(3),r(1),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,a=r.digestLength,o=e.salt||null;if("string"==typeof o&&(o=n.util.createBuffer(o)),"saltLength"in e)t=e.saltLength;else{if(null===o)throw new Error("Salt length not specified or specific salt not given.");t=o.length()}if(null!==o&&o.length()!==t)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||n.random,u={encode:function(e,u){var l,c,f=u-1,h=Math.ceil(f/8),p=e.digest().getBytes();if(h<a+t+2)throw new Error("Message is too long to encrypt.");c=null===o?s.getBytesSync(t):o.bytes();var d=new n.util.ByteBuffer;d.fillWithByte(0,8),d.putBytes(p),d.putBytes(c),r.start(),r.update(d.getBytes());var g=r.digest().getBytes(),y=new n.util.ByteBuffer;y.fillWithByte(0,h-t-a-2),y.putByte(1),y.putBytes(c);var m=y.getBytes(),v=h-a-1,E=i.generate(g,v),C="";for(l=0;l<v;l++)C+=String.fromCharCode(m.charCodeAt(l)^E.charCodeAt(l));var b=65280>>8*h-f&255;return(C=String.fromCharCode(C.charCodeAt(0)&~b)+C.substr(1))+g+String.fromCharCode(188)},verify:function(e,o,s){var u,l=s-1,c=Math.ceil(l/8);if(o=o.substr(-c),c<a+t+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(188!==o.charCodeAt(c-1))throw new Error("Encoded message does not end in 0xBC.");var f=c-a-1,h=o.substr(0,f),p=o.substr(f,a),d=65280>>8*c-l&255;if(0!=(h.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var g=i.generate(p,f),y="";for(u=0;u<f;u++)y+=String.fromCharCode(h.charCodeAt(u)^g.charCodeAt(u));y=String.fromCharCode(y.charCodeAt(0)&~d)+y.substr(1);var m=c-a-t-2;for(u=0;u<m;u++)if(0!==y.charCodeAt(u))throw new Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(m))throw new Error("Inconsistent PSS signature, 0x01 marker not found");var v=y.substr(-t),E=new n.util.ByteBuffer;return E.fillWithByte(0,8),E.putBytes(e),E.putBytes(v),r.start(),r.update(E.getBytes()),p===r.digest().getBytes()}};return u}},function(e,t,r){var n=r(0);r(1),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function a(e,t){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var r=e;e=n.util.createBuffer();for(var i=0;i<r.length;++i)e.putByte(r[i])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!n.util.isArray(e)){var a=[],o=t/4;for(i=0;i<o;++i)a.push(e.getInt32());e=a}return e}function o(e){e[e.length-1]=e[e.length-1]+1&4294967295}function s(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]);this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0)e.read-=this.blockSize;else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=a(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]);else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}o(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),o(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=s(8*t.length());var a=t.length()%this.blockSize;for(a&&t.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32());this._cipherLength+=this.blockSize}else{var a=(this.blockSize-n)%this.blockSize;a>0&&(a=this.blockSize-a),this._partialOutput.clear();for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(a<=0||r){if(r){var s=n%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),o(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n<this.blockSize&&!(r&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),o(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer();var i=this._aDataLength.concat(s(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,i);var a=[];this.cipher.encrypt(this._j0,a);for(var o=0;o<this._ints;++o)this.tag.putInt32(this._s[o]^a[o]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){e[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r},i.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,a=new Array(i),o=0;o<i;++o){var s=[0,0,0,0],u=(n-1-o%n)*t;s[o/n|0]=1<<t-1<<u,a[o]=this.generateSubHashTable(this.multiply(s,e),t)}return a},i.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r);i[n]=e.slice(0);for(var a=n>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a<n;){for(var o=1;o<a;++o){var s=i[a],u=i[o];i[a+o]=[s[0]^u[0],s[1]^u[1],s[2]^u[2],s[3]^u[3]]}a*=2}for(i[0]=[0,0,0,0],a=n+1;a<r;++a){var l=i[a^n];i[a]=[e[0]^l[0],e[1]^l[1],e[2]^l[2],e[3]^l[3]]}return i}},function(e,t,r){var n=r(0);r(2),r(10),r(18),r(8),r(19),r(3),r(11),r(1);var i=function(e,t,r,i){var a=n.util.createBuffer(),o=e.length>>1,s=o+(1&e.length),u=e.substr(0,s),l=e.substr(o,s),c=n.util.createBuffer(),f=n.hmac.create();r=t+r;var h=Math.ceil(i/16),p=Math.ceil(i/20);f.start("MD5",u);var d=n.util.createBuffer();c.putBytes(r);for(var g=0;g<h;++g)f.start(null,null),f.update(c.getBytes()),c.putBuffer(f.digest()),f.start(null,null),f.update(c.bytes()+r),d.putBuffer(f.digest());f.start("SHA1",l);var y=n.util.createBuffer();c.clear(),c.putBytes(r);for(g=0;g<p;++g)f.start(null,null),f.update(c.getBytes()),c.putBuffer(f.digest()),f.start(null,null),f.update(c.bytes()+r),y.putBuffer(f.digest());return a.putBytes(n.util.xorBytes(d.getBytes(),y.getBytes(),i)),a},a=function(e,t,r){var i=!1;try{var a=e.deflate(t.fragment.getBytes());t.fragment=n.util.createBuffer(a),t.length=a.length,i=!0}catch(e){}return i},o=function(e,t,r){var i=!1;try{var a=e.inflate(t.fragment.getBytes());t.fragment=n.util.createBuffer(a),t.length=a.length,i=!0}catch(e){}return i},s=function(e,t){var r=0;switch(t){case 1:r=e.getByte();break;case 2:r=e.getInt16();break;case 3:r=e.getInt24();break;case 4:r=e.getInt32()}return n.util.createBuffer(e.getBytes(r))},u=function(e,t,r){e.putInt(r.length(),t<<3),e.putBuffer(r)},l={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}};l.SupportedVersions=[l.Versions.TLS_1_1,l.Versions.TLS_1_0],l.Version=l.SupportedVersions[0],l.MaxFragment=15360,l.ConnectionEnd={server:0,client:1},l.PRFAlgorithm={tls_prf_sha256:0},l.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},l.CipherType={stream:0,block:1,aead:2},l.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},l.CompressionMethod={none:0,deflate:1},l.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},l.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},l.Alert={},l.Alert.Level={warning:1,fatal:2},l.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},l.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},l.CipherSuites={},l.getCipherSuite=function(e){var t=null;for(var r in l.CipherSuites){var n=l.CipherSuites[r];if(n.id[0]===e.charCodeAt(0)&&n.id[1]===e.charCodeAt(1)){t=n;break}}return t},l.handleUnexpected=function(e,t){!e.open&&e.entity===l.ConnectionEnd.client||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unexpected_message}})},l.handleHelloRequest=function(e,t,r){!e.handshaking&&e.handshakes>0&&(l.queue(e,l.createAlert(e,{level:l.Alert.Level.warning,description:l.Alert.Description.no_renegotiation})),l.flush(e)),e.process()},l.parseHelloMessage=function(e,t,r){var i=null,a=e.entity===l.ConnectionEnd.client;if(r<38)e.error(e,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});else{var o=t.fragment,u=o.length();if(i={version:{major:o.getByte(),minor:o.getByte()},random:n.util.createBuffer(o.getBytes(32)),session_id:s(o,1),extensions:[]},a?(i.cipher_suite=o.getBytes(2),i.compression_method=o.getByte()):(i.cipher_suites=s(o,2),i.compression_methods=s(o,1)),(u=r-(u-o.length()))>0){for(var c=s(o,2);c.length()>0;)i.extensions.push({type:[c.getByte(),c.getByte()],data:s(c,2)});if(!a)for(var f=0;f<i.extensions.length;++f){var h=i.extensions[f];if(0===h.type[0]&&0===h.type[1])for(var p=s(h.data,2);p.length()>0;){if(0!==p.getByte())break;e.session.extensions.server_name.serverNameList.push(s(p,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}});if(a)e.session.cipherSuite=l.getCipherSuite(i.cipher_suite);else for(var d=n.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=l.getCipherSuite(d.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=a?i.compression_method:l.CompressionMethod.none}return i},l.createSecurityParameters=function(e,t){var r=e.entity===l.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,a=r?n:l.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:l.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:a}},l.handleServerHello=function(e,t,r){var n=l.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=d,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=c,e.session.resuming=!1,l.createSecurityParameters(e,n)),e.session.id=i,e.process()}},l.handleClientHello=function(e,t,r){var i=l.parseHelloMessage(e,t,r);if(!e.fail){var a=i.session_id.bytes(),o=null;if(e.sessionCache&&(null===(o=e.sessionCache.getSession(a))?a="":(o.version.major!==i.version.major||o.version.minor>i.version.minor)&&(o=null,a="")),0===a.length&&(a=n.random.getBytes(32)),e.session.id=a,e.session.clientHelloVersion=i.version,e.session.sp={},o)e.version=e.session.version=o.version,e.session.sp=o.sp;else{for(var s,u=1;u<l.SupportedVersions.length&&!((s=l.SupportedVersions[u]).minor<=i.version.minor);++u);e.version={major:s.major,minor:s.minor},e.session.version=e.version}null!==o?(e.expect=b,e.session.resuming=!0,e.session.sp.client_random=i.random.bytes()):(e.expect=!1!==e.verifyClient?v:E,e.session.resuming=!1,l.createSecurityParameters(e,i)),e.open=!0,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createServerHello(e)})),e.session.resuming?(l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.pending=l.createConnectionState(e),e.state.current.write=e.state.pending.write,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)}))):(l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificate(e)})),e.fail||(l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createServerKeyExchange(e)})),!1!==e.verifyClient&&l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificateRequest(e)})),l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createServerHelloDone(e)})))),l.flush(e),e.process()}},l.handleCertificate=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var i,a,o=t.fragment,u={certificate_list:s(o,3)},c=[];try{for(;u.certificate_list.length()>0;)i=s(u.certificate_list,3),a=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(a,!0),c.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate}})}var h=e.entity===l.ConnectionEnd.client;!h&&!0!==e.verifyClient||0!==c.length?0===c.length?e.expect=h?f:E:(h?e.session.serverCertificate=c[0]:e.session.clientCertificate=c[0],l.verifyCertificateChain(e,c)&&(e.expect=h?f:E)):e.error(e,{message:h?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}}),e.process()},l.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}});e.expect=h,e.process()},l.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}});var i=t.fragment,a={enc_pre_master_secret:s(i,2).getBytes()},o=null;if(e.getPrivateKey)try{o=e.getPrivateKey(e,e.session.serverCertificate),o=n.pki.privateKeyFromPem(o)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})}if(null===o)return e.error(e,{message:"No private key set.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}});try{var u=e.session.sp;u.pre_master_secret=o.decrypt(a.enc_pre_master_secret);var c=e.session.clientHelloVersion;if(c.major!==u.pre_master_secret.charCodeAt(0)||c.minor!==u.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){u.pre_master_secret=n.random.getBytes(48)}e.expect=b,null!==e.session.clientCertificate&&(e.expect=C),e.process()},l.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:s(n,1),certificate_authorities:s(n,2)};e.session.certificateRequest=i,e.expect=p,e.process()},l.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var a=i.bytes();i.read+=4;var o={signature:s(i,2).getBytes()},u=n.util.createBuffer();u.putBuffer(e.session.md5.digest()),u.putBuffer(e.session.sha1.digest()),u=u.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(u,o.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(a),e.session.sha1.update(a)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure}})}e.expect=b,e.process()},l.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.insufficient_security}},a=e.verify(e,i.alert.description,0,[]);if(!0!==a)return(a||0===a)&&("object"!=typeof a||n.util.isArray(a)?"number"==typeof a&&(i.alert.description=a):(a.message&&(i.message=a.message),a.alert&&(i.alert.description=a.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificate(e)}),l.queue(e,t)),t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createClientKeyExchange(e)}),l.queue(e,t),e.expect=m;var o=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificateVerify(e,t)})),l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.pending=l.createConnectionState(e),e.state.current.write=e.state.pending.write,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)})),e.expect=d,l.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return o(e,null);l.getClientSignature(e,o)},l.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var r=e.entity===l.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=l.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?g:T,e.process()},l.handleFinished=function(e,t,r){var a=t.fragment;a.read-=4;var o=a.bytes();a.read+=4;var s=t.fragment.getBytes();(a=n.util.createBuffer()).putBuffer(e.session.md5.digest()),a.putBuffer(e.session.sha1.digest());var u=e.entity===l.ConnectionEnd.client,c=u?"server finished":"client finished",f=e.session.sp;if((a=i(f.master_secret,c,a.getBytes(),12)).getBytes()!==s)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decrypt_error}});e.session.md5.update(o),e.session.sha1.update(o),(e.session.resuming&&u||!e.session.resuming&&!u)&&(l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)}))),e.expect=u?y:S,e.handshaking=!1,++e.handshakes,e.peerCertificate=u?e.session.serverCertificate:e.session.clientCertificate,l.flush(e),e.isConnected=!0,e.connected(e),e.process()},l.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case l.Alert.Description.close_notify:r="Connection closed.";break;case l.Alert.Description.unexpected_message:r="Unexpected message.";break;case l.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case l.Alert.Description.decryption_failed:r="Decryption failed.";break;case l.Alert.Description.record_overflow:r="Record overflow.";break;case l.Alert.Description.decompression_failure:r="Decompression failed.";break;case l.Alert.Description.handshake_failure:r="Handshake failure.";break;case l.Alert.Description.bad_certificate:r="Bad certificate.";break;case l.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case l.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case l.Alert.Description.certificate_expired:r="Certificate expired.";break;case l.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case l.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case l.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case l.Alert.Description.access_denied:r="Access denied.";break;case l.Alert.Description.decode_error:r="Decode error.";break;case l.Alert.Description.decrypt_error:r="Decrypt error.";break;case l.Alert.Description.export_restriction:r="Export restriction.";break;case l.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case l.Alert.Description.insufficient_security:r="Insufficient security.";break;case l.Alert.Description.internal_error:r="Internal error.";break;case l.Alert.Description.user_canceled:r="User canceled.";break;case l.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===l.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===l.ConnectionEnd.client?"server":"client",alert:i}),e.process()},l.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),a=r.getInt24();if(a>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var o=r.bytes(a+4);r.read+=4,i in M[e.entity][e.expect]?(e.entity!==l.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==l.HandshakeType.hello_request&&i!==l.HandshakeType.certificate_verify&&i!==l.HandshakeType.finished&&(e.session.md5.update(o),e.session.sha1.update(o)),M[e.entity][e.expect][i](e,t,a)):l.handleUnexpected(e,t)},l.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},l.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),a=r.getInt16(),o=r.getBytes(a);if(i===l.HeartbeatMessageType.heartbeat_request){if(e.handshaking||a>o.length)return e.process();l.queue(e,l.createRecord(e,{type:l.ContentType.heartbeat,data:l.createHeartbeat(l.HeartbeatMessageType.heartbeat_response,o)})),l.flush(e)}else if(i===l.HeartbeatMessageType.heartbeat_response){if(o!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(o))}e.process()};var c=1,f=2,h=3,p=4,d=5,g=6,y=7,m=8,v=1,E=2,C=3,b=4,T=5,S=6,A=l.handleUnexpected,_=l.handleChangeCipherSpec,I=l.handleAlert,w=l.handleHandshake,B=l.handleApplicationData,N=l.handleHeartbeat,k=[];k[l.ConnectionEnd.client]=[[A,I,w,A,N],[A,I,w,A,N],[A,I,w,A,N],[A,I,w,A,N],[A,I,w,A,N],[_,I,A,A,N],[A,I,w,A,N],[A,I,w,B,N],[A,I,w,A,N]],k[l.ConnectionEnd.server]=[[A,I,w,A,N],[A,I,w,A,N],[A,I,w,A,N],[A,I,w,A,N],[_,I,A,A,N],[A,I,w,A,N],[A,I,w,B,N],[A,I,w,A,N]];var D=l.handleHelloRequest,L=l.handleServerHello,R=l.handleCertificate,x=l.handleServerKeyExchange,O=l.handleCertificateRequest,P=l.handleServerHelloDone,U=l.handleFinished,M=[];M[l.ConnectionEnd.client]=[[A,A,L,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,R,x,O,P,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,A,x,O,P,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,A,A,O,P,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,A,A,A,P,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,U],[D,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[D,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A]];var V=l.handleClientHello,j=l.handleClientKeyExchange,K=l.handleCertificateVerify;M[l.ConnectionEnd.server]=[[A,V,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,R,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,j,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,K,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,U],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A],[A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A]],l.generateKeys=function(e,t){var r=i,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var a=2*t.mac_key_length+2*t.enc_key_length,o=e.version.major===l.Versions.TLS_1_0.major&&e.version.minor===l.Versions.TLS_1_0.minor;o&&(a+=2*t.fixed_iv_length);var s=r(t.master_secret,"key expansion",n,a),u={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return o&&(u.client_write_IV=s.getBytes(t.fixed_iv_length),u.server_write_IV=s.getBytes(t.fixed_iv_length)),u},l.createConnectionState=function(e){var t=e.entity===l.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=l.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case l.CompressionMethod.none:break;case l.CompressionMethod.deflate:n.read.compressFunction=o,n.write.compressFunction=a;break;default:throw new Error("Unsupported compression algorithm.")}}return n},l.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},l.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},l.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),l.createRecord(e,{type:l.ContentType.alert,data:r})},l.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r<e.cipherSuites.length;++r){var i=e.cipherSuites[r];t.putByte(i.id[0]),t.putByte(i.id[1])}var a=t.length(),o=n.util.createBuffer();o.putByte(l.CompressionMethod.none);var s=o.length(),c=n.util.createBuffer();if(e.virtualHost){var f=n.util.createBuffer();f.putByte(0),f.putByte(0);var h=n.util.createBuffer();h.putByte(0),u(h,2,n.util.createBuffer(e.virtualHost));var p=n.util.createBuffer();u(p,2,h),u(f,2,p),c.putBuffer(f)}var d=c.length();d>0&&(d+=2);var g=e.session.id,y=g.length+1+2+4+28+2+a+1+s+d,m=n.util.createBuffer();return m.putByte(l.HandshakeType.client_hello),m.putInt24(y),m.putByte(e.version.major),m.putByte(e.version.minor),m.putBytes(e.session.sp.client_random),u(m,1,n.util.createBuffer(g)),u(m,2,t),u(m,1,o),d>0&&u(m,2,c),m},l.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(l.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),u(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},l.createCertificate=function(e){var t,r=e.entity===l.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var a=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var o=null,s=0;s<i.length;++s){var c=n.pem.decode(i[s])[0];if("CERTIFICATE"!==c.type&&"X509 CERTIFICATE"!==c.type&&"TRUSTED CERTIFICATE"!==c.type){var f=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw f.headerType=c.type,f}if(c.procType&&"ENCRYPTED"===c.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var h=n.util.createBuffer(c.body);null===o&&(o=n.asn1.fromDer(h.bytes(),!1));var p=n.util.createBuffer();u(p,3,h),a.putBuffer(p)}i=n.pki.certificateFromAsn1(o),r?e.session.clientCertificate=i:e.session.serverCertificate=i}catch(t){return e.error(e,{message:"Could not send certificate list.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate}})}var d=3+a.length(),g=n.util.createBuffer();return g.putByte(l.HandshakeType.certificate),g.putInt24(d),u(g,3,a),g},l.createClientKeyExchange=function(e){var t=n.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(n.random.getBytes(46));var r=e.session.sp;r.pre_master_secret=t.getBytes();var i=(t=e.session.serverCertificate.publicKey.encrypt(r.pre_master_secret)).length+2,a=n.util.createBuffer();return a.putByte(l.HandshakeType.client_key_exchange),a.putInt24(i),a.putInt16(t.length),a.putBytes(t),a},l.createServerKeyExchange=function(e){var t=n.util.createBuffer();return t},l.getClientSignature=function(e,t){var r=n.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(e,t,r){var i=null;if(e.getPrivateKey)try{i=e.getPrivateKey(e,e.session.clientCertificate),i=n.pki.privateKeyFromPem(i)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})}null===i?e.error(e,{message:"No private key set.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}):t=i.sign(t,null),r(e,t)},e.getSignature(e,r,t)},l.createCertificateVerify=function(e,t){var r=t.length+2,i=n.util.createBuffer();return i.putByte(l.HandshakeType.certificate_verify),i.putInt24(r),i.putInt16(t.length),i.putBytes(t),i},l.createCertificateRequest=function(e){var t=n.util.createBuffer();t.putByte(1);var r=n.util.createBuffer();for(var i in e.caStore.certs){var a=e.caStore.certs[i],o=n.pki.distinguishedNameToAsn1(a.subject),s=n.asn1.toDer(o);r.putInt16(s.length()),r.putBuffer(s)}var c=1+t.length()+2+r.length(),f=n.util.createBuffer();return f.putByte(l.HandshakeType.certificate_request),f.putInt24(c),u(f,1,t),u(f,2,r),f},l.createServerHelloDone=function(e){var t=n.util.createBuffer();return t.putByte(l.HandshakeType.server_hello_done),t.putInt24(0),t},l.createChangeCipherSpec=function(){var e=n.util.createBuffer();return e.putByte(1),e},l.createFinished=function(e){var t=n.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===l.ConnectionEnd.client,a=e.session.sp,o=r?"client finished":"server finished";t=i(a.master_secret,o,t.getBytes(),12);var s=n.util.createBuffer();return s.putByte(l.HandshakeType.finished),s.putInt24(t.length()),s.putBuffer(t),s},l.createHeartbeat=function(e,t,r){void 0===r&&(r=t.length);var i=n.util.createBuffer();i.putByte(e),i.putInt16(r),i.putBytes(t);var a=i.length(),o=Math.max(16,a-r-3);return i.putBytes(n.random.getBytes(o)),i},l.queue=function(e,t){if(t&&(0!==t.fragment.length()||t.type!==l.ContentType.handshake&&t.type!==l.ContentType.alert&&t.type!==l.ContentType.change_cipher_spec)){if(t.type===l.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var i;if(t.fragment.length()<=l.MaxFragment)i=[t];else{i=[];for(var a=t.fragment.bytes();a.length>l.MaxFragment;)i.push(l.createRecord(e,{type:t.type,data:n.util.createBuffer(a.slice(0,l.MaxFragment))})),a=a.slice(l.MaxFragment);a.length>0&&i.push(l.createRecord(e,{type:t.type,data:n.util.createBuffer(a)}))}for(var o=0;o<i.length&&!e.fail;++o){var s=i[o];e.state.current.write.update(e,s)&&e.records.push(s)}}},l.flush=function(e){for(var t=0;t<e.records.length;++t){var r=e.records[t];e.tlsData.putByte(r.type),e.tlsData.putByte(r.version.major),e.tlsData.putByte(r.version.minor),e.tlsData.putInt16(r.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var F=function(e){switch(e){case!0:return!0;case n.pki.certificateError.bad_certificate:return l.Alert.Description.bad_certificate;case n.pki.certificateError.unsupported_certificate:return l.Alert.Description.unsupported_certificate;case n.pki.certificateError.certificate_revoked:return l.Alert.Description.certificate_revoked;case n.pki.certificateError.certificate_expired:return l.Alert.Description.certificate_expired;case n.pki.certificateError.certificate_unknown:return l.Alert.Description.certificate_unknown;case n.pki.certificateError.unknown_ca:return l.Alert.Description.unknown_ca;default:return l.Alert.Description.bad_certificate}};for(var H in l.verifyCertificateChain=function(e,t){try{var r={};for(var i in e.verifyOptions)r[i]=e.verifyOptions[i];r.verify=function(t,r,i){F(t);var a=e.verify(e,t,r,i);if(!0!==a){if("object"==typeof a&&!n.util.isArray(a)){var o=new Error("The application rejected the certificate.");throw o.send=!0,o.alert={level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate},a.message&&(o.message=a.message),a.alert&&(o.alert.description=a.alert),o}a!==t&&(a=function(e){switch(e){case!0:return!0;case l.Alert.Description.bad_certificate:return n.pki.certificateError.bad_certificate;case l.Alert.Description.unsupported_certificate:return n.pki.certificateError.unsupported_certificate;case l.Alert.Description.certificate_revoked:return n.pki.certificateError.certificate_revoked;case l.Alert.Description.certificate_expired:return n.pki.certificateError.certificate_expired;case l.Alert.Description.certificate_unknown:return n.pki.certificateError.certificate_unknown;case l.Alert.Description.unknown_ca:return n.pki.certificateError.unknown_ca;default:return n.pki.certificateError.bad_certificate}}(a))}return a},n.pki.verifyCertificateChain(e.caStore,t,r)}catch(t){var a=t;("object"!=typeof a||n.util.isArray(a))&&(a={send:!0,alert:{level:l.Alert.Level.fatal,description:F(t)}}),"send"in a||(a.send=!0),"alert"in a||(a.alert={level:l.Alert.Level.fatal,description:F(a.error)}),e.error(e,a)}return!e.fail},l.createSessionCache=function(e,t){var r=null;if(e&&e.getSession&&e.setSession&&e.order)r=e;else{for(var i in(r={}).cache=e||{},r.capacity=Math.max(t||100,1),r.order=[],e)r.order.length<=t?r.order.push(i):delete e[i];r.getSession=function(e){var t=null,i=null;if(e?i=n.util.bytesToHex(e):r.order.length>0&&(i=r.order[0]),null!==i&&i in r.cache)for(var a in t=r.cache[i],delete r.cache[i],r.order)if(r.order[a]===i){r.order.splice(a,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e);r.order.push(i),r.cache[i]=t}}return r},l.createConnection=function(e){var t=null;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],l.CipherSuites)r.push(l.CipherSuites[i]);var a=e.server?l.ConnectionEnd.server:l.ConnectionEnd.client,o=e.sessionCache?l.createSessionCache(e.sessionCache):null,s={version:{major:l.Version.major,minor:l.Version.minor},entity:a,sessionId:e.sessionId,caStore:t,sessionCache:o,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===l.ConnectionEnd.client?"client":"server"),r.send&&(l.queue(t,l.createAlert(t,r.alert)),l.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){s.version={major:l.Version.major,minor:l.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=(s.entity,l.ConnectionEnd.client,0),s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(e||void 0===e),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=l.createConnectionState(s)}};s.reset();return s.handshake=function(e){if(s.entity!==l.ConnectionEnd.client)s.error(s,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(s.handshaking)s.error(s,{message:"Handshake already in progress.",fatal:!1});else{s.fail&&!s.open&&0===s.handshakes&&(s.fail=!1),s.handshaking=!0;var t=null;(e=e||"").length>0&&(s.sessionCache&&(t=s.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&s.sessionCache&&null!==(t=s.sessionCache.getSession())&&(e=t.id),s.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(s.version=t.version,s.session.sp=t.sp),s.session.sp.client_random=l.createRandom().getBytes(),s.open=!0,l.queue(s,l.createRecord(s,{type:l.ContentType.handshake,data:l.createClientHello(s)})),l.flush(s)}},s.process=function(e){var t=0;return e&&s.input.putBytes(e),s.fail||(null!==s.record&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),null===s.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var a=e.record.version.major===e.version.major;a&&e.session&&e.session.version&&(a=e.record.version.minor===e.version.minor),a||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}})}return t}(s)),s.fail||null===s.record||s.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();n<e.record.length?t=e.record.length-n:(e.record.fragment.putBytes(r.getBytes(e.record.length)),r.compact(),e.state.current.read.update(e,e.record)&&(null!==e.fragmented&&(e.fragmented.type===e.record.type?(e.fragmented.fragment.putBuffer(e.record.fragment),e.record=e.fragmented):e.error(e,{message:"Invalid fragmented record.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unexpected_message}})),e.record.ready=!0));return t}(s)),!s.fail&&null!==s.record&&s.record.ready&&function(e,t){var r=t.type-l.ContentType.change_cipher_spec,n=k[e.entity][e.expect];r in n?n[r](e,t):l.handleUnexpected(e,t)}(s,s.record)),t},s.prepare=function(e){return l.queue(s,l.createRecord(s,{type:l.ContentType.application_data,data:n.util.createBuffer(e)})),l.flush(s)},s.prepareHeartbeatRequest=function(e,t){return e instanceof n.util.ByteBuffer&&(e=e.bytes()),void 0===t&&(t=e.length),s.expectedHeartbeatPayload=e,l.queue(s,l.createRecord(s,{type:l.ContentType.heartbeat,data:l.createHeartbeat(l.HeartbeatMessageType.heartbeat_request,e,t)})),l.flush(s)},s.close=function(e){if(!s.fail&&s.sessionCache&&s.session){var t={id:s.session.id,version:s.session.version,sp:s.session.sp};t.sp.keys=null,s.sessionCache.setSession(t.id,t)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,l.queue(s,l.createAlert(s,{level:l.Alert.Level.warning,description:l.Alert.Description.close_notify})),l.flush(s)),s.closed(s)),s.reset(e)},s},e.exports=n.tls=n.tls||{},l)"function"!=typeof l[H]&&(n.tls[H]=l[H]);n.tls.prf_tls1=i,n.tls.hmac_sha1=function(e,t,r){var i=n.hmac.create();i.start("SHA1",e);var a=n.util.createBuffer();return a.putInt32(t[0]),a.putInt32(t[1]),a.putByte(r.type),a.putByte(r.version.major),a.putByte(r.version.minor),a.putInt16(r.length),a.putBytes(r.fragment.bytes()),i.update(a.getBytes()),i.digest().getBytes()},n.tls.createSessionCache=l.createSessionCache,n.tls.createConnection=l.createConnection},function(e,t,r){var n=r(0);if(r(6),r(2),r(13),r(4),r(7),r(20),r(8),r(3),r(30),r(14),r(1),void 0===i)var i=n.jsbn.BigInteger;var a=n.asn1,o=n.pki=n.pki||{};e.exports=o.pbe=n.pbe=n.pbe||{};var s=o.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},l={name:"PBES2Algorithms",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},c={name:"pkcs-12PbeParams",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"iterations"}]};function f(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t;if(e){if(!(t=o.oids[a.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return p(t)}function p(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}o.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,u,l,c=n.random.getBytesSync(r.saltSize),f=r.count,h=a.integerToDer(f);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var d,g,y;switch(r.algorithm){case"aes128":i=16,d=16,g=s["aes128-CBC"],y=n.aes.createEncryptionCipher;break;case"aes192":i=24,d=16,g=s["aes192-CBC"],y=n.aes.createEncryptionCipher;break;case"aes256":i=32,d=16,g=s["aes256-CBC"],y=n.aes.createEncryptionCipher;break;case"des":i=8,d=8,g=s.desCBC,y=n.des.createEncryptionCipher;break;default:throw(T=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,T}var m="hmacWith"+r.prfAlgorithm.toUpperCase(),v=p(m),E=n.pkcs5.pbkdf2(t,c,f,i,v),C=n.random.getBytesSync(d);(S=y(E)).start(C),S.update(a.toDer(e)),S.finish(),l=S.output.getBytes();var b=function(e,t,r,i){var s=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,t.getBytes())]);"hmacWithSHA1"!==i&&s.value.push(a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(o.oids[i]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]));return s}(c,h,i,m);u=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBES2).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.pkcs5PBKDF2).getBytes()),b]),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(g).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,C)])])])}else{var T;if("3des"!==r.algorithm)throw(T=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,T;i=24;var S,A=new n.util.ByteBuffer(c);E=o.pbe.generatePkcs12Key(t,A,1,f,i),C=o.pbe.generatePkcs12Key(t,A,2,f,i);(S=n.des.createEncryptionCipher(E)).start(C),S.update(a.toDer(e)),S.finish(),l=S.output.getBytes(),u=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,c),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,h.getBytes())])])}return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[u,a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,l)])},o.decryptPrivateKeyInfo=function(e,t){var r=null,i={},s=[];if(!a.validate(e,u,i,s)){var l=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=s,l}var c=a.derToOid(i.encryptionOid),f=o.pbe.getCipher(c,i.encryptionParams,t),h=n.util.createBuffer(i.encryptedData);return f.update(h),f.finish()&&(r=a.fromDer(f.output)),r},o.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:a.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},o.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return a.fromDer(t.body)},o.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));return i=o.encryptPrivateKeyInfo(i,t,r),o.encryptedPrivateKeyToPem(i)}var s,u,l,c;switch(r.algorithm){case"aes128":s="AES-128-CBC",l=16,u=n.random.getBytesSync(16),c=n.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",l=24,u=n.random.getBytesSync(16),c=n.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",l=32,u=n.random.getBytesSync(16),c=n.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",l=24,u=n.random.getBytesSync(8),c=n.des.createEncryptionCipher;break;case"des":s="DES-CBC",l=8,u=n.random.getBytesSync(8),c=n.des.createEncryptionCipher;break;default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw f.algorithm=r.algorithm,f}var h=c(n.pbe.opensslDeriveBytes(t,u.substr(0,8),l));h.start(u),h.update(a.toDer(o.privateKeyToAsn1(e))),h.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()};return n.pem.encode(p)},o.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(l=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=l,l;if(i.procType&&"ENCRYPTED"===i.procType.type){var s,u;switch(i.dekInfo.algorithm){case"DES-CBC":s=8,u=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,u=n.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,u=n.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,u=n.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,u=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":s=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":s=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var l;throw(l=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,l}var c=n.util.hexToBytes(i.dekInfo.parameters),f=u(n.pbe.opensslDeriveBytes(t,c.substr(0,8),s));if(f.start(c),f.update(n.util.createBuffer(i.body)),!f.finish())return r;r=f.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?o.decryptPrivateKeyInfo(a.fromDer(r),t):a.fromDer(r))&&(r=o.privateKeyFromAsn1(r)),r},o.pbe.generatePkcs12Key=function(e,t,r,i,a,o){var s,u;if(null==o){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');o=n.md.sha1.create()}var l=o.digestLength,c=o.blockLength,f=new n.util.ByteBuffer,h=new n.util.ByteBuffer;if(null!=e){for(u=0;u<e.length;u++)h.putInt16(e.charCodeAt(u));h.putInt16(0)}var p=h.length(),d=t.length(),g=new n.util.ByteBuffer;g.fillWithByte(r,c);var y=c*Math.ceil(d/c),m=new n.util.ByteBuffer;for(u=0;u<y;u++)m.putByte(t.at(u%d));var v=c*Math.ceil(p/c),E=new n.util.ByteBuffer;for(u=0;u<v;u++)E.putByte(h.at(u%p));var C=m;C.putBuffer(E);for(var b=Math.ceil(a/l),T=1;T<=b;T++){var S=new n.util.ByteBuffer;S.putBytes(g.bytes()),S.putBytes(C.bytes());for(var A=0;A<i;A++)o.start(),o.update(S.getBytes()),S=o.digest();var _=new n.util.ByteBuffer;for(u=0;u<c;u++)_.putByte(S.at(u%l));var I=Math.ceil(d/c)+Math.ceil(p/c),w=new n.util.ByteBuffer;for(s=0;s<I;s++){var B=new n.util.ByteBuffer(C.getBytes(c)),N=511;for(u=_.length()-1;u>=0;u--)N>>=8,N+=_.at(u)+B.at(u),B.setAt(u,255&N);w.putBuffer(B)}C=w,f.putBuffer(S)}return f.truncate(f.length()-a),f},o.pbe.getCipher=function(e,t,r){switch(e){case o.oids.pkcs5PBES2:return o.pbe.getCipherForPBES2(e,t,r);case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case o.oids["pbewithSHAAnd40BitRC2-CBC"]:return o.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},o.pbe.getCipherForPBES2=function(e,t,r){var i,s={},u=[];if(!a.validate(t,l,s,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((e=a.derToOid(s.kdfOid))!==o.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=a.derToOid(s.encOid))!==o.oids["aes128-CBC"]&&e!==o.oids["aes192-CBC"]&&e!==o.oids["aes256-CBC"]&&e!==o.oids["des-EDE3-CBC"]&&e!==o.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var c,f,p=s.kdfSalt,d=n.util.createBuffer(s.kdfIterationCount);switch(d=d.getInt(d.length()<<3),o.oids[e]){case"aes128-CBC":c=16,f=n.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,f=n.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,f=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,f=n.des.createDecryptionCipher;break;case"desCBC":c=8,f=n.des.createDecryptionCipher}var g=h(s.prfOid),y=n.pkcs5.pbkdf2(r,p,d,c,g),m=s.encIv,v=f(y);return v.start(m),v},o.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},s=[];if(!a.validate(t,c,i,s))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,g;var u,l,f,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),e){case o.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,l=8,f=n.des.startDecrypting;break;case o.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,l=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,g}var y=h(i.prfOid),m=o.pbe.generatePkcs12Key(r,p,1,d,u,y);return y.start(),f(m,o.pbe.generatePkcs12Key(r,p,2,d,l,y))},o.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var a=[f(i,e+t)],o=16,s=1;o<r;++s,o+=16)a.push(f(i,a[s-1]+e+t));return a.join("").substr(0,r)}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){o||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),s=[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],o=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a<r;++a)i.fullMessageLength.push(0);return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}};return i.start(),i.update=function(a,o){"utf8"===o&&(a=n.util.encodeUtf8(a));var s=a.length;i.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=s[1],s[1]=s[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var o=n.util.createBuffer();o.putBytes(t.bytes());var s,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;o.putBytes(a.substr(0,i.blockLength-l));for(var c=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)c+=(s=8*i.fullMessageLength[f+1])/4294967296>>>0,o.putInt32(c>>>0),c=s>>>0;o.putInt32(c);var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};u(h,r,o);var p=n.util.createBuffer();return p.putInt32(h.h0),p.putInt32(h.h1),p.putInt32(h.h2),p.putInt32(h.h3),p.putInt32(h.h4),p.putInt32(h.h5),p.putInt32(h.h6),p.putInt32(h.h7),p},i};var a=null,o=!1,s=null;function u(e,t,r){for(var n,i,a,o,u,l,c,f,h,p,d,g,y,m=r.length();m>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0;for(l=e.h0,c=e.h1,f=e.h2,h=e.h3,p=e.h4,d=e.h5,g=e.h6,y=e.h7,u=0;u<64;++u)a=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),o=l&c|f&(l^c),n=y+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(g^p&(d^g))+s[u]+t[u],y=g,g=d,d=p,p=h+n>>>0,h=f,f=c,c=l,l=n+(i=a+o)>>>0;e.h0=e.h0+l|0,e.h1=e.h1+c|0,e.h2=e.h2+f|0,e.h3=e.h3+h|0,e.h4=e.h4+p|0,e.h5=e.h5+d|0,e.h6=e.h6+g|0,e.h7=e.h7+y|0,m-=64}}},function(e,t,r){(function(t){var n=r(0);r(1);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(21)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,a=new Array(32),o=0;o<32;++o)a[o]=r.create();function s(){if(t.pools[0].messageLength>=32)return u();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function l(e){var t=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var a=n.util.createBuffer();if(t)for(;a.length()<e;){var o=Math.max(1,Math.min(e-a.length(),65536)/4),s=new Uint32Array(Math.floor(o));try{t(s);for(var u=0;u<s.length;++u)a.putInt32(s[u])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(a.length()<e)for(var l,c,f,h=Math.floor(65536*Math.random());a.length()<e;){c=16807*(65535&h),c+=(32767&(l=16807*(h>>16)))<<16,h=4294967295&(c=(2147483647&(c+=l>>15))+(c>>31));for(u=0;u<3;++u)f=h>>>(u<<3),f^=Math.floor(256*Math.random()),a.putByte(String.fromCharCode(255&f))}return a.getBytes(e)}return t.pools=a,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,a=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed,l=n.util.createBuffer();t.key=null,function c(f){if(f)return r(f);if(l.length()>=e)return r(null,l.getBytes(e));t.generated>1048575&&(t.key=null);if(null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),u(),e()}))}(c)}));var h=i(t.key,t.seed);t.generated+=h.length,l.putBytes(h),t.key=o(i(t.key,a(t.seed))),t.seed=s(i(t.key,t.seed)),n.util.setImmediate(c)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,a=t.plugin.formatKey,o=t.plugin.formatSeed;t.key=null;for(var u=n.util.createBuffer();u.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&s();var l=r(t.key,t.seed);t.generated+=l.length,u.putBytes(l),t.key=a(r(t.key,i(t.seed))),t.seed=o(r(t.key,t.seed))}return u.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,l(e))}catch(e){t(e)}},t.seedFileSync=l),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(e>>i&255);t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})};else{e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))}},t}}).call(this,r(17))},function(e,t,r){var n=r(0);r(1);var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],a=[1,2,3,5],o=function(e,t){return e<<t&65535|(65535&e)>>16-t},s=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,a=e,o=e.length(),s=t,u=Math.ceil(s/8),l=255>>(7&s);for(r=o;r<128;r++)a.putByte(i[a.at(r-1)+a.at(r-o)&255]);for(a.setAt(128-u,i[a.at(128-u)&l]),r=127-u;r>=0;r--)a.setAt(r,i[a.at(r+1)^a.at(r+u)]);return a};var u=function(e,t,r){var i,u,l,c,f=!1,h=null,p=null,d=null,g=[];for(e=n.rc2.expandKey(e,t),l=0;l<64;l++)g.push(e.getInt16Le());r?(i=function(e){for(l=0;l<4;l++)e[l]+=g[c]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),e[l]=o(e[l],a[l]),c++},u=function(e){for(l=0;l<4;l++)e[l]+=g[63&e[(l+3)%4]]}):(i=function(e){for(l=3;l>=0;l--)e[l]=s(e[l],a[l]),e[l]-=g[c]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),c--},u=function(e){for(l=3;l>=0;l--)e[l]-=g[63&e[(l+3)%4]]});var y=function(e){var t=[];for(l=0;l<4;l++){var n=h.getInt16Le();null!==d&&(r?n^=d.getInt16Le():d.putInt16Le(n)),t.push(65535&n)}c=r?0:63;for(var i=0;i<e.length;i++)for(var a=0;a<e[i][0];a++)e[i][1](t);for(l=0;l<4;l++)null!==d&&(r?d.putInt16Le(t[l]):t[l]^=d.getInt16Le()),p.putInt16Le(t[l])},m=null;return m={start:function(e,t){e&&"string"==typeof e&&(e=n.util.createBuffer(e)),f=!1,h=n.util.createBuffer(),p=t||new n.util.createBuffer,d=e,m.output=p},update:function(e){for(f||h.putBuffer(e);h.length()>=8;)y([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,h,!r);else{var n=8===h.length()?8:8-h.length();h.fillWithByte(n,n)}if(t&&(f=!0,m.update()),!r&&(t=0===h.length()))if(e)t=e(8,p,!r);else{var i=p.length(),a=p.at(i-1);a>i?t=!1:p.truncate(a)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,r){var n=r(0);r(1),r(3),r(11);var i=e.exports=n.pkcs1=n.pkcs1||{};function a(e,t,r){r||(r=n.md.sha1.create());for(var i="",a=Math.ceil(t/r.digestLength),o=0;o<a;++o){var s=String.fromCharCode(o>>24&255,o>>16&255,o>>8&255,255&o);r.start(),r.update(e+s),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,o,s,u;"string"==typeof r?(i=r,o=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,o=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),u||(u=s);var l=Math.ceil(e.n.bitLength()/8),c=l-2*s.digestLength-2;if(t.length>c)throw(y=new Error("RSAES-OAEP input message length is too long.")).length=t.length,y.maxLength=c,y;i||(i=""),s.update(i,"raw");for(var f=s.digest(),h="",p=c-t.length,d=0;d<p;d++)h+="\0";var g=f.getBytes()+h+""+t;if(o){if(o.length!==s.digestLength){var y;throw(y=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=o.length,y.digestLength=s.digestLength,y}}else o=n.random.getBytes(s.digestLength);var m=a(o,l-s.digestLength-1,u),v=n.util.xorBytes(g,m,g.length),E=a(v,s.digestLength,u),C=n.util.xorBytes(o,E,o.length);return"\0"+C+v},i.decode_rsa_oaep=function(e,t,r){var i,o,s;"string"==typeof r?(i=r,o=arguments[3]||void 0):r&&(i=r.label||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var u=Math.ceil(e.n.bitLength()/8);if(t.length!==u)throw(v=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,v.expectedLength=u,v;if(void 0===o?o=n.md.sha1.create():o.start(),s||(s=o),u<2*o.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),o.update(i,"raw");for(var l=o.digest().getBytes(),c=t.charAt(0),f=t.substring(1,o.digestLength+1),h=t.substring(1+o.digestLength),p=a(h,o.digestLength,s),d=n.util.xorBytes(f,p,f.length),g=a(d,u-o.digestLength-1,s),y=n.util.xorBytes(h,g,h.length),m=y.substring(0,o.digestLength),v="\0"!==c,E=0;E<o.digestLength;++E)v|=l.charAt(E)!==m.charAt(E);for(var C=1,b=o.digestLength,T=o.digestLength;T<y.length;T++){var S=y.charCodeAt(T),A=1&S^1,_=C?65534:0;v|=S&_,b+=C&=A}if(v||1!==y.charCodeAt(b))throw new Error("Invalid RSAES-OAEP padding.");return y.substring(b+1)}},function(e,t,r){var n=r(0);r(1),r(15),r(3),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],a=new r(null);a.fromInt(30);var o=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={});var a=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof a&&(a={name:a}),a.options=a.options||{};var o=t.prng||n.random,l={nextBytes:function(e){for(var t=o.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}};if("PRIMEINC"===a.name)return function(e,t,i,a){if("workers"in i)return function(e,t,i,a){if("undefined"==typeof Worker)return s(e,t,i,a);var o=u(e,t),l=i.workers,c=i.workLoad||100,f=30*c/8,h=i.workerScript||"forge/prime.worker.js";if(-1===l)return n.util.estimateCores((function(e,t){e&&(t=2),l=t-1,p()}));function p(){l=Math.max(1,l);for(var n=[],i=0;i<l;++i)n[i]=new Worker(h);for(i=0;i<l;++i)n[i].addEventListener("message",p);var s=!1;function p(i){if(!s){0;var l=i.data;if(l.found){for(var h=0;h<n.length;++h)n[h].terminate();return s=!0,a(null,new r(l.prime,16))}o.bitLength()>e&&(o=u(e,t));var p=o.toString(16);i.target.postMessage({hex:p,workLoad:c}),o.dAddOffset(f,0)}}}p()}(e,t,i,a);return s(e,t,i,a)}(e,l,a.options,i);throw new Error("Invalid prime generation algorithm: "+a.name)}}function s(e,t,r,a){var o=u(e,t),s=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(o.bitLength());"millerRabinTests"in r&&(s=r.millerRabinTests);var l=10;"maxBlockTime"in r&&(l=r.maxBlockTime),function e(t,r,a,o,s,l,c){var f=+new Date;do{if(t.bitLength()>r&&(t=u(r,a)),t.isProbablePrime(s))return c(null,t);t.dAddOffset(i[o++%8],0)}while(l<0||+new Date-f<l);n.util.setImmediate((function(){e(t,r,a,o,s,l,c)}))}(o,e,t,0,s,l,a)}function u(e,t){var n=new r(e,t),i=e-1;return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),o,n),n.dAddOffset(31-n.mod(a).byteValue(),0),n}}()},function(e,t,r){var n=r(0);r(2),r(1);var i=n.asn1,a=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=a;var o={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};a.contentInfoValidator=o;var s={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};a.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(s)},a.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(s)};var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};a.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},o,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},a.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},function(e,t,r){var n=r(0);r(1),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,a=Math.ceil(r/e.digestLength),o=0;o<a;o++){var s=new n.util.ByteBuffer;s.putInt32(o),e.start(),e.update(t+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}}}},function(e,t,r){var n=r(0);e.exports=n.debug=n.debug||{},n.debug.storage={},n.debug.get=function(e,t){var r;return void 0===e?r=n.debug.storage:e in n.debug.storage&&(r=void 0===t?n.debug.storage[e]:n.debug.storage[e][t]),r},n.debug.set=function(e,t,r){e in n.debug.storage||(n.debug.storage[e]={}),n.debug.storage[e][t]=r},n.debug.clear=function(e,t){void 0===e?n.debug.storage={}:e in n.debug.storage&&(void 0===t?delete n.debug.storage[e]:delete n.debug.storage[e][t])}},function(e,t,r){var n=r(0);r(4),r(1);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var a=n.sha384=n.sha512.sha384=n.sha512.sha384||{};a.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=a,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),128),u=[[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]],(l={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],l["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],l["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],l["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],s=!0),void 0===e&&(e="SHA-512"),!(e in l))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=l[e],r=null,i=n.util.createBuffer(),a=new Array(80),f=0;f<80;++f)a[f]=new Array(2);var h=64;switch(e){case"SHA-384":h=48;break;case"SHA-512/256":h=32;break;case"SHA-512/224":h=28}var p={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){p.messageLength=0,p.fullMessageLength=p.messageLength128=[];for(var e=p.messageLengthSize/4,a=0;a<e;++a)p.fullMessageLength.push(0);i=n.util.createBuffer(),r=new Array(t.length);for(a=0;a<t.length;++a)r[a]=t[a].slice(0);return p}};return p.start(),p.update=function(e,t){"utf8"===t&&(e=n.util.encodeUtf8(e));var o=e.length;p.messageLength+=o,o=[o/4294967296>>>0,o>>>0];for(var s=p.fullMessageLength.length-1;s>=0;--s)p.fullMessageLength[s]+=o[1],o[1]=o[0]+(p.fullMessageLength[s]/4294967296>>>0),p.fullMessageLength[s]=p.fullMessageLength[s]>>>0,o[0]=o[1]/4294967296>>>0;return i.putBytes(e),c(r,a,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var s,u=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;t.putBytes(o.substr(0,p.blockLength-u));for(var l=8*p.fullMessageLength[0],f=0;f<p.fullMessageLength.length-1;++f)l+=(s=8*p.fullMessageLength[f+1])/4294967296>>>0,t.putInt32(l>>>0),l=s>>>0;t.putInt32(l);var h=new Array(r.length);for(f=0;f<r.length;++f)h[f]=r[f].slice(0);c(h,a,t);var d,g=n.util.createBuffer();d="SHA-512"===e?h.length:"SHA-384"===e?h.length-2:h.length-4;for(f=0;f<d;++f)g.putInt32(h[f][0]),f===d-1&&"SHA-512/224"===e||g.putInt32(h[f][1]);return g},p};var o=null,s=!1,u=null,l=null;function c(e,t,r){for(var n,i,a,o,s,l,c,f,h,p,d,g,y,m,v,E,C,b,T,S,A,_,I,w,B,N,k,D,L,R,x,O,P,U=r.length();U>=128;){for(k=0;k<16;++k)t[k][0]=r.getInt32()>>>0,t[k][1]=r.getInt32()>>>0;for(;k<80;++k)n=(((D=(R=t[k-2])[0])>>>19|(L=R[1])<<13)^(L>>>29|D<<3)^D>>>6)>>>0,i=((D<<13|L>>>19)^(L<<3|D>>>29)^(D<<26|L>>>6))>>>0,a=(((D=(O=t[k-15])[0])>>>1|(L=O[1])<<31)^(D>>>8|L<<24)^D>>>7)>>>0,o=((D<<31|L>>>1)^(D<<24|L>>>8)^(D<<25|L>>>7))>>>0,x=t[k-7],P=t[k-16],L=i+x[1]+o+P[1],t[k][0]=n+x[0]+a+P[0]+(L/4294967296>>>0)>>>0,t[k][1]=L>>>0;for(d=e[0][0],g=e[0][1],y=e[1][0],m=e[1][1],v=e[2][0],E=e[2][1],C=e[3][0],b=e[3][1],T=e[4][0],S=e[4][1],A=e[5][0],_=e[5][1],I=e[6][0],w=e[6][1],B=e[7][0],N=e[7][1],k=0;k<80;++k)c=((T>>>14|S<<18)^(T>>>18|S<<14)^(S>>>9|T<<23))>>>0,f=(I^T&(A^I))>>>0,s=((d>>>28|g<<4)^(g>>>2|d<<30)^(g>>>7|d<<25))>>>0,l=((d<<4|g>>>28)^(g<<30|d>>>2)^(g<<25|d>>>7))>>>0,h=(d&y|v&(d^y))>>>0,p=(g&m|E&(g^m))>>>0,L=N+(((T<<18|S>>>14)^(T<<14|S>>>18)^(S<<23|T>>>9))>>>0)+((w^S&(_^w))>>>0)+u[k][1]+t[k][1],n=B+c+f+u[k][0]+t[k][0]+(L/4294967296>>>0)>>>0,i=L>>>0,a=s+h+((L=l+p)/4294967296>>>0)>>>0,o=L>>>0,B=I,N=w,I=A,w=_,A=T,_=S,T=C+n+((L=b+i)/4294967296>>>0)>>>0,S=L>>>0,C=v,b=E,v=y,E=m,y=d,m=g,d=n+a+((L=i+o)/4294967296>>>0)>>>0,g=L>>>0;L=e[0][1]+g,e[0][0]=e[0][0]+d+(L/4294967296>>>0)>>>0,e[0][1]=L>>>0,L=e[1][1]+m,e[1][0]=e[1][0]+y+(L/4294967296>>>0)>>>0,e[1][1]=L>>>0,L=e[2][1]+E,e[2][0]=e[2][0]+v+(L/4294967296>>>0)>>>0,e[2][1]=L>>>0,L=e[3][1]+b,e[3][0]=e[3][0]+C+(L/4294967296>>>0)>>>0,e[3][1]=L>>>0,L=e[4][1]+S,e[4][0]=e[4][0]+T+(L/4294967296>>>0)>>>0,e[4][1]=L>>>0,L=e[5][1]+_,e[5][0]=e[5][0]+A+(L/4294967296>>>0)>>>0,e[5][1]=L>>>0,L=e[6][1]+w,e[6][0]=e[6][0]+I+(L/4294967296>>>0)>>>0,e[6][1]=L>>>0,L=e[7][1]+N,e[7][0]=e[7][0]+B+(L/4294967296>>>0)>>>0,e[7][1]=L>>>0,U-=128}}},function(e,t,r){var n=r(0);r(1),e.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},a=[],o=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var s=0;s<n.log.levels.length;++s){var u=n.log.levels[s];i[u]={index:s,name:u.toUpperCase()}}n.log.logMessage=function(e){for(var t=i[e.level].index,r=0;r<a.length;++r){var o=a[r];if(o.flags&n.log.NO_LEVEL_CHECK)o.f(e);else t<=i[o.level].index&&o.f(o,e)}},n.log.prepareStandard=function(e){"standard"in e||(e.standard=i[e.level].name+" ["+e.category+"] "+e.message)},n.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]||!1),e.full=n.util.format.apply(this,t)}},n.log.prepareStandardFull=function(e){"standardFull"in e||(n.log.prepareStandard(e),e.standardFull=e.standard)};var l=["error","warning","info","debug","verbose"];for(s=0;s<l.length;++s)!function(e){n.log[e]=function(t,r){var i=Array.prototype.slice.call(arguments).slice(2),a={timestamp:new Date,level:e,category:t,message:r,arguments:i};n.log.logMessage(a)}}(l[s]);if(n.log.makeLogger=function(e){var t={flags:0,f:e};return n.log.setLevel(t,"none"),t},n.log.setLevel=function(e,t){var r=!1;if(e&&!(e.flags&n.log.LEVEL_LOCKED))for(var i=0;i<n.log.levels.length;++i){if(t==n.log.levels[i]){e.level=t,r=!0;break}}return r},n.log.lock=function(e,t){void 0===t||t?e.flags|=n.log.LEVEL_LOCKED:e.flags&=~n.log.LEVEL_LOCKED},n.log.addLogger=function(e){a.push(e)},"undefined"!=typeof console&&"log"in console){var c;if(console.error&&console.warn&&console.info&&console.debug){var f={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},h=function(e,t){n.log.prepareStandard(t);var r=f[t.level],i=[t.standard];i=i.concat(t.arguments.slice()),r.apply(console,i)};c=n.log.makeLogger(h)}else{h=function(e,t){n.log.prepareStandardFull(t),console.log(t.standardFull)};c=n.log.makeLogger(h)}n.log.setLevel(c,"debug"),n.log.addLogger(c),o=c}else console={log:function(){}};if(null!==o){var p=n.util.getQueryVariables();if("console.level"in p&&n.log.setLevel(o,p["console.level"].slice(-1)[0]),"console.lock"in p)"true"==p["console.lock"].slice(-1)[0]&&n.log.lock(o)}n.log.consoleLogger=o},function(e,t,r){r(39),e.exports=r(60)},function(e,t,r){"use strict";r.r(t),function(e){r(5),r(40),r(42);window.$=window.jQuery=r(5);r(43),r(59);var t=r(19),n=r(2),i=r(22),a=r(1);window.totp={init:function(){}},window.fido2={init:function(){}},window.client_cert={init_list:function(){},init_new:function(){e("form#gen-key-form")},generate_private_key:function(){var r=e("form#gen-key-form"),o=r.find("#key-size").val(),s=r.find("input[name=valid_time]").val();e("button#generate-key")[0].style.display="none",t.rsa.generateKeyPair({bits:o,workers:2},(function(o,u){console.log(u),r.data("keypair",u);var l=e("#gen-key-sign form");l.find("textarea[name=publickey]").val(t.publicKeyToPem(u.publicKey)),l.find("input[name=valid_time]").val(s),l.ajaxForm({success:function(o){var s,u=o.data,l=[t.certificateFromPem(u.cert),t.certificateFromPem(u.ca_cert)],c=r.find("#cert-password").val(),f=r.data("keypair");s=""==c?i.toPkcs12Asn1(f.privateKey,l,null):i.toPkcs12Asn1(f.privateKey,l,c,{algorithm:"3des"});var h=n.toDer(s).getBytes(),p=a.encode64(h),d=e("#save-button")[0];d.href="data:application/x-pkcs12;base64,"+p,d.style.display="block"}}),l.submit()}))}}}.call(this,r(5))},function(e,t,r){!function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e){var r=this,n=!1;return t(this).one(l.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||l.triggerTransitionEnd(r)}),e),this}t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r;var l={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var r=e.getAttribute("href");t=r&&"#"!==r?r.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var r=t(e).css("transition-duration"),n=t(e).css("transition-delay"),i=parseFloat(r),a=parseFloat(n);return i||a?(r=r.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(r)+parseFloat(n))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,r){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var i=r[n],a=t[n],o=a&&l.isElement(a)?"element":(s=a,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(i).test(o))throw new Error(e.toUpperCase()+': Option "'+n+'" provided type "'+o+'" but expected type "'+i+'".')}var s},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?l.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};l.jQueryDetection(),t.fn.emulateTransitionEnd=u,t.event.special[l.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}};var c="alert",f=t.fn[c],h={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},p="alert",d="fade",g="show",y=function(){function e(e){this._element=e}var r=e.prototype;return r.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},r.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},r._getRootElement=function(e){var r=l.getSelectorFromElement(e),n=!1;return r&&(n=document.querySelector(r)),n||(n=t(e).closest("."+p)[0]),n},r._triggerCloseEvent=function(e){var r=t.Event(h.CLOSE);return t(e).trigger(r),r},r._removeElement=function(e){var r=this;if(t(e).removeClass(g),t(e).hasClass(d)){var n=l.getTransitionDurationFromElement(e);t(e).one(l.TRANSITION_END,(function(t){return r._destroyElement(e,t)})).emulateTransitionEnd(n)}else this._destroyElement(e)},r._destroyElement=function(e){t(e).detach().trigger(h.CLOSED).remove()},e._jQueryInterface=function(r){return this.each((function(){var n=t(this),i=n.data("bs.alert");i||(i=new e(this),n.data("bs.alert",i)),"close"===r&&i[r](this)}))},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(h.CLICK_DATA_API,'[data-dismiss="alert"]',y._handleDismiss(new y)),t.fn[c]=y._jQueryInterface,t.fn[c].Constructor=y,t.fn[c].noConflict=function(){return t.fn[c]=f,y._jQueryInterface};var m=t.fn.button,v="active",E="btn",C="focus",b='[data-toggle^="button"]',T='[data-toggle="buttons"]',S='[data-toggle="button"]',A='[data-toggle="buttons"] .btn',_='input:not([type="hidden"])',I=".active",w=".btn",B={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api",LOAD_DATA_API:"load.bs.button.data-api"},N=function(){function e(e){this._element=e}var r=e.prototype;return r.toggle=function(){var e=!0,r=!0,n=t(this._element).closest(T)[0];if(n){var i=this._element.querySelector(_);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(v))e=!1;else{var a=n.querySelector(I);a&&t(a).removeClass(v)}else"checkbox"===i.type?"LABEL"===this._element.tagName&&i.checked===this._element.classList.contains(v)&&(e=!1):e=!1;e&&(i.checked=!this._element.classList.contains(v),t(i).trigger("change")),i.focus(),r=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(r&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(v)),e&&t(this._element).toggleClass(v))},r.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(r){return this.each((function(){var n=t(this).data("bs.button");n||(n=new e(this),t(this).data("bs.button",n)),"toggle"===r&&n[r]()}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(B.CLICK_DATA_API,b,(function(e){var r=e.target;if(t(r).hasClass(E)||(r=t(r).closest(w)[0]),!r||r.hasAttribute("disabled")||r.classList.contains("disabled"))e.preventDefault();else{var n=r.querySelector(_);if(n&&(n.hasAttribute("disabled")||n.classList.contains("disabled")))return void e.preventDefault();N._jQueryInterface.call(t(r),"toggle")}})).on(B.FOCUS_BLUR_DATA_API,b,(function(e){var r=t(e.target).closest(w)[0];t(r).toggleClass(C,/^focus(in)?$/.test(e.type))})),t(window).on(B.LOAD_DATA_API,(function(){for(var e=[].slice.call(document.querySelectorAll(A)),t=0,r=e.length;t<r;t++){var n=e[t],i=n.querySelector(_);i.checked||i.hasAttribute("checked")?n.classList.add(v):n.classList.remove(v)}for(var a=0,o=(e=[].slice.call(document.querySelectorAll(S))).length;a<o;a++){var s=e[a];"true"===s.getAttribute("aria-pressed")?s.classList.add(v):s.classList.remove(v)}})),t.fn.button=N._jQueryInterface,t.fn.button.Constructor=N,t.fn.button.noConflict=function(){return t.fn.button=m,N._jQueryInterface};var k="carousel",D=".bs.carousel",L=t.fn[k],R={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},x={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},O="next",P="prev",U="left",M="right",V={SLIDE:"slide"+D,SLID:"slid"+D,KEYDOWN:"keydown"+D,MOUSEENTER:"mouseenter"+D,MOUSELEAVE:"mouseleave"+D,TOUCHSTART:"touchstart"+D,TOUCHMOVE:"touchmove"+D,TOUCHEND:"touchend"+D,POINTERDOWN:"pointerdown"+D,POINTERUP:"pointerup"+D,DRAG_START:"dragstart"+D,LOAD_DATA_API:"load"+D+".data-api",CLICK_DATA_API:"click"+D+".data-api"},j="carousel",K="active",F="slide",H="carousel-item-right",q="carousel-item-left",G="carousel-item-next",W="carousel-item-prev",Q="pointer-event",z=".active",Y=".active.carousel-item",X=".carousel-item",$=".carousel-item img",Z=".carousel-item-next, .carousel-item-prev",J=".carousel-indicators",ee="[data-slide], [data-slide-to]",te='[data-ride="carousel"]',re={TOUCH:"touch",PEN:"pen"},ne=function(){function e(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._element=e,this._indicatorsElement=this._element.querySelector(J),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var r=e.prototype;return r.next=function(){this._isSliding||this._slide(O)},r.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},r.prev=function(){this._isSliding||this._slide(P)},r.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(Z)&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},r.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},r.to=function(e){var r=this;this._activeElement=this._element.querySelector(Y);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(V.SLID,(function(){return r.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var i=e>n?O:P;this._slide(i,this._items[e])}},r.dispose=function(){t(this._element).off(D),t.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},r._getConfig=function(e){return e=s({},R,{},e),l.typeCheckConfig(k,e,x),e},r._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},r._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(V.KEYDOWN,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&t(this._element).on(V.MOUSEENTER,(function(t){return e.pause(t)})).on(V.MOUSELEAVE,(function(t){return e.cycle(t)})),this._config.touch&&this._addTouchEventListeners()},r._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var r=function(t){e._pointerEvent&&re[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},n=function(t){e._pointerEvent&&re[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};t(this._element.querySelectorAll($)).on(V.DRAG_START,(function(e){return e.preventDefault()})),this._pointerEvent?(t(this._element).on(V.POINTERDOWN,(function(e){return r(e)})),t(this._element).on(V.POINTERUP,(function(e){return n(e)})),this._element.classList.add(Q)):(t(this._element).on(V.TOUCHSTART,(function(e){return r(e)})),t(this._element).on(V.TOUCHMOVE,(function(t){return function(t){t.originalEvent.touches&&t.originalEvent.touches.length>1?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX}(t)})),t(this._element).on(V.TOUCHEND,(function(e){return n(e)})))}},r._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},r._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(X)):[],this._items.indexOf(e)},r._getItemByDirection=function(e,t){var r=e===O,n=e===P,i=this._getItemIndex(t),a=this._items.length-1;if((n&&0===i||r&&i===a)&&!this._config.wrap)return t;var o=(i+(e===P?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},r._triggerSlideEvent=function(e,r){var n=this._getItemIndex(e),i=this._getItemIndex(this._element.querySelector(Y)),a=t.Event(V.SLIDE,{relatedTarget:e,direction:r,from:i,to:n});return t(this._element).trigger(a),a},r._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var r=[].slice.call(this._indicatorsElement.querySelectorAll(z));t(r).removeClass(K);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(K)}},r._slide=function(e,r){var n,i,a,o=this,s=this._element.querySelector(Y),u=this._getItemIndex(s),c=r||s&&this._getItemByDirection(e,s),f=this._getItemIndex(c),h=Boolean(this._interval);if(e===O?(n=q,i=G,a=U):(n=H,i=W,a=M),c&&t(c).hasClass(K))this._isSliding=!1;else if(!this._triggerSlideEvent(c,a).isDefaultPrevented()&&s&&c){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(c);var p=t.Event(V.SLID,{relatedTarget:c,direction:a,from:u,to:f});if(t(this._element).hasClass(F)){t(c).addClass(i),l.reflow(c),t(s).addClass(n),t(c).addClass(n);var d=parseInt(c.getAttribute("data-interval"),10);d?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=d):this._config.interval=this._config.defaultInterval||this._config.interval;var g=l.getTransitionDurationFromElement(s);t(s).one(l.TRANSITION_END,(function(){t(c).removeClass(n+" "+i).addClass(K),t(s).removeClass(K+" "+i+" "+n),o._isSliding=!1,setTimeout((function(){return t(o._element).trigger(p)}),0)})).emulateTransitionEnd(g)}else t(s).removeClass(K),t(c).addClass(K),this._isSliding=!1,t(this._element).trigger(p);h&&this.cycle()}},e._jQueryInterface=function(r){return this.each((function(){var n=t(this).data("bs.carousel"),i=s({},R,{},t(this).data());"object"==typeof r&&(i=s({},i,{},r));var a="string"==typeof r?r:i.slide;if(n||(n=new e(this,i),t(this).data("bs.carousel",n)),"number"==typeof r)n.to(r);else if("string"==typeof a){if(void 0===n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},e._dataApiClickHandler=function(r){var n=l.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(j)){var a=s({},t(i).data(),{},t(this).data()),o=this.getAttribute("data-slide-to");o&&(a.interval=!1),e._jQueryInterface.call(t(i),a),o&&t(i).data("bs.carousel").to(o),r.preventDefault()}}},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return R}}]),e}();t(document).on(V.CLICK_DATA_API,ee,ne._dataApiClickHandler),t(window).on(V.LOAD_DATA_API,(function(){for(var e=[].slice.call(document.querySelectorAll(te)),r=0,n=e.length;r<n;r++){var i=t(e[r]);ne._jQueryInterface.call(i,i.data())}})),t.fn[k]=ne._jQueryInterface,t.fn[k].Constructor=ne,t.fn[k].noConflict=function(){return t.fn[k]=L,ne._jQueryInterface};var ie="collapse",ae=t.fn[ie],oe={toggle:!0,parent:""},se={toggle:"boolean",parent:"(string|element)"},ue={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},le="show",ce="collapse",fe="collapsing",he="collapsed",pe="width",de="height",ge=".show, .collapsing",ye='[data-toggle="collapse"]',me=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var r=[].slice.call(document.querySelectorAll(ye)),n=0,i=r.length;n<i;n++){var a=r[n],o=l.getSelectorFromElement(a),s=[].slice.call(document.querySelectorAll(o)).filter((function(t){return t===e}));null!==o&&s.length>0&&(this._selector=o,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var r=e.prototype;return r.toggle=function(){t(this._element).hasClass(le)?this.hide():this.show()},r.show=function(){var r,n,i=this;if(!(this._isTransitioning||t(this._element).hasClass(le)||(this._parent&&0===(r=[].slice.call(this._parent.querySelectorAll(ge)).filter((function(e){return"string"==typeof i._config.parent?e.getAttribute("data-parent")===i._config.parent:e.classList.contains(ce)}))).length&&(r=null),r&&(n=t(r).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var a=t.Event(ue.SHOW);if(t(this._element).trigger(a),!a.isDefaultPrevented()){r&&(e._jQueryInterface.call(t(r).not(this._selector),"hide"),n||t(r).data("bs.collapse",null));var o=this._getDimension();t(this._element).removeClass(ce).addClass(fe),this._element.style[o]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(he).attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(o[0].toUpperCase()+o.slice(1)),u=l.getTransitionDurationFromElement(this._element);t(this._element).one(l.TRANSITION_END,(function(){t(i._element).removeClass(fe).addClass(ce).addClass(le),i._element.style[o]="",i.setTransitioning(!1),t(i._element).trigger(ue.SHOWN)})).emulateTransitionEnd(u),this._element.style[o]=this._element[s]+"px"}}},r.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(le)){var r=t.Event(ue.HIDE);if(t(this._element).trigger(r),!r.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",l.reflow(this._element),t(this._element).addClass(fe).removeClass(ce).removeClass(le);var i=this._triggerArray.length;if(i>0)for(var a=0;a<i;a++){var o=this._triggerArray[a],s=l.getSelectorFromElement(o);null!==s&&(t([].slice.call(document.querySelectorAll(s))).hasClass(le)||t(o).addClass(he).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[n]="";var u=l.getTransitionDurationFromElement(this._element);t(this._element).one(l.TRANSITION_END,(function(){e.setTransitioning(!1),t(e._element).removeClass(fe).addClass(ce).trigger(ue.HIDDEN)})).emulateTransitionEnd(u)}}},r.setTransitioning=function(e){this._isTransitioning=e},r.dispose=function(){t.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},r._getConfig=function(e){return(e=s({},oe,{},e)).toggle=Boolean(e.toggle),l.typeCheckConfig(ie,e,se),e},r._getDimension=function(){return t(this._element).hasClass(pe)?pe:de},r._getParent=function(){var r,n=this;l.isElement(this._config.parent)?(r=this._config.parent,void 0!==this._config.parent.jquery&&(r=this._config.parent[0])):r=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',a=[].slice.call(r.querySelectorAll(i));return t(a).each((function(t,r){n._addAriaAndCollapsedClass(e._getTargetFromElement(r),[r])})),r},r._addAriaAndCollapsedClass=function(e,r){var n=t(e).hasClass(le);r.length&&t(r).toggleClass(he,!n).attr("aria-expanded",n)},e._getTargetFromElement=function(e){var t=l.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(r){return this.each((function(){var n=t(this),i=n.data("bs.collapse"),a=s({},oe,{},n.data(),{},"object"==typeof r&&r?r:{});if(!i&&a.toggle&&/show|hide/.test(r)&&(a.toggle=!1),i||(i=new e(this,a),n.data("bs.collapse",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return oe}}]),e}();t(document).on(ue.CLICK_DATA_API,ye,(function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var r=t(this),n=l.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(n));t(i).each((function(){var e=t(this),n=e.data("bs.collapse")?"toggle":r.data();me._jQueryInterface.call(e,n)}))})),t.fn[ie]=me._jQueryInterface,t.fn[ie].Constructor=me,t.fn[ie].noConflict=function(){return t.fn[ie]=ae,me._jQueryInterface};var ve="dropdown",Ee=t.fn[ve],Ce=new RegExp("38|40|27"),be={HIDE:"hide.bs.dropdown",HIDDEN:"hidden.bs.dropdown",SHOW:"show.bs.dropdown",SHOWN:"shown.bs.dropdown",CLICK:"click.bs.dropdown",CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},Te="disabled",Se="show",Ae="dropup",_e="dropright",Ie="dropleft",we="dropdown-menu-right",Be="position-static",Ne='[data-toggle="dropdown"]',ke=".dropdown form",De=".dropdown-menu",Le=".navbar-nav",Re=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",xe="top-start",Oe="top-end",Pe="bottom-start",Ue="bottom-end",Me="right-start",Ve="left-start",je={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Ke={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Fe=function(){function e(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var n=e.prototype;return n.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(Te)){var r=t(this._menu).hasClass(Se);e._clearMenus(),r||this.show(!0)}},n.show=function(n){if(void 0===n&&(n=!1),!(this._element.disabled||t(this._element).hasClass(Te)||t(this._menu).hasClass(Se))){var i={relatedTarget:this._element},a=t.Event(be.SHOW,i),o=e._getParentFromElement(this._element);if(t(o).trigger(a),!a.isDefaultPrevented()){if(!this._inNavbar&&n){if(void 0===r)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var s=this._element;"parent"===this._config.reference?s=o:l.isElement(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&t(o).addClass(Be),this._popper=new r(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(o).closest(Le).length&&t(document.body).children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(Se),t(o).toggleClass(Se).trigger(t.Event(be.SHOWN,i))}}},n.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass(Te)&&t(this._menu).hasClass(Se)){var r={relatedTarget:this._element},n=t.Event(be.HIDE,r),i=e._getParentFromElement(this._element);t(i).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),t(this._menu).toggleClass(Se),t(i).toggleClass(Se).trigger(t.Event(be.HIDDEN,r)))}},n.dispose=function(){t.removeData(this._element,"bs.dropdown"),t(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},n._addEventListeners=function(){var e=this;t(this._element).on(be.CLICK,(function(t){t.preventDefault(),t.stopPropagation(),e.toggle()}))},n._getConfig=function(e){return e=s({},this.constructor.Default,{},t(this._element).data(),{},e),l.typeCheckConfig(ve,e,this.constructor.DefaultType),e},n._getMenuElement=function(){if(!this._menu){var t=e._getParentFromElement(this._element);t&&(this._menu=t.querySelector(De))}return this._menu},n._getPlacement=function(){var e=t(this._element.parentNode),r=Pe;return e.hasClass(Ae)?(r=xe,t(this._menu).hasClass(we)&&(r=Oe)):e.hasClass(_e)?r=Me:e.hasClass(Ie)?r=Ve:t(this._menu).hasClass(we)&&(r=Ue),r},n._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},n._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=s({},t.offsets,{},e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},n._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),s({},e,{},this._config.popperConfig)},e._jQueryInterface=function(r){return this.each((function(){var n=t(this).data("bs.dropdown");if(n||(n=new e(this,"object"==typeof r?r:null),t(this).data("bs.dropdown",n)),"string"==typeof r){if(void 0===n[r])throw new TypeError('No method named "'+r+'"');n[r]()}}))},e._clearMenus=function(r){if(!r||3!==r.which&&("keyup"!==r.type||9===r.which))for(var n=[].slice.call(document.querySelectorAll(Ne)),i=0,a=n.length;i<a;i++){var o=e._getParentFromElement(n[i]),s=t(n[i]).data("bs.dropdown"),u={relatedTarget:n[i]};if(r&&"click"===r.type&&(u.clickEvent=r),s){var l=s._menu;if(t(o).hasClass(Se)&&!(r&&("click"===r.type&&/input|textarea/i.test(r.target.tagName)||"keyup"===r.type&&9===r.which)&&t.contains(o,r.target))){var c=t.Event(be.HIDE,u);t(o).trigger(c),c.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),n[i].setAttribute("aria-expanded","false"),s._popper&&s._popper.destroy(),t(l).removeClass(Se),t(o).removeClass(Se).trigger(t.Event(be.HIDDEN,u)))}}}},e._getParentFromElement=function(e){var t,r=l.getSelectorFromElement(e);return r&&(t=document.querySelector(r)),t||e.parentNode},e._dataApiKeydownHandler=function(r){if(!(/input|textarea/i.test(r.target.tagName)?32===r.which||27!==r.which&&(40!==r.which&&38!==r.which||t(r.target).closest(De).length):!Ce.test(r.which))&&(r.preventDefault(),r.stopPropagation(),!this.disabled&&!t(this).hasClass(Te))){var n=e._getParentFromElement(this),i=t(n).hasClass(Se);if(i||27!==r.which)if(i&&(!i||27!==r.which&&32!==r.which)){var a=[].slice.call(n.querySelectorAll(Re)).filter((function(e){return t(e).is(":visible")}));if(0!==a.length){var o=a.indexOf(r.target);38===r.which&&o>0&&o--,40===r.which&&o<a.length-1&&o++,o<0&&(o=0),a[o].focus()}}else{if(27===r.which){var s=n.querySelector(Ne);t(s).trigger("focus")}t(this).trigger("click")}}},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return je}},{key:"DefaultType",get:function(){return Ke}}]),e}();t(document).on(be.KEYDOWN_DATA_API,Ne,Fe._dataApiKeydownHandler).on(be.KEYDOWN_DATA_API,De,Fe._dataApiKeydownHandler).on(be.CLICK_DATA_API+" "+be.KEYUP_DATA_API,Fe._clearMenus).on(be.CLICK_DATA_API,Ne,(function(e){e.preventDefault(),e.stopPropagation(),Fe._jQueryInterface.call(t(this),"toggle")})).on(be.CLICK_DATA_API,ke,(function(e){e.stopPropagation()})),t.fn[ve]=Fe._jQueryInterface,t.fn[ve].Constructor=Fe,t.fn[ve].noConflict=function(){return t.fn[ve]=Ee,Fe._jQueryInterface};var He=t.fn.modal,qe={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ge={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},We={HIDE:"hide.bs.modal",HIDE_PREVENTED:"hidePrevented.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},Qe="modal-dialog-scrollable",ze="modal-scrollbar-measure",Ye="modal-backdrop",Xe="modal-open",$e="fade",Ze="show",Je="modal-static",et=".modal-dialog",tt=".modal-body",rt='[data-toggle="modal"]',nt='[data-dismiss="modal"]',it=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",at=".sticky-top",ot=function(){function e(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(et),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var r=e.prototype;return r.toggle=function(e){return this._isShown?this.hide():this.show(e)},r.show=function(e){var r=this;if(!this._isShown&&!this._isTransitioning){t(this._element).hasClass($e)&&(this._isTransitioning=!0);var n=t.Event(We.SHOW,{relatedTarget:e});t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(We.CLICK_DISMISS,nt,(function(e){return r.hide(e)})),t(this._dialog).on(We.MOUSEDOWN_DISMISS,(function(){t(r._element).one(We.MOUSEUP_DISMISS,(function(e){t(e.target).is(r._element)&&(r._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return r._showElement(e)})))}},r.hide=function(e){var r=this;if(e&&e.preventDefault(),this._isShown&&!this._isTransitioning){var n=t.Event(We.HIDE);if(t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=t(this._element).hasClass($e);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(We.FOCUSIN),t(this._element).removeClass(Ze),t(this._element).off(We.CLICK_DISMISS),t(this._dialog).off(We.MOUSEDOWN_DISMISS),i){var a=l.getTransitionDurationFromElement(this._element);t(this._element).one(l.TRANSITION_END,(function(e){return r._hideModal(e)})).emulateTransitionEnd(a)}else this._hideModal()}}},r.dispose=function(){[window,this._element,this._dialog].forEach((function(e){return t(e).off(".bs.modal")})),t(document).off(We.FOCUSIN),t.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},r.handleUpdate=function(){this._adjustDialog()},r._getConfig=function(e){return e=s({},qe,{},e),l.typeCheckConfig("modal",e,Ge),e},r._triggerBackdropTransition=function(){var e=this;if("static"===this._config.backdrop){var r=t.Event(We.HIDE_PREVENTED);if(t(this._element).trigger(r),r.defaultPrevented)return;this._element.classList.add(Je);var n=l.getTransitionDurationFromElement(this._element);t(this._element).one(l.TRANSITION_END,(function(){e._element.classList.remove(Je)})).emulateTransitionEnd(n),this._element.focus()}else this.hide()},r._showElement=function(e){var r=this,n=t(this._element).hasClass($e),i=this._dialog?this._dialog.querySelector(tt):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),t(this._dialog).hasClass(Qe)&&i?i.scrollTop=0:this._element.scrollTop=0,n&&l.reflow(this._element),t(this._element).addClass(Ze),this._config.focus&&this._enforceFocus();var a=t.Event(We.SHOWN,{relatedTarget:e}),o=function(){r._config.focus&&r._element.focus(),r._isTransitioning=!1,t(r._element).trigger(a)};if(n){var s=l.getTransitionDurationFromElement(this._dialog);t(this._dialog).one(l.TRANSITION_END,o).emulateTransitionEnd(s)}else o()},r._enforceFocus=function(){var e=this;t(document).off(We.FOCUSIN).on(We.FOCUSIN,(function(r){document!==r.target&&e._element!==r.target&&0===t(e._element).has(r.target).length&&e._element.focus()}))},r._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(We.KEYDOWN_DISMISS,(function(t){27===t.which&&e._triggerBackdropTransition()})):this._isShown||t(this._element).off(We.KEYDOWN_DISMISS)},r._setResizeEvent=function(){var e=this;this._isShown?t(window).on(We.RESIZE,(function(t){return e.handleUpdate(t)})):t(window).off(We.RESIZE)},r._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop((function(){t(document.body).removeClass(Xe),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(We.HIDDEN)}))},r._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},r._showBackdrop=function(e){var r=this,n=t(this._element).hasClass($e)?$e:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Ye,n&&this._backdrop.classList.add(n),t(this._backdrop).appendTo(document.body),t(this._element).on(We.CLICK_DISMISS,(function(e){r._ignoreBackdropClick?r._ignoreBackdropClick=!1:e.target===e.currentTarget&&r._triggerBackdropTransition()})),n&&l.reflow(this._backdrop),t(this._backdrop).addClass(Ze),!e)return;if(!n)return void e();var i=l.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(l.TRANSITION_END,e).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(Ze);var a=function(){r._removeBackdrop(),e&&e()};if(t(this._element).hasClass($e)){var o=l.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(l.TRANSITION_END,a).emulateTransitionEnd(o)}else a()}else e&&e()},r._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},r._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},r._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=e.left+e.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},r._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){var r=[].slice.call(document.querySelectorAll(it)),n=[].slice.call(document.querySelectorAll(at));t(r).each((function(r,n){var i=n.style.paddingRight,a=t(n).css("padding-right");t(n).data("padding-right",i).css("padding-right",parseFloat(a)+e._scrollbarWidth+"px")})),t(n).each((function(r,n){var i=n.style.marginRight,a=t(n).css("margin-right");t(n).data("margin-right",i).css("margin-right",parseFloat(a)-e._scrollbarWidth+"px")}));var i=document.body.style.paddingRight,a=t(document.body).css("padding-right");t(document.body).data("padding-right",i).css("padding-right",parseFloat(a)+this._scrollbarWidth+"px")}t(document.body).addClass(Xe)},r._resetScrollbar=function(){var e=[].slice.call(document.querySelectorAll(it));t(e).each((function(e,r){var n=t(r).data("padding-right");t(r).removeData("padding-right"),r.style.paddingRight=n||""}));var r=[].slice.call(document.querySelectorAll(""+at));t(r).each((function(e,r){var n=t(r).data("margin-right");void 0!==n&&t(r).css("margin-right",n).removeData("margin-right")}));var n=t(document.body).data("padding-right");t(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},r._getScrollbarWidth=function(){var e=document.createElement("div");e.className=ze,document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},e._jQueryInterface=function(r,n){return this.each((function(){var i=t(this).data("bs.modal"),a=s({},qe,{},t(this).data(),{},"object"==typeof r&&r?r:{});if(i||(i=new e(this,a),t(this).data("bs.modal",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r](n)}else a.show&&i.show(n)}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return qe}}]),e}();t(document).on(We.CLICK_DATA_API,rt,(function(e){var r,n=this,i=l.getSelectorFromElement(this);i&&(r=document.querySelector(i));var a=t(r).data("bs.modal")?"toggle":s({},t(r).data(),{},t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var o=t(r).one(We.SHOW,(function(e){e.isDefaultPrevented()||o.one(We.HIDDEN,(function(){t(n).is(":visible")&&n.focus()}))}));ot._jQueryInterface.call(t(r),a,this)})),t.fn.modal=ot._jQueryInterface,t.fn.modal.Constructor=ot,t.fn.modal.noConflict=function(){return t.fn.modal=He,ot._jQueryInterface};var st=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],ut={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},lt=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,ct=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function ft(e,t,r){if(0===e.length)return e;if(r&&"function"==typeof r)return r(e);for(var n=(new window.DOMParser).parseFromString(e,"text/html"),i=Object.keys(t),a=[].slice.call(n.body.querySelectorAll("*")),o=function(e,r){var n=a[e],o=n.nodeName.toLowerCase();if(-1===i.indexOf(n.nodeName.toLowerCase()))return n.parentNode.removeChild(n),"continue";var s=[].slice.call(n.attributes),u=[].concat(t["*"]||[],t[o]||[]);s.forEach((function(e){(function(e,t){var r=e.nodeName.toLowerCase();if(-1!==t.indexOf(r))return-1===st.indexOf(r)||Boolean(e.nodeValue.match(lt)||e.nodeValue.match(ct));for(var n=t.filter((function(e){return e instanceof RegExp})),i=0,a=n.length;i<a;i++)if(r.match(n[i]))return!0;return!1})(e,u)||n.removeAttribute(e.nodeName)}))},s=0,u=a.length;s<u;s++)o(s);return n.body.innerHTML}var ht="tooltip",pt=t.fn[ht],dt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),gt=["sanitize","whiteList","sanitizeFn"],yt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},mt={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},vt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:ut,popperConfig:null},Et="show",Ct="out",bt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Tt="fade",St="show",At=".tooltip-inner",_t=".arrow",It="hover",wt="focus",Bt="click",Nt="manual",kt=function(){function e(e,t){if(void 0===r)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var n=e.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(e){if(this._isEnabled)if(e){var r=this.constructor.DATA_KEY,n=t(e.currentTarget).data(r);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(r,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(t(this.getTipElement()).hasClass(St))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=l.findShadowRoot(this.element),a=t.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!a)return;var o=this.getTipElement(),s=l.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(Tt);var u="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,c=this._getAttachment(u);this.addAttachmentClass(c);var f=this._getContainer();t(o).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(o).appendTo(f),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new r(this.element,o,this._getPopperConfig(c)),t(o).addClass(St),"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);var h=function(){e.config.animation&&e._fixTransition();var r=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),r===Ct&&e._leave(null,e)};if(t(this.tip).hasClass(Tt)){var p=l.getTransitionDurationFromElement(this.tip);t(this.tip).one(l.TRANSITION_END,h).emulateTransitionEnd(p)}else h()}},n.hide=function(e){var r=this,n=this.getTipElement(),i=t.Event(this.constructor.Event.HIDE),a=function(){r._hoverState!==Et&&n.parentNode&&n.parentNode.removeChild(n),r._cleanTipClass(),r.element.removeAttribute("aria-describedby"),t(r.element).trigger(r.constructor.Event.HIDDEN),null!==r._popper&&r._popper.destroy(),e&&e()};if(t(this.element).trigger(i),!i.isDefaultPrevented()){if(t(n).removeClass(St),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger[Bt]=!1,this._activeTrigger[wt]=!1,this._activeTrigger[It]=!1,t(this.tip).hasClass(Tt)){var o=l.getTransitionDurationFromElement(n);t(n).one(l.TRANSITION_END,a).emulateTransitionEnd(o)}else a();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var e=this.getTipElement();this.setElementContent(t(e.querySelectorAll(At)),this.getTitle()),t(e).removeClass(Tt+" "+St)},n.setElementContent=function(e,r){"object"!=typeof r||!r.nodeType&&!r.jquery?this.config.html?(this.config.sanitize&&(r=ft(r,this.config.whiteList,this.config.sanitizeFn)),e.html(r)):e.text(r):this.config.html?t(r).parent().is(e)||e.empty().append(r):e.text(t(r).text())},n.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},n._getPopperConfig=function(e){var t=this;return s({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:_t},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},{},this.config.popperConfig)},n._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=s({},t.offsets,{},e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},n._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(e){return mt[e.toUpperCase()]},n._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(r){if("click"===r)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if(r!==Nt){var n=r===It?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,i=r===It?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(n,e.config.selector,(function(t){return e._enter(t)})).on(i,e.config.selector,(function(t){return e._leave(t)}))}})),this._hideModalHandler=function(){e.element&&e.hide()},t(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(e,r){var n=this.constructor.DATA_KEY;(r=r||t(e.currentTarget).data(n))||(r=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,r)),e&&(r._activeTrigger["focusin"===e.type?wt:It]=!0),t(r.getTipElement()).hasClass(St)||r._hoverState===Et?r._hoverState=Et:(clearTimeout(r._timeout),r._hoverState=Et,r.config.delay&&r.config.delay.show?r._timeout=setTimeout((function(){r._hoverState===Et&&r.show()}),r.config.delay.show):r.show())},n._leave=function(e,r){var n=this.constructor.DATA_KEY;(r=r||t(e.currentTarget).data(n))||(r=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,r)),e&&(r._activeTrigger["focusout"===e.type?wt:It]=!1),r._isWithActiveTrigger()||(clearTimeout(r._timeout),r._hoverState=Ct,r.config.delay&&r.config.delay.hide?r._timeout=setTimeout((function(){r._hoverState===Ct&&r.hide()}),r.config.delay.hide):r.hide())},n._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},n._getConfig=function(e){var r=t(this.element).data();return Object.keys(r).forEach((function(e){-1!==gt.indexOf(e)&&delete r[e]})),"number"==typeof(e=s({},this.constructor.Default,{},r,{},"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),l.typeCheckConfig(ht,e,this.constructor.DefaultType),e.sanitize&&(e.template=ft(e.template,e.whiteList,e.sanitizeFn)),e},n._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},n._cleanTipClass=function(){var e=t(this.getTipElement()),r=e.attr("class").match(dt);null!==r&&r.length&&e.removeClass(r.join(""))},n._handlePopperPlacementChange=function(e){var t=e.instance;this.tip=t.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},n._fixTransition=function(){var e=this.getTipElement(),r=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(Tt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=r)},e._jQueryInterface=function(r){return this.each((function(){var n=t(this).data("bs.tooltip"),i="object"==typeof r&&r;if((n||!/dispose|hide/.test(r))&&(n||(n=new e(this,i),t(this).data("bs.tooltip",n)),"string"==typeof r)){if(void 0===n[r])throw new TypeError('No method named "'+r+'"');n[r]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return vt}},{key:"NAME",get:function(){return ht}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return bt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return yt}}]),e}();t.fn[ht]=kt._jQueryInterface,t.fn[ht].Constructor=kt,t.fn[ht].noConflict=function(){return t.fn[ht]=pt,kt._jQueryInterface};var Dt="popover",Lt=t.fn[Dt],Rt=new RegExp("(^|\\s)bs-popover\\S+","g"),xt=s({},kt.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ot=s({},kt.DefaultType,{content:"(string|element|function)"}),Pt="fade",Ut="show",Mt=".popover-header",Vt=".popover-body",jt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Kt=function(e){var r,n;function a(){return e.apply(this,arguments)||this}n=e,(r=a).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n;var o=a.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},o.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},o.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(Mt),this.getTitle());var r=this._getContent();"function"==typeof r&&(r=r.call(this.element)),this.setElementContent(e.find(Vt),r),e.removeClass(Pt+" "+Ut)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var e=t(this.getTipElement()),r=e.attr("class").match(Rt);null!==r&&r.length>0&&e.removeClass(r.join(""))},a._jQueryInterface=function(e){return this.each((function(){var r=t(this).data("bs.popover"),n="object"==typeof e?e:null;if((r||!/dispose|hide/.test(e))&&(r||(r=new a(this,n),t(this).data("bs.popover",r)),"string"==typeof e)){if(void 0===r[e])throw new TypeError('No method named "'+e+'"');r[e]()}}))},i(a,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return xt}},{key:"NAME",get:function(){return Dt}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return jt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Ot}}]),a}(kt);t.fn[Dt]=Kt._jQueryInterface,t.fn[Dt].Constructor=Kt,t.fn[Dt].noConflict=function(){return t.fn[Dt]=Lt,Kt._jQueryInterface};var Ft="scrollspy",Ht=t.fn[Ft],qt={offset:10,method:"auto",target:""},Gt={offset:"number",method:"string",target:"(string|element)"},Wt={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},Qt="dropdown-item",zt="active",Yt='[data-spy="scroll"]',Xt=".nav, .list-group",$t=".nav-link",Zt=".nav-item",Jt=".list-group-item",er=".dropdown",tr=".dropdown-item",rr=".dropdown-toggle",nr="offset",ir="position",ar=function(){function e(e,r){var n=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(r),this._selector=this._config.target+" "+$t+","+this._config.target+" "+Jt+","+this._config.target+" "+tr,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(Wt.SCROLL,(function(e){return n._process(e)})),this.refresh(),this._process()}var r=e.prototype;return r.refresh=function(){var e=this,r=this._scrollElement===this._scrollElement.window?nr:ir,n="auto"===this._config.method?r:this._config.method,i=n===ir?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(e){var r,a=l.getSelectorFromElement(e);if(a&&(r=document.querySelector(a)),r){var o=r.getBoundingClientRect();if(o.width||o.height)return[t(r)[n]().top+i,a]}return null})).filter((function(e){return e})).sort((function(e,t){return e[0]-t[0]})).forEach((function(t){e._offsets.push(t[0]),e._targets.push(t[1])}))},r.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},r._getConfig=function(e){if("string"!=typeof(e=s({},qt,{},"object"==typeof e&&e?e:{})).target){var r=t(e.target).attr("id");r||(r=l.getUID(Ft),t(e.target).attr("id",r)),e.target="#"+r}return l.typeCheckConfig(Ft,e,Gt),e},r._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},r._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},r._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},r._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),r=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=r){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var i=this._offsets.length;i--;)this._activeTarget!==this._targets[i]&&e>=this._offsets[i]&&(void 0===this._offsets[i+1]||e<this._offsets[i+1])&&this._activate(this._targets[i])}},r._activate=function(e){this._activeTarget=e,this._clear();var r=this._selector.split(",").map((function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'})),n=t([].slice.call(document.querySelectorAll(r.join(","))));n.hasClass(Qt)?(n.closest(er).find(rr).addClass(zt),n.addClass(zt)):(n.addClass(zt),n.parents(Xt).prev($t+", "+Jt).addClass(zt),n.parents(Xt).prev(Zt).children($t).addClass(zt)),t(this._scrollElement).trigger(Wt.ACTIVATE,{relatedTarget:e})},r._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(e){return e.classList.contains(zt)})).forEach((function(e){return e.classList.remove(zt)}))},e._jQueryInterface=function(r){return this.each((function(){var n=t(this).data("bs.scrollspy");if(n||(n=new e(this,"object"==typeof r&&r),t(this).data("bs.scrollspy",n)),"string"==typeof r){if(void 0===n[r])throw new TypeError('No method named "'+r+'"');n[r]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return qt}}]),e}();t(window).on(Wt.LOAD_DATA_API,(function(){for(var e=[].slice.call(document.querySelectorAll(Yt)),r=e.length;r--;){var n=t(e[r]);ar._jQueryInterface.call(n,n.data())}})),t.fn[Ft]=ar._jQueryInterface,t.fn[Ft].Constructor=ar,t.fn[Ft].noConflict=function(){return t.fn[Ft]=Ht,ar._jQueryInterface};var or=t.fn.tab,sr={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},ur="dropdown-menu",lr="active",cr="disabled",fr="fade",hr="show",pr=".dropdown",dr=".nav, .list-group",gr=".active",yr="> li > .active",mr='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',vr=".dropdown-toggle",Er="> .dropdown-menu .active",Cr=function(){function e(e){this._element=e}var r=e.prototype;return r.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(lr)||t(this._element).hasClass(cr))){var r,n,i=t(this._element).closest(dr)[0],a=l.getSelectorFromElement(this._element);if(i){var o="UL"===i.nodeName||"OL"===i.nodeName?yr:gr;n=(n=t.makeArray(t(i).find(o)))[n.length-1]}var s=t.Event(sr.HIDE,{relatedTarget:this._element}),u=t.Event(sr.SHOW,{relatedTarget:n});if(n&&t(n).trigger(s),t(this._element).trigger(u),!u.isDefaultPrevented()&&!s.isDefaultPrevented()){a&&(r=document.querySelector(a)),this._activate(this._element,i);var c=function(){var r=t.Event(sr.HIDDEN,{relatedTarget:e._element}),i=t.Event(sr.SHOWN,{relatedTarget:n});t(n).trigger(r),t(e._element).trigger(i)};r?this._activate(r,r.parentNode,c):c()}}},r.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},r._activate=function(e,r,n){var i=this,a=(!r||"UL"!==r.nodeName&&"OL"!==r.nodeName?t(r).children(gr):t(r).find(yr))[0],o=n&&a&&t(a).hasClass(fr),s=function(){return i._transitionComplete(e,a,n)};if(a&&o){var u=l.getTransitionDurationFromElement(a);t(a).removeClass(hr).one(l.TRANSITION_END,s).emulateTransitionEnd(u)}else s()},r._transitionComplete=function(e,r,n){if(r){t(r).removeClass(lr);var i=t(r.parentNode).find(Er)[0];i&&t(i).removeClass(lr),"tab"===r.getAttribute("role")&&r.setAttribute("aria-selected",!1)}if(t(e).addClass(lr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),l.reflow(e),e.classList.contains(fr)&&e.classList.add(hr),e.parentNode&&t(e.parentNode).hasClass(ur)){var a=t(e).closest(pr)[0];if(a){var o=[].slice.call(a.querySelectorAll(vr));t(o).addClass(lr)}e.setAttribute("aria-expanded",!0)}n&&n()},e._jQueryInterface=function(r){return this.each((function(){var n=t(this),i=n.data("bs.tab");if(i||(i=new e(this),n.data("bs.tab",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(sr.CLICK_DATA_API,mr,(function(e){e.preventDefault(),Cr._jQueryInterface.call(t(this),"show")})),t.fn.tab=Cr._jQueryInterface,t.fn.tab.Constructor=Cr,t.fn.tab.noConflict=function(){return t.fn.tab=or,Cr._jQueryInterface};var br=t.fn.toast,Tr={CLICK_DISMISS:"click.dismiss.bs.toast",HIDE:"hide.bs.toast",HIDDEN:"hidden.bs.toast",SHOW:"show.bs.toast",SHOWN:"shown.bs.toast"},Sr="fade",Ar="hide",_r="show",Ir="showing",wr={animation:"boolean",autohide:"boolean",delay:"number"},Br={animation:!0,autohide:!0,delay:500},Nr='[data-dismiss="toast"]',kr=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var r=e.prototype;return r.show=function(){var e=this,r=t.Event(Tr.SHOW);if(t(this._element).trigger(r),!r.isDefaultPrevented()){this._config.animation&&this._element.classList.add(Sr);var n=function(){e._element.classList.remove(Ir),e._element.classList.add(_r),t(e._element).trigger(Tr.SHOWN),e._config.autohide&&(e._timeout=setTimeout((function(){e.hide()}),e._config.delay))};if(this._element.classList.remove(Ar),l.reflow(this._element),this._element.classList.add(Ir),this._config.animation){var i=l.getTransitionDurationFromElement(this._element);t(this._element).one(l.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},r.hide=function(){if(this._element.classList.contains(_r)){var e=t.Event(Tr.HIDE);t(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},r.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(_r)&&this._element.classList.remove(_r),t(this._element).off(Tr.CLICK_DISMISS),t.removeData(this._element,"bs.toast"),this._element=null,this._config=null},r._getConfig=function(e){return e=s({},Br,{},t(this._element).data(),{},"object"==typeof e&&e?e:{}),l.typeCheckConfig("toast",e,this.constructor.DefaultType),e},r._setListeners=function(){var e=this;t(this._element).on(Tr.CLICK_DISMISS,Nr,(function(){return e.hide()}))},r._close=function(){var e=this,r=function(){e._element.classList.add(Ar),t(e._element).trigger(Tr.HIDDEN)};if(this._element.classList.remove(_r),this._config.animation){var n=l.getTransitionDurationFromElement(this._element);t(this._element).one(l.TRANSITION_END,r).emulateTransitionEnd(n)}else r()},e._jQueryInterface=function(r){return this.each((function(){var n=t(this),i=n.data("bs.toast");if(i||(i=new e(this,"object"==typeof r&&r),n.data("bs.toast",i)),"string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r](this)}}))},i(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"DefaultType",get:function(){return wr}},{key:"Default",get:function(){return Br}}]),e}();t.fn.toast=kr._jQueryInterface,t.fn.toast.Constructor=kr,t.fn.toast.noConflict=function(){return t.fn.toast=br,kr._jQueryInterface},e.Alert=y,e.Button=N,e.Carousel=ne,e.Collapse=me,e.Dropdown=Fe,e.Modal=ot,e.Popover=Kt,e.Scrollspy=ar,e.Tab=Cr,e.Toast=kr,e.Tooltip=kt,e.Util=l,Object.defineProperty(e,"__esModule",{value:!0})}(t,r(5),r(41))},function(e,t,r){"use strict";r.r(t),function(e){var r="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,n=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(r&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=r&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),n))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var r=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?r[t]:r}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:u(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var c=r&&!(!window.MSInputMethodContext||!document.documentMode),f=r&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?c:10===e?f:c||f}function p(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===o(r,"position")?p(r):r:e?e.ownerDocument.documentElement:document.documentElement}function d(e){return null!==e.parentNode?d(e.parentNode):e}function g(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,a=document.createRange();a.setStart(n,0),a.setEnd(i,0);var o,s,u=a.commonAncestorContainer;if(e!==u&&t!==u||n.contains(i))return"BODY"===(s=(o=u).nodeName)||"HTML"!==s&&p(o.firstElementChild)!==o?p(u):u;var l=d(e);return l.host?g(l.host,t):g(e,d(t).host)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",r="top"===t?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[r]}return e[r]}function m(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=y(t,"top"),i=y(t,"left"),a=r?-1:1;return e.top+=n*a,e.bottom+=n*a,e.left+=i*a,e.right+=i*a,e}function v(e,t){var r="x"===t?"Left":"Top",n="Left"===r?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function E(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],h(10)?parseInt(r["offset"+e])+parseInt(n["margin"+("Height"===e?"Top":"Left")])+parseInt(n["margin"+("Height"===e?"Bottom":"Right")]):0)}function C(e){var t=e.body,r=e.documentElement,n=h(10)&&getComputedStyle(r);return{height:E("Height",t,r,n),width:E("Width",t,r,n)}}var b=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),S=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function _(e){return A({},e,{right:e.left+e.width,bottom:e.top+e.height})}function I(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var r=y(e,"top"),n=y(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?C(e.ownerDocument):{},s=a.width||e.clientWidth||i.width,u=a.height||e.clientHeight||i.height,l=e.offsetWidth-s,c=e.offsetHeight-u;if(l||c){var f=o(e);l-=v(f,"x"),c-=v(f,"y"),i.width-=l,i.height-=c}return _(i)}function w(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=h(10),i="HTML"===t.nodeName,a=I(e),s=I(t),l=u(e),c=o(t),f=parseFloat(c.borderTopWidth),p=parseFloat(c.borderLeftWidth);r&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var d=_({top:a.top-s.top-f,left:a.left-s.left-p,width:a.width,height:a.height});if(d.marginTop=0,d.marginLeft=0,!n&&i){var g=parseFloat(c.marginTop),y=parseFloat(c.marginLeft);d.top-=f-g,d.bottom-=f-g,d.left-=p-y,d.right-=p-y,d.marginTop=g,d.marginLeft=y}return(n&&!r?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(d=m(d,t)),d}function B(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.ownerDocument.documentElement,n=w(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),a=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:y(r),s=t?0:y(r,"left"),u={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:a};return _(u)}function N(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===o(e,"position"))return!0;var r=s(e);return!!r&&N(r)}function k(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function D(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},o=i?k(e):g(e,l(t));if("viewport"===n)a=B(o,i);else{var c=void 0;"scrollParent"===n?"BODY"===(c=u(s(t))).nodeName&&(c=e.ownerDocument.documentElement):c="window"===n?e.ownerDocument.documentElement:n;var f=w(c,o,i);if("HTML"!==c.nodeName||N(o))a=f;else{var h=C(e.ownerDocument),p=h.height,d=h.width;a.top+=f.top-f.marginTop,a.bottom=p+f.top,a.left+=f.left-f.marginLeft,a.right=d+f.left}}var y="number"==typeof(r=r||0);return a.left+=y?r:r.left||0,a.top+=y?r:r.top||0,a.right-=y?r:r.right||0,a.bottom-=y?r:r.bottom||0,a}function L(e){return e.width*e.height}function R(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=D(r,n,a,i),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},u=Object.keys(s).map((function(e){return A({key:e},s[e],{area:L(s[e])})})).sort((function(e,t){return t.area-e.area})),l=u.filter((function(e){var t=e.width,n=e.height;return t>=r.clientWidth&&n>=r.clientHeight})),c=l.length>0?l[0].key:u[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function x(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=n?k(t):g(t,l(r));return w(r,i,n)}function O(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),n=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+n,height:e.offsetHeight+r}}function P(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function U(e,t,r){r=r.split("-")[0];var n=O(e),i={width:n.width,height:n.height},a=-1!==["right","left"].indexOf(r),o=a?"top":"left",s=a?"left":"top",u=a?"height":"width",l=a?"width":"height";return i[o]=t[o]+t[u]/2-n[u]/2,i[s]=r===s?t[s]-n[l]:t[P(s)],i}function M(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function V(e,t,r){return(void 0===r?e:e.slice(0,function(e,t,r){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===r}));var n=M(e,(function(e){return e[t]===r}));return e.indexOf(n)}(e,"name",r))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=e.function||e.fn;e.enabled&&a(r)&&(t.offsets.popper=_(t.offsets.popper),t.offsets.reference=_(t.offsets.reference),t=r(t,e))})),t}function j(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=x(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=R(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=U(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=V(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function K(e,t){return e.some((function(e){var r=e.name;return e.enabled&&r===t}))}function F(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],a=i?""+i+r:e;if(void 0!==document.body.style[a])return a}return null}function H(){return this.state.isDestroyed=!0,K(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[F("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function G(e,t,r,n){r.updateBound=n,q(e).addEventListener("resize",r.updateBound,{passive:!0});var i=u(e);return function e(t,r,n,i){var a="BODY"===t.nodeName,o=a?t.ownerDocument.defaultView:t;o.addEventListener(r,n,{passive:!0}),a||e(u(o.parentNode),r,n,i),i.push(o)}(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function W(){this.state.eventsEnabled||(this.state=G(this.reference,this.options,this.state,this.scheduleUpdate))}function Q(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function z(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t){Object.keys(t).forEach((function(r){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(r)&&z(t[r])&&(n="px"),e.style[r]=t[r]+n}))}var X=r&&/Firefox/i.test(navigator.userAgent);function $(e,t,r){var n=M(e,(function(e){return e.name===t})),i=!!n&&e.some((function(e){return e.name===r&&e.enabled&&e.order<n.order}));if(!i){var a="`"+t+"`",o="`"+r+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return i}var Z=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],J=Z.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=J.indexOf(e),n=J.slice(r+1).concat(J.slice(0,r));return t?n.reverse():n}var te="flip",re="clockwise",ne="counterclockwise";function ie(e,t,r,n){var i=[0,0],a=-1!==["right","left"].indexOf(n),o=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=o.indexOf(M(o,(function(e){return-1!==e.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==s?[o.slice(0,s).concat([o[s].split(u)[0]]),[o[s].split(u)[1]].concat(o.slice(s+1))]:[o];return(l=l.map((function(e,n){var i=(1===n?!a:a)?"height":"width",o=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=r;break;case"%":case"%r":default:s=n}return _(s)[t]/100*a}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}(e,i,t,r)}))}))).forEach((function(e,t){e.forEach((function(r,n){z(r)&&(i[t]+=r*("-"===e[n-1]?-1:1))}))})),i}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,a=i.reference,o=i.popper,s=-1!==["bottom","top"].indexOf(r),u=s?"left":"top",l=s?"width":"height",c={start:S({},u,a[u]),end:S({},u,a[u]+a[l]-o[l])};e.offsets.popper=A({},o,c[n])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var r=t.offset,n=e.placement,i=e.offsets,a=i.popper,o=i.reference,s=n.split("-")[0],u=void 0;return u=z(+r)?[+r,0]:ie(r,a,o,s),"left"===s?(a.top+=u[0],a.left-=u[1]):"right"===s?(a.top+=u[0],a.left+=u[1]):"top"===s?(a.left+=u[0],a.top-=u[1]):"bottom"===s&&(a.left+=u[0],a.top+=u[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var r=t.boundariesElement||p(e.instance.popper);e.instance.reference===r&&(r=p(r));var n=F("transform"),i=e.instance.popper.style,a=i.top,o=i.left,s=i[n];i.top="",i.left="",i[n]="";var u=D(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=a,i.left=o,i[n]=s,t.boundaries=u;var l=t.priority,c=e.offsets.popper,f={primary:function(e){var r=c[e];return c[e]<u[e]&&!t.escapeWithReference&&(r=Math.max(c[e],u[e])),S({},e,r)},secondary:function(e){var r="right"===e?"left":"top",n=c[r];return c[e]>u[e]&&!t.escapeWithReference&&(n=Math.min(c[r],u[e]-("right"===e?c.width:c.height))),S({},r,n)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=A({},c,f[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=-1!==["top","bottom"].indexOf(i),s=o?"right":"bottom",u=o?"left":"top",l=o?"width":"height";return r[s]<a(n[u])&&(e.offsets.popper[u]=a(n[u])-r[l]),r[u]>a(n[s])&&(e.offsets.popper[u]=a(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var r;if(!$(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,s=a.popper,u=a.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",f=l?"Top":"Left",h=f.toLowerCase(),p=l?"left":"top",d=l?"bottom":"right",g=O(n)[c];u[d]-g<s[h]&&(e.offsets.popper[h]-=s[h]-(u[d]-g)),u[h]+g>s[d]&&(e.offsets.popper[h]+=u[h]+g-s[d]),e.offsets.popper=_(e.offsets.popper);var y=u[h]+u[c]/2-g/2,m=o(e.instance.popper),v=parseFloat(m["margin"+f]),E=parseFloat(m["border"+f+"Width"]),C=y-e.offsets.popper[h]-v-E;return C=Math.max(Math.min(s[c]-g,C),0),e.arrowElement=n,e.offsets.arrow=(S(r={},h,Math.round(C)),S(r,p,""),r),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(K(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var r=D(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=P(n),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case te:o=[n,i];break;case re:o=ee(n);break;case ne:o=ee(n,!0);break;default:o=t.behavior}return o.forEach((function(s,u){if(n!==s||o.length===u+1)return e;n=e.placement.split("-")[0],i=P(n);var l=e.offsets.popper,c=e.offsets.reference,f=Math.floor,h="left"===n&&f(l.right)>f(c.left)||"right"===n&&f(l.left)<f(c.right)||"top"===n&&f(l.bottom)>f(c.top)||"bottom"===n&&f(l.top)<f(c.bottom),p=f(l.left)<f(r.left),d=f(l.right)>f(r.right),g=f(l.top)<f(r.top),y=f(l.bottom)>f(r.bottom),m="left"===n&&p||"right"===n&&d||"top"===n&&g||"bottom"===n&&y,v=-1!==["top","bottom"].indexOf(n),E=!!t.flipVariations&&(v&&"start"===a&&p||v&&"end"===a&&d||!v&&"start"===a&&g||!v&&"end"===a&&y),C=!!t.flipVariationsByContent&&(v&&"start"===a&&d||v&&"end"===a&&p||!v&&"start"===a&&y||!v&&"end"===a&&g),b=E||C;(h||m||b)&&(e.flipped=!0,(h||m)&&(n=o[u+1]),b&&(a=function(e){return"end"===e?"start":"start"===e?"end":e}(a)),e.placement=n+(a?"-"+a:""),e.offsets.popper=A({},e.offsets.popper,U(e.instance.popper,e.offsets.reference,e.placement)),e=V(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,a=n.reference,o=-1!==["left","right"].indexOf(r),s=-1===["top","left"].indexOf(r);return i[o?"left":"top"]=a[r]-(s?i[o?"width":"height"]:0),e.placement=P(t),e.offsets.popper=_(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!$(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=M(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var r=t.x,n=t.y,i=e.offsets.popper,a=M(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=void 0!==a?a:t.gpuAcceleration,s=p(e.instance.popper),u=I(s),l={position:i.position},c=function(e,t){var r=e.offsets,n=r.popper,i=r.reference,a=Math.round,o=Math.floor,s=function(e){return e},u=a(i.width),l=a(n.width),c=-1!==["left","right"].indexOf(e.placement),f=-1!==e.placement.indexOf("-"),h=t?c||f||u%2==l%2?a:o:s,p=t?a:s;return{left:h(u%2==1&&l%2==1&&!f&&t?n.left-1:n.left),top:p(n.top),bottom:p(n.bottom),right:h(n.right)}}(e,window.devicePixelRatio<2||!X),f="bottom"===r?"top":"bottom",h="right"===n?"left":"right",d=F("transform"),g=void 0,y=void 0;if(y="bottom"===f?"HTML"===s.nodeName?-s.clientHeight+c.bottom:-u.height+c.bottom:c.top,g="right"===h?"HTML"===s.nodeName?-s.clientWidth+c.right:-u.width+c.right:c.left,o&&d)l[d]="translate3d("+g+"px, "+y+"px, 0)",l[f]=0,l[h]=0,l.willChange="transform";else{var m="bottom"===f?-1:1,v="right"===h?-1:1;l[f]=y*m,l[h]=g*v,l.willChange=f+", "+h}var E={"x-placement":e.placement};return e.attributes=A({},E,e.attributes),e.styles=A({},l,e.styles),e.arrowStyles=A({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,r;return Y(e.instance.popper,e.styles),t=e.instance.popper,r=e.attributes,Object.keys(r).forEach((function(e){!1!==r[e]?t.setAttribute(e,r[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,r,n,i){var a=x(i,t,e,r.positionFixed),o=R(r.placement,a,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",o),Y(t,{position:r.positionFixed?"fixed":"absolute"}),r},gpuAcceleration:void 0}}},oe=function(){function e(t,r){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};b(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=i(this.update.bind(this)),this.options=A({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(A({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){n.options.modifiers[t]=A({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return A({name:e},n.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&a(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return T(e,[{key:"update",value:function(){return j.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return W.call(this)}},{key:"disableEventListeners",value:function(){return Q.call(this)}}]),e}();oe.Utils=("undefined"!=typeof window?window:e).PopperUtils,oe.placements=Z,oe.Defaults=ae,t.default=oe}.call(this,r(9))},function(e,t,r){var n,i,a;i=[r(5)],void 0===(a="function"==typeof(n=function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,n=e(r);if(!n.is("[type=submit],[type=image]")){var i=n.closest("[type=submit]");if(0===i.length)return;r=i[0]}var a=r.form;if(a.clk=r,"image"===r.type)if(void 0!==t.offsetX)a.clk_x=t.offsetX,a.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=n.offset();a.clk_x=t.pageX-o.left,a.clk_y=t.pageY-o.top}else a.clk_x=t.pageX-r.offsetLeft,a.clk_y=t.pageY-r.offsetTop;setTimeout((function(){a.clk=a.clk_x=a.clk_y=null}),100)}function n(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var i=/\r?\n/g,a={};a.fileapi=void 0!==e('<input type="file">').get(0).files,a.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,i,s){function u(r){var n,i,a=e.param(r,t.traditional).split("&"),o=a.length,s=[];for(n=0;n<o;n++)a[n]=a[n].replace(/\+/g," "),i=a[n].split("="),s.push([decodeURIComponent(i[0]),decodeURIComponent(i[1])]);return s}function l(r){function i(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){n("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){n("cannot get iframe.contentDocument: "+r),t=e.document}return t}function a(){var t=p.attr2("target"),r=p.attr2("action"),a=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";S.setAttribute("target",d),c&&!/post/i.test(c)||S.setAttribute("method","POST"),r!==f.url&&S.setAttribute("action",f.url),f.skipEncodingOverride||c&&!/post/i.test(c)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(T=setTimeout((function(){b=!0,s(w)}),f.timeout));var o=[];try{if(f.extraData)for(var u in f.extraData)f.extraData.hasOwnProperty(u)&&(e.isPlainObject(f.extraData[u])&&f.extraData[u].hasOwnProperty("name")&&f.extraData[u].hasOwnProperty("value")?o.push(e('<input type="hidden" name="'+f.extraData[u].name+'">',_).val(f.extraData[u].value).appendTo(S)[0]):o.push(e('<input type="hidden" name="'+u+'">',_).val(f.extraData[u]).appendTo(S)[0]));f.iframeTarget||g.appendTo(I),y.attachEvent?y.attachEvent("onload",s):y.addEventListener("load",s,!1),setTimeout((function e(){try{var t=i(y).readyState;n("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(t){n("Server abort: ",t," (",t.name,")"),s(B),T&&clearTimeout(T),T=void 0}}),15);try{S.submit()}catch(e){document.createElement("form").submit.apply(S)}}finally{S.setAttribute("action",r),S.setAttribute("enctype",a),t?S.setAttribute("target",t):p.removeAttr("target"),e(o).remove()}}function s(t){if(!v.aborted&&!R){if((L=i(y))||(n("cannot access response document"),t=B),t===w&&v)return v.abort("timeout"),void A.reject(v,"timeout");if(t===B&&v)return v.abort("server abort"),void A.reject(v,"error","server abort");if(L&&L.location.href!==f.iframeSrc||b){y.detachEvent?y.detachEvent("onload",s):y.removeEventListener("load",s,!1);var r,a="success";try{if(b)throw"timeout";var o="xml"===f.dataType||L.XMLDocument||e.isXMLDoc(L);if(n("isXml="+o),!o&&window.opera&&(null===L.body||!L.body.innerHTML)&&--x)return n("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=L.body?L.body:L.documentElement;v.responseText=u?u.innerHTML:null,v.responseXML=L.XMLDocument?L.XMLDocument:L,o&&(f.dataType="xml"),v.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(v.status=Number(u.getAttribute("status"))||v.status,v.statusText=u.getAttribute("statusText")||v.statusText);var l=(f.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||f.textarea){var p=L.getElementsByTagName("textarea")[0];if(p)v.responseText=p.value,v.status=Number(p.getAttribute("status"))||v.status,v.statusText=p.getAttribute("statusText")||v.statusText;else if(c){var d=L.getElementsByTagName("pre")[0],m=L.getElementsByTagName("body")[0];d?v.responseText=d.textContent?d.textContent:d.innerText:m&&(v.responseText=m.textContent?m.textContent:m.innerText)}}else"xml"===l&&!v.responseXML&&v.responseText&&(v.responseXML=O(v.responseText));try{D=U(v,l,f)}catch(e){a="parsererror",v.error=r=e||a}}catch(e){n("error caught: ",e),a="error",v.error=r=e||a}v.aborted&&(n("upload aborted"),a=null),v.status&&(a=v.status>=200&&v.status<300||304===v.status?"success":"error"),"success"===a?(f.success&&f.success.call(f.context,D,"success",v),A.resolve(v.responseText,"success",v),h&&e.event.trigger("ajaxSuccess",[v,f])):a&&(void 0===r&&(r=v.statusText),f.error&&f.error.call(f.context,v,a,r),A.reject(v,"error",r),h&&e.event.trigger("ajaxError",[v,f,r])),h&&e.event.trigger("ajaxComplete",[v,f]),h&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,v,a),R=!0,f.timeout&&clearTimeout(T),setTimeout((function(){f.iframeTarget?g.attr("src",f.iframeSrc):g.remove(),v.responseXML=null}),100)}}}var u,l,f,h,d,g,y,v,E,C,b,T,S=p[0],A=e.Deferred();if(A.abort=function(e){v.abort(e)},r)for(l=0;l<m.length;l++)u=e(m[l]),o?u.prop("disabled",!1):u.removeAttr("disabled");(f=e.extend(!0,{},e.ajaxSettings,t)).context=f.context||f,d="jqFormIO"+(new Date).getTime();var _=S.ownerDocument,I=p.closest("body");if(f.iframeTarget?(C=(g=e(f.iframeTarget,_)).attr2("name"))?d=C:g.attr2("name",d):(g=e('<iframe name="'+d+'" src="'+f.iframeSrc+'" />',_)).css({position:"absolute",top:"-1000px",left:"-1000px"}),y=g[0],v={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";n("aborting upload... "+r),this.aborted=1;try{y.contentWindow.document.execCommand&&y.contentWindow.document.execCommand("Stop")}catch(e){}g.attr("src",f.iframeSrc),v.error=r,f.error&&f.error.call(f.context,v,r,t),h&&e.event.trigger("ajaxError",[v,f,r]),f.complete&&f.complete.call(f.context,v,r)}},(h=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),h&&e.event.trigger("ajaxSend",[v,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,v,f))return f.global&&e.active--,A.reject(),A;if(v.aborted)return A.reject(),A;(E=S.clk)&&(C=E.name)&&!E.disabled&&(f.extraData=f.extraData||{},f.extraData[C]=E.value,"image"===E.type&&(f.extraData[C+".x"]=S.clk_x,f.extraData[C+".y"]=S.clk_y));var w=1,B=2,N=e("meta[name=csrf-token]").attr("content"),k=e("meta[name=csrf-param]").attr("content");k&&N&&(f.extraData=f.extraData||{},f.extraData[k]=N),f.forceSync?a():setTimeout(a,10);var D,L,R,x=50,O=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},P=e.parseJSON||function(e){return window.eval("("+e+")")},U=function(t,r,n){var i=t.getResponseHeader("content-type")||"",a=("xml"===r||!r)&&i.indexOf("xml")>=0,o=a?t.responseXML:t.responseText;return a&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),n&&n.dataFilter&&(o=n.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&i.indexOf("json")>=0?o=P(o):("script"===r||!r)&&i.indexOf("javascript")>=0&&e.globalEval(o)),o};return A}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var c,f,h,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:i},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),c=t.method||t.type||this.attr2("method"),(h=(h="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(h=(h.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:h,success:e.ajaxSettings.success,type:c||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var d={};if(this.trigger("form-pre-serialize",[this,t,d]),d.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var g=t.traditional;void 0===g&&(g=e.ajaxSettings.traditional);var y,m=[],v=this.formToArray(t.semantic,m,t.filtering);if(t.data){var E=e.isFunction(t.data)?t.data(v):t.data;t.extraData=E,y=e.param(E,g)}if(t.beforeSubmit&&!1===t.beforeSubmit(v,this,t))return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,d]),d.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var C=e.param(v,g);y&&(C=C?C+"&"+y:y),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+C,t.data=null):t.data=C;var b=[];if(t.resetForm&&b.push((function(){p.resetForm()})),t.clearForm&&b.push((function(){p.clearForm(t.includeHidden)})),!t.dataType&&t.target){var T=t.success||function(){};b.push((function(r,n,i){var a=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each((function(){T.apply(this,a)}))}))}else t.success&&(e.isArray(t.success)?e.merge(b,t.success):b.push(t.success));if(t.success=function(e,r,n){for(var i=t.context||this,a=0,o=b.length;a<o;a++)b[a].apply(i,[e,r,n||p,p])},t.error){var S=t.error;t.error=function(e,r,n){var i=t.context||this;S.apply(i,[e,r,n,p])}}if(t.complete){var A=t.complete;t.complete=function(e,r){var n=t.context||this;A.apply(n,[e,r,p])}}var _=e("input[type=file]:enabled",this).filter((function(){return""!==e(this).val()})).length>0,I="multipart/form-data",w=p.attr("enctype")===I||p.attr("encoding")===I,B=a.fileapi&&a.formdata;n("fileAPI :"+B);var N,k=(_||w)&&!B;!1!==t.iframe&&(t.iframe||k)?t.closeKeepAlive?e.get(t.closeKeepAlive,(function(){N=l(v)})):N=l(v):N=(_||w)&&B?function(r){for(var n=new FormData,i=0;i<r.length;i++)n.append(r[i].name,r[i].value);if(t.extraData){var a=u(t.extraData);for(i=0;i<a.length;i++)a[i]&&n.append(a[i][0],a[i][1])}t.data=null;var o=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:c||"POST"});t.uploadProgress&&(o.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",(function(e){var r=0,n=e.loaded||e.position,i=e.total;e.lengthComputable&&(r=Math.ceil(n/i*100)),t.uploadProgress(e,n,i,r)}),!1),r}),o.data=null;var s=o.beforeSend;return o.beforeSend=function(e,r){t.formData?r.data=t.formData:r.data=n,s&&s.call(this,e,r)},e.ajax(o)}(v):e.ajax(t),p.removeData("jqxhr").data("jqxhr",N);for(var D=0;D<m.length;D++)m[D]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(i,a,o,s){if(("string"==typeof i||!1===i&&arguments.length>0)&&(i={url:i,data:a,dataType:o},"function"==typeof s&&(i.success=s)),(i=i||{}).delegation=i.delegation&&e.isFunction(e.fn.on),!i.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(n("DOM not ready, queuing ajaxForm"),e((function(){e(u.s,u.c).ajaxForm(i)})),this):(n("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return i.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,i,t).on("click.form-plugin",this.selector,i,r),this):this.ajaxFormUnbind().on("submit.form-plugin",i,t).on("click.form-plugin",i,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,n){var i=[];if(0===this.length)return i;var o,s,u,l,c,f,h,p,d=this[0],g=this.attr("id"),y=t||void 0===d.elements?d.getElementsByTagName("*"):d.elements;if(y&&(y=e.makeArray(y)),g&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+g+'"]').get()).length&&(y=(y||[]).concat(o)),!y||!y.length)return i;for(e.isFunction(n)&&(y=e.map(y,n)),s=0,h=y.length;s<h;s++)if((l=(f=y[s]).name)&&!f.disabled)if(t&&d.clk&&"image"===f.type)d.clk===f&&(i.push({name:l,value:e(f).val(),type:f.type}),i.push({name:l+".x",value:d.clk_x},{name:l+".y",value:d.clk_y}));else if((c=e.fieldValue(f,!0))&&c.constructor===Array)for(r&&r.push(f),u=0,p=c.length;u<p;u++)i.push({name:l,value:c[u]});else if(a.fileapi&&"file"===f.type){r&&r.push(f);var m=f.files;if(m.length)for(u=0;u<m.length;u++)i.push({name:l,value:m[u],type:f.type});else i.push({name:l,value:"",type:f.type})}else null!=c&&(r&&r.push(f),i.push({name:l,value:c,type:f.type,required:f.required}));if(!t&&d.clk){var v=e(d.clk),E=v[0];(l=E.name)&&!E.disabled&&"image"===E.type&&(i.push({name:l,value:v.val()}),i.push({name:l+".x",value:d.clk_x},{name:l+".y",value:d.clk_y}))}return i},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each((function(){var n=this.name;if(n){var i=e.fieldValue(this,t);if(i&&i.constructor===Array)for(var a=0,o=i.length;a<o;a++)r.push({name:n,value:i[a]});else null!=i&&r.push({name:this.name,value:i})}})),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],n=0,i=this.length;n<i;n++){var a=this[n],o=e.fieldValue(a,t);null==o||o.constructor===Array&&!o.length||(o.constructor===Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var n=t.name,a=t.type,o=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!n||t.disabled||"reset"===a||"button"===a||("checkbox"===a||"radio"===a)&&!t.checked||("submit"===a||"image"===a)&&t.form&&t.form.clk!==t||"select"===o&&-1===t.selectedIndex))return null;if("select"===o){var s=t.selectedIndex;if(s<0)return null;for(var u=[],l=t.options,c="select-one"===a,f=c?s+1:l.length,h=c?s:0;h<f;h++){var p=l[h];if(p.selected&&!p.disabled){var d=p.value;if(d||(d=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),c)return d;u.push(d)}}return u}return e(t).val().replace(i,"\r\n")},e.fn.clearForm=function(t){return this.each((function(){e("input,select,textarea",this).clearFields(t)}))},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each((function(){var n=this.type,i=this.tagName.toLowerCase();r.test(n)||"textarea"===i?this.value="":"checkbox"===n||"radio"===n?this.checked=!1:"select"===i?this.selectedIndex=-1:"file"===n?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(n)||"string"==typeof t&&e(this).is(t))&&(this.value="")}))},e.fn.resetForm=function(){return this.each((function(){var t=e(this),r=this.tagName.toLowerCase();switch(r){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var n=t.parents("select");return n.length&&n[0].multiple?"option"===r?this.selected=this.defaultSelected:t.find("option").resetForm():n.resetForm(),!0;case"select":return t.find("option").each((function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1})),!0;case"label":var i=e(t.attr("for")),a=t.find("input,select,textarea");return i[0]&&a.unshift(i[0]),a.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}}))},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each((function(){this.disabled=!e}))},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each((function(){var r=this.type;if("checkbox"===r||"radio"===r)this.checked=t;else if("option"===this.tagName.toLowerCase()){var n=e(this).parent("select");t&&n[0]&&"select-one"===n[0].type&&n.find("option").selected(!1),this.selected=t}}))},e.fn.ajaxSubmit.debug=!1})?n.apply(t,i):n)||(e.exports=a)},function(e,t,r){e.exports=r(0),r(6),r(50),r(2),r(16),r(35),r(13),r(52),r(10),r(54),r(37),r(55),r(34),r(20),r(8),r(31),r(22),r(56),r(19),r(32),r(29),r(24),r(3),r(30),r(57),r(58),r(26),r(1)},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(45),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(9))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,u=1,l={},c=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){a.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&d(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return l[u]=i,n(u),u++},h.clearImmediate=p}function p(e){delete l[e]}function d(e){if(c)setTimeout(d,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{p(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(9),r(17))},function(e,t,r){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=l(e),o=n[0],s=n[1],u=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),c=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(c(e,o,o+16383>s?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=l}return(p?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+p]=255&o,p+=d,o/=256,l-=8);e[r+p-d]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){var r={};e.exports=r;var n={};r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,a=t.length,o=t.charAt(0),s=[0];for(i=0;i<e.length;++i){for(var u=0,l=e[i];u<s.length;++u)l+=s[u]<<8,s[u]=l%a,l=l/a|0;for(;l>0;)s.push(l%a),l=l/a|0}for(i=0;0===e[i]&&i<e.length-1;++i)n+=o;for(i=s.length-1;i>=0;--i)n+=t[s[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),a=[0];for(r=0;r<e.length();++r){for(var o=0,s=e.at(r);o<a.length;++o)s+=a[o]<<8,a[o]=s%n,s=s/n|0;for(;s>0;)a.push(s%n),s=s/n|0}var u="";for(r=0;0===e.at(r)&&r<e.length()-1;++r)u+=i;for(r=a.length-1;r>=0;--r)u+=t[a[r]];return u}(e,t);if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.');var i=n[r];if(!i){i=n[r]=[];for(var a=0;a<r.length;++a)i[r.charCodeAt(a)]=a}e=e.replace(/\s/g,"");var o=r.length,s=r.charAt(0),u=[0];for(a=0;a<e.length;a++){var l=i[e.charCodeAt(a)];if(void 0===l)return;for(var c=0,f=l;c<u.length;++c)f+=u[c]*o,u[c]=255&f,f>>=8;for(;f>0;)u.push(255&f),f>>=8}for(var h=0;e[h]===s&&h<e.length-1;++h)u.push(0);return void 0!==t?t.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,r(12).Buffer)},function(e,t,r){var n=r(0);r(6),r(26);var i=e.exports=n.tls;function a(e,t,r){var a=t.entity===n.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:n.cipher.createDecipher("AES-CBC",a?r.keys.server_write_key:r.keys.client_write_key),iv:a?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:n.cipher.createCipher("AES-CBC",a?r.keys.client_write_key:r.keys.server_write_key),iv:a?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=l,e.write.cipherFunction=o,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=i.hmac_sha1}function o(e,t){var r,a=!1,o=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(o),t.updateSequenceNumber(),r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:n.random.getBytesSync(16),t.cipherState.init=!0;var u=t.cipherState.cipher;return u.start({iv:r}),e.version.minor>=i.Versions.TLS_1_1.minor&&u.output.putBytes(r),u.update(e.fragment),u.finish(s)&&(e.fragment=u.output,e.length=e.fragment.length(),a=!0),a}function s(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function u(e,t,r){var n=!0;if(r){for(var i=t.length(),a=t.last(),o=i-1-a;o<i-1;++o)n=n&&t.at(o)==a;n&&t.truncate(a+1)}return n}function l(e,t){var r,a=!1;r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:e.fragment.getBytes(16),t.cipherState.init=!0;var o=t.cipherState.cipher;o.start({iv:r}),o.update(e.fragment),a=o.finish(u);var s=t.macLength,l=n.random.getBytesSync(s),c=o.output.length();c>=s?(e.fragment=o.output.getBytes(c-s),l=o.output.getBytes(s)):e.fragment=o.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var f=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),a=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),t===r}(t.macKey,l,f)&&a}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:a},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:a}},function(e,t,r){var n=r(0);r(34),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},function(e,t,r){(function(t){var n=r(0);r(15),r(3),r(36),r(1);var i=r(53),a=i.publicKeyValidator,o=i.privateKeyValidator;if(void 0===s)var s=n.jsbn.BigInteger;var u=n.util.ByteBuffer,l=void 0===t?Uint8Array:t;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var c=n.ed25519;function f(e){var r=e.message;if(r instanceof Uint8Array||r instanceof l)return r;var n=e.encoding;if(void 0===r){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');r=e.md.digest().getBytes(),n="binary"}if("string"==typeof r&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof r){if(void 0!==t)return t.from(r,n);r=new u(r,n)}else if(!(r instanceof u))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new l(r.length()),a=0;a<i.length;++a)i[a]=r.at(a);return i}c.constants={},c.constants.PUBLIC_KEY_BYTE_LENGTH=32,c.constants.PRIVATE_KEY_BYTE_LENGTH=64,c.constants.SEED_BYTE_LENGTH=32,c.constants.SIGN_BYTE_LENGTH=64,c.constants.HASH_BYTE_LENGTH=64,c.generateKeyPair=function(e){var t=(e=e||{}).seed;if(void 0===t)t=n.random.getBytesSync(c.constants.SEED_BYTE_LENGTH);else if("string"==typeof t){if(t.length!==c.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+c.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=f({message:t,encoding:"binary"});for(var r=new l(c.constants.PUBLIC_KEY_BYTE_LENGTH),i=new l(c.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)i[a]=t[a];return function(e,t){var r,n=[O(),O(),O(),O()],i=C(t,32);for(i[0]&=248,i[31]&=127,i[31]|=64,D(n,i),_(e,n),r=0;r<32;++r)t[r+32]=e[r]}(r,i),{publicKey:r,privateKey:i}},c.privateKeyFromAsn1=function(e){var t={},r=[];if(!n.asn1.validate(e,o,t,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var a=n.asn1.derToOid(t.privateKeyOid),s=n.oids.EdDSA25519;if(a!==s)throw new Error('Invalid OID "'+a+'"; OID must be "'+s+'".');var u=t.privateKey;return{privateKeyBytes:f({message:n.asn1.fromDer(u).value,encoding:"binary"})}},c.publicKeyFromAsn1=function(e){var t={},r=[];if(!n.asn1.validate(e,a,t,r)){var i=new Error("Invalid Key.");throw i.errors=r,i}var o=n.asn1.derToOid(t.publicKeyOid),s=n.oids.EdDSA25519;if(o!==s)throw new Error('Invalid OID "'+o+'"; OID must be "'+s+'".');var u=t.ed25519PublicKey;if(u.length!==c.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return f({message:u,encoding:"binary"})},c.publicKeyFromPrivateKey=function(e){var t=f({message:(e=e||{}).privateKey,encoding:"binary"});if(t.length!==c.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+c.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new l(c.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<r.length;++n)r[n]=t[32+n];return r},c.sign=function(e){var t=f(e=e||{}),r=f({message:e.privateKey,encoding:"binary"});if(r.length===c.constants.SEED_BYTE_LENGTH)r=c.generateKeyPair({seed:r}).privateKey;else if(r.length!==c.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+c.constants.SEED_BYTE_LENGTH+" or "+c.constants.PRIVATE_KEY_BYTE_LENGTH);var n=new l(c.constants.SIGN_BYTE_LENGTH+t.length);!function(e,t,r,n){var i,a,o=new Float64Array(64),s=[O(),O(),O(),O()],u=C(n,32);u[0]&=248,u[31]&=127,u[31]|=64;var l=r+64;for(i=0;i<r;++i)e[64+i]=t[i];for(i=0;i<32;++i)e[32+i]=u[32+i];var c=C(e.subarray(32),r+32);for(T(c),D(s,c),_(e,s),i=32;i<64;++i)e[i]=n[i];var f=C(e,r+64);for(T(f),i=32;i<64;++i)o[i]=0;for(i=0;i<32;++i)o[i]=c[i];for(i=0;i<32;++i)for(a=0;a<32;a++)o[i+a]+=f[i]*u[a];b(e.subarray(32),o)}(n,t,t.length,r);for(var i=new l(c.constants.SIGN_BYTE_LENGTH),a=0;a<i.length;++a)i[a]=n[a];return i},c.verify=function(e){var t=f(e=e||{});if(void 0===e.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=f({message:e.signature,encoding:"binary"});if(r.length!==c.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+c.constants.SIGN_BYTE_LENGTH);var n=f({message:e.publicKey,encoding:"binary"});if(n.length!==c.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+c.constants.PUBLIC_KEY_BYTE_LENGTH);var i,a=new l(c.constants.SIGN_BYTE_LENGTH+t.length),o=new l(c.constants.SIGN_BYTE_LENGTH+t.length);for(i=0;i<c.constants.SIGN_BYTE_LENGTH;++i)a[i]=r[i];for(i=0;i<t.length;++i)a[i+c.constants.SIGN_BYTE_LENGTH]=t[i];return function(e,t,r,n){var i,a=new l(32),o=[O(),O(),O(),O()],s=[O(),O(),O(),O()];if(-1,r<64)return-1;if(function(e,t){var r=O(),n=O(),i=O(),a=O(),o=O(),s=O(),u=O();L(e[2],p),function(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}(e[1],t),M(i,e[1]),V(a,i,d),U(i,i,e[2]),P(a,e[2],a),M(o,a),M(s,o),V(u,s,o),V(r,u,i),V(r,r,a),function(e,t){var r,n=O();for(r=0;r<16;++r)n[r]=t[r];for(r=250;r>=0;--r)M(n,n),1!==r&&V(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),V(r,r,i),V(r,r,a),V(r,r,a),V(e[0],r,a),M(n,e[0]),V(n,n,a),w(n,i)&&V(e[0],e[0],E);if(M(n,e[0]),V(n,n,a),w(n,i))return-1;N(e[0])===t[31]>>7&&U(e[0],h,e[0]);return V(e[3],e[0],e[1]),0}(s,n))return-1;for(i=0;i<r;++i)e[i]=t[i];for(i=0;i<32;++i)e[i+32]=n[i];var u=C(e,r);if(T(u),k(o,s,u),D(s,t.subarray(32)),S(o,s),_(a,o),r-=64,B(t,0,a,0)){for(i=0;i<r;++i)e[i]=0;return-1}for(i=0;i<r;++i)e[i]=t[i+64];return r}(o,a,a.length,n)>=0};var h=O(),p=O([1]),d=O([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=O([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=O([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),m=O([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),E=O([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function C(e,r){var i=n.md.sha512.create(),a=new u(e);i.update(a.getBytes(r),"binary");var o=i.digest().getBytes();if(void 0!==t)return t.from(o,"binary");for(var s=new l(c.constants.HASH_BYTE_LENGTH),f=0;f<64;++f)s[f]=o.charCodeAt(f);return s}function b(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i<a;++i)t[i]+=r-16*t[n]*v[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*v[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*v[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function T(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;b(e,t)}function S(e,t){var r=O(),n=O(),i=O(),a=O(),o=O(),s=O(),u=O(),l=O(),c=O();U(r,e[1],e[0]),U(c,t[1],t[0]),V(r,r,c),P(n,e[0],e[1]),P(c,t[0],t[1]),V(n,n,c),V(i,e[3],t[3]),V(i,i,g),V(a,e[2],t[2]),P(a,a,a),U(o,n,r),U(s,a,i),P(u,a,i),P(l,n,r),V(e[0],o,s),V(e[1],l,u),V(e[2],u,s),V(e[3],o,l)}function A(e,t,r){for(var n=0;n<4;++n)x(e[n],t[n],r)}function _(e,t){var r=O(),n=O(),i=O();!function(e,t){var r,n=O();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)M(n,n),2!==r&&4!==r&&V(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),V(r,t[0],i),V(n,t[1],i),I(e,n),e[31]^=N(r)<<7}function I(e,t){var r,n,i,a=O(),o=O();for(r=0;r<16;++r)o[r]=t[r];for(R(o),R(o),R(o),n=0;n<2;++n){for(a[0]=o[0]-65517,r=1;r<15;++r)a[r]=o[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,x(o,a,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function w(e,t){var r=new l(32),n=new l(32);return I(r,e),I(n,t),B(r,0,n,0)}function B(e,t,r,n){return function(e,t,r,n,i){var a,o=0;for(a=0;a<i;++a)o|=e[t+a]^r[n+a];return(1&o-1>>>8)-1}(e,t,r,n,32)}function N(e){var t=new l(32);return I(t,e),1&t[0]}function k(e,t,r){var n,i;for(L(e[0],h),L(e[1],p),L(e[2],p),L(e[3],h),i=255;i>=0;--i)A(e,t,n=r[i/8|0]>>(7&i)&1),S(t,e),S(e,e),A(e,t,n)}function D(e,t){var r=[O(),O(),O(),O()];L(r[0],y),L(r[1],m),L(r[2],p),V(r[3],y,m),k(e,r,t)}function L(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function R(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function x(e,t,r){for(var n,i=~(r-1),a=0;a<16;++a)n=i&(e[a]^t[a]),e[a]^=n,t[a]^=n}function O(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;++t)r[t]=e[t];return r}function P(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]+r[n]}function U(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]-r[n]}function M(e,t){V(e,t,t)}function V(e,t,r){var n,i,a=0,o=0,s=0,u=0,l=0,c=0,f=0,h=0,p=0,d=0,g=0,y=0,m=0,v=0,E=0,C=0,b=0,T=0,S=0,A=0,_=0,I=0,w=0,B=0,N=0,k=0,D=0,L=0,R=0,x=0,O=0,P=r[0],U=r[1],M=r[2],V=r[3],j=r[4],K=r[5],F=r[6],H=r[7],q=r[8],G=r[9],W=r[10],Q=r[11],z=r[12],Y=r[13],X=r[14],$=r[15];a+=(n=t[0])*P,o+=n*U,s+=n*M,u+=n*V,l+=n*j,c+=n*K,f+=n*F,h+=n*H,p+=n*q,d+=n*G,g+=n*W,y+=n*Q,m+=n*z,v+=n*Y,E+=n*X,C+=n*$,o+=(n=t[1])*P,s+=n*U,u+=n*M,l+=n*V,c+=n*j,f+=n*K,h+=n*F,p+=n*H,d+=n*q,g+=n*G,y+=n*W,m+=n*Q,v+=n*z,E+=n*Y,C+=n*X,b+=n*$,s+=(n=t[2])*P,u+=n*U,l+=n*M,c+=n*V,f+=n*j,h+=n*K,p+=n*F,d+=n*H,g+=n*q,y+=n*G,m+=n*W,v+=n*Q,E+=n*z,C+=n*Y,b+=n*X,T+=n*$,u+=(n=t[3])*P,l+=n*U,c+=n*M,f+=n*V,h+=n*j,p+=n*K,d+=n*F,g+=n*H,y+=n*q,m+=n*G,v+=n*W,E+=n*Q,C+=n*z,b+=n*Y,T+=n*X,S+=n*$,l+=(n=t[4])*P,c+=n*U,f+=n*M,h+=n*V,p+=n*j,d+=n*K,g+=n*F,y+=n*H,m+=n*q,v+=n*G,E+=n*W,C+=n*Q,b+=n*z,T+=n*Y,S+=n*X,A+=n*$,c+=(n=t[5])*P,f+=n*U,h+=n*M,p+=n*V,d+=n*j,g+=n*K,y+=n*F,m+=n*H,v+=n*q,E+=n*G,C+=n*W,b+=n*Q,T+=n*z,S+=n*Y,A+=n*X,_+=n*$,f+=(n=t[6])*P,h+=n*U,p+=n*M,d+=n*V,g+=n*j,y+=n*K,m+=n*F,v+=n*H,E+=n*q,C+=n*G,b+=n*W,T+=n*Q,S+=n*z,A+=n*Y,_+=n*X,I+=n*$,h+=(n=t[7])*P,p+=n*U,d+=n*M,g+=n*V,y+=n*j,m+=n*K,v+=n*F,E+=n*H,C+=n*q,b+=n*G,T+=n*W,S+=n*Q,A+=n*z,_+=n*Y,I+=n*X,w+=n*$,p+=(n=t[8])*P,d+=n*U,g+=n*M,y+=n*V,m+=n*j,v+=n*K,E+=n*F,C+=n*H,b+=n*q,T+=n*G,S+=n*W,A+=n*Q,_+=n*z,I+=n*Y,w+=n*X,B+=n*$,d+=(n=t[9])*P,g+=n*U,y+=n*M,m+=n*V,v+=n*j,E+=n*K,C+=n*F,b+=n*H,T+=n*q,S+=n*G,A+=n*W,_+=n*Q,I+=n*z,w+=n*Y,B+=n*X,N+=n*$,g+=(n=t[10])*P,y+=n*U,m+=n*M,v+=n*V,E+=n*j,C+=n*K,b+=n*F,T+=n*H,S+=n*q,A+=n*G,_+=n*W,I+=n*Q,w+=n*z,B+=n*Y,N+=n*X,k+=n*$,y+=(n=t[11])*P,m+=n*U,v+=n*M,E+=n*V,C+=n*j,b+=n*K,T+=n*F,S+=n*H,A+=n*q,_+=n*G,I+=n*W,w+=n*Q,B+=n*z,N+=n*Y,k+=n*X,D+=n*$,m+=(n=t[12])*P,v+=n*U,E+=n*M,C+=n*V,b+=n*j,T+=n*K,S+=n*F,A+=n*H,_+=n*q,I+=n*G,w+=n*W,B+=n*Q,N+=n*z,k+=n*Y,D+=n*X,L+=n*$,v+=(n=t[13])*P,E+=n*U,C+=n*M,b+=n*V,T+=n*j,S+=n*K,A+=n*F,_+=n*H,I+=n*q,w+=n*G,B+=n*W,N+=n*Q,k+=n*z,D+=n*Y,L+=n*X,R+=n*$,E+=(n=t[14])*P,C+=n*U,b+=n*M,T+=n*V,S+=n*j,A+=n*K,_+=n*F,I+=n*H,w+=n*q,B+=n*G,N+=n*W,k+=n*Q,D+=n*z,L+=n*Y,R+=n*X,x+=n*$,C+=(n=t[15])*P,o+=38*(T+=n*M),s+=38*(S+=n*V),u+=38*(A+=n*j),l+=38*(_+=n*K),c+=38*(I+=n*F),f+=38*(w+=n*H),h+=38*(B+=n*q),p+=38*(N+=n*G),d+=38*(k+=n*W),g+=38*(D+=n*Q),y+=38*(L+=n*z),m+=38*(R+=n*Y),v+=38*(x+=n*X),E+=38*(O+=n*$),a=(n=(a+=38*(b+=n*U))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),E=(n=E+i+65535)-65536*(i=Math.floor(n/65536)),C=(n=C+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),o=(n=o+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),E=(n=E+i+65535)-65536*(i=Math.floor(n/65536)),C=(n=C+i+65535)-65536*(i=Math.floor(n/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=g,e[11]=y,e[12]=m,e[13]=v,e[14]=E,e[15]=C}}).call(this,r(12).Buffer)},function(e,t,r){var n=r(0);r(2);var i=n.asn1;t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},function(e,t,r){var n=r(0);r(1),r(3),r(15),e.exports=n.kem=n.kem||{};var i=n.jsbn.BigInteger;function a(e,t,r,i){e.generate=function(e,a){for(var o=new n.util.ByteBuffer,s=Math.ceil(a/i)+r,u=new n.util.ByteBuffer,l=r;l<s;++l){u.putInt32(l),t.start(),t.update(e+u.getBytes());var c=t.digest();o.putBytes(c.getBytes(i))}return o.truncate(o.length()-a),o.getBytes()}}n.kem.rsa={},n.kem.rsa.create=function(e,t){var r=(t=t||{}).prng||n.random,a={encrypt:function(t,a){var o,s=Math.ceil(t.n.bitLength()/8);do{o=new i(n.util.bytesToHex(r.getBytesSync(s)),16).mod(t.n)}while(o.compareTo(i.ONE)<=0);var u=s-(o=n.util.hexToBytes(o.toString(16))).length;return u>0&&(o=n.util.fillString(String.fromCharCode(0),u)+o),{encapsulation:t.encrypt(o,"NONE"),key:e.generate(o,a)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}};return a},n.kem.kdf1=function(e,t){a(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){a(this,e,1,t||e.digestLength)}},function(e,t,r){e.exports=r(4),r(18),r(11),r(28),r(36)},function(e,t,r){var n=r(0);r(6),r(2),r(13),r(7),r(8),r(33),r(3),r(1),r(23);var i=n.asn1,a=e.exports=n.pkcs7=n.pkcs7||{};function o(e){var t={},r=[];if(!i.validate(e,a.asn1.recipientInfoValidator,t,r)){var o=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw o.errors=r,o}return{version:t.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(t.issuer),serialNumber:n.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter.value,content:t.encKey}}}function s(e){for(var t,r=[],a=0;a<e.length;++a)r.push((t=e[a],i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:t.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(t.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.encryptedContent.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.encryptedContent.content)])));return r}function u(e){var t=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:e.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(e.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.digestAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureAlgorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")])),t.value.push(i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),a=0;a<e.unauthenticatedAttributes.length;++a){var o=e.unauthenticatedAttributes[a];r.values.push(l(o))}t.value.push(r)}return t}function l(e){var t;if(e.type===n.pki.oids.contentType)t=i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.value).getBytes());else if(e.type===n.pki.oids.messageDigest)t=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===n.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),a=new Date("2050-01-01T00:00:00Z"),o=e.value;if("string"==typeof o){var s=Date.parse(o);o=isNaN(s)?13===o.length?i.utcTimeToDate(o):i.generalizedTimeToDate(o):new Date(s)}t=o>=r&&o<a?i.create(i.Class.UNIVERSAL,i.Type.UTCTIME,!1,i.dateToUtcTime(o)):i.create(i.Class.UNIVERSAL,i.Type.GENERALIZEDTIME,!1,i.dateToGeneralizedTime(o))}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[t])])}function c(e,t,r){var a={};if(!i.validate(t,r,a,[])){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw o.errors=o,o}if(i.derToOid(a.contentType)!==n.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(a.encryptedContent){var s="";if(n.util.isArray(a.encryptedContent))for(var u=0;u<a.encryptedContent.length;++u){if(a.encryptedContent[u].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");s+=a.encryptedContent[u].value}else s=a.encryptedContent;e.encryptedContent={algorithm:i.derToOid(a.encAlgorithm),parameter:n.util.createBuffer(a.encParameter.value),content:n.util.createBuffer(s)}}if(a.content){s="";if(n.util.isArray(a.content))for(u=0;u<a.content.length;++u){if(a.content[u].type!==i.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");s+=a.content[u].value}else s=a.content;e.content=n.util.createBuffer(s)}return e.version=a.version.charCodeAt(0),e.rawCapture=a,a}function f(e){if(void 0===e.encryptedContent.key)throw new Error("Symmetric key not available.");if(void 0===e.content){var t;switch(e.encryptedContent.algorithm){case n.pki.oids["aes128-CBC"]:case n.pki.oids["aes192-CBC"]:case n.pki.oids["aes256-CBC"]:t=n.aes.createDecryptionCipher(e.encryptedContent.key);break;case n.pki.oids.desCBC:case n.pki.oids["des-EDE3-CBC"]:t=n.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}a.messageFromPem=function(e){var t=n.pem.decode(e)[0];if("PKCS7"!==t.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var o=i.fromDer(t.body);return a.messageFromAsn1(o)},a.messageToPem=function(e,t){var r={type:"PKCS7",body:i.toDer(e.toAsn1()).getBytes()};return n.pem.encode(r,{maxline:t})},a.messageFromAsn1=function(e){var t={},r=[];if(!i.validate(e,a.asn1.contentInfoValidator,t,r)){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw o.errors=r,o}var s,u=i.derToOid(t.contentType);switch(u){case n.pki.oids.envelopedData:s=a.createEnvelopedData();break;case n.pki.oids.encryptedData:s=a.createEncryptedData();break;case n.pki.oids.signedData:s=a.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+u+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s},a.createSignedData=function(){var e=null;return e={type:n.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(t){if(c(e,t,a.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var r=e.rawCapture.certificates.value,i=0;i<r.length;++i)e.certificates.push(n.pki.certificateFromAsn1(r[i]))},toAsn1:function(){e.contentInfo||e.sign();for(var t=[],r=0;r<e.certificates.length;++r)t.push(n.pki.certificateToAsn1(e.certificates[r]));var a=[],o=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return t.length>0&&o.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),a.length>0&&o.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,a)),o.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),o])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var a=t.certificate;"string"==typeof a&&(a=n.pki.certificateFromPem(a)),r=a.issuer.attributes,i=a.serialNumber}var o=t.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof o&&(o=n.pki.privateKeyFromPem(o));var s=t.digestAlgorithm||n.pki.oids.sha1;switch(s){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+s)}var u=t.authenticatedAttributes||[];if(u.length>0){for(var l=!1,c=!1,f=0;f<u.length;++f){var h=u[f];if(l||h.type!==n.pki.oids.contentType){if(c||h.type!==n.pki.oids.messageDigest);else if(c=!0,l)break}else if(l=!0,c)break}if(!l||!c)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:o,version:1,issuer:r,serialNumber:i,digestAlgorithm:s,signatureAlgorithm:n.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(t){var r;(t=t||{},"object"!=typeof e.content||null===e.contentInfo)&&(e.contentInfo=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.pki.oids.data).getBytes())]),"content"in e&&(e.content instanceof n.util.ByteBuffer?r=e.content.bytes():"string"==typeof e.content&&(r=n.util.encodeUtf8(e.content)),t.detached?e.detachedContent=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r):e.contentInfo.value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,r)]))));0!==e.signers.length&&function(t){var r;r=e.detachedContent?e.detachedContent:(r=e.contentInfo.value[1]).value[0];if(!r)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var a=i.derToOid(e.contentInfo.value[0].value),o=i.toDer(r);for(var s in o.getByte(),i.getBerValueLength(o),o=o.getBytes(),t)t[s].start().update(o);for(var c=new Date,f=0;f<e.signers.length;++f){var h=e.signers[f];if(0===h.authenticatedAttributes.length){if(a!==n.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var p=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[]),d=0;d<h.authenticatedAttributes.length;++d){var g=h.authenticatedAttributes[d];g.type===n.pki.oids.messageDigest?g.value=t[h.digestAlgorithm].digest():g.type===n.pki.oids.signingTime&&(g.value||(g.value=c)),p.value.push(l(g)),h.authenticatedAttributesAsn1.value.push(l(g))}o=i.toDer(p).getBytes(),h.md.start().update(o)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=function(e){for(var t=[],r=0;r<e.length;++r)t.push(u(e[r]));return t}(e.signers)}(function(){for(var t={},r=0;r<e.signers.length;++r){var a=e.signers[r];(o=a.digestAlgorithm)in t||(t[o]=n.md[n.pki.oids[o]].create()),0===a.authenticatedAttributes.length?a.md=t[o]:a.md=n.md[n.pki.oids[o]].create()}for(var o in e.digestAlgorithmIdentifiers=[],t)e.digestAlgorithmIdentifiers.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]));return t}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(t){"string"==typeof t&&(t=n.pki.certificateFromPem(t)),e.certificates.push(t)},addCertificateRevokationList:function(e){throw new Error("PKCS#7 CRL support not yet implemented.")}}},a.createEncryptedData=function(){var e=null;return e={type:n.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:n.pki.oids["aes256-CBC"]},fromAsn1:function(t){c(e,t,a.asn1.encryptedDataValidator)},decrypt:function(t){void 0!==t&&(e.encryptedContent.key=t),f(e)}}},a.createEnvelopedData=function(){var e=null;return e={type:n.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:n.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=c(e,t,a.asn1.envelopedDataValidator);e.recipients=function(e){for(var t=[],r=0;r<e.length;++r)t.push(o(e[r]));return t}(r.recipientInfos.value)},toAsn1:function(){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,s(e.recipients)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,(t=e.encryptedContent,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(n.pki.oids.data).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.parameter.getBytes())]),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.content.getBytes())])]))])])]);var t},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var i=e.recipients[n],a=i.issuer;if(i.serialNumber===t.serialNumber&&a.length===r.length){for(var o=!0,s=0;s<r.length;++s)if(a[s].type!==r[s].type||a[s].value!==r[s].value){o=!1;break}if(o)return i}}return null},decrypt:function(t,r){if(void 0===e.encryptedContent.key&&void 0!==t&&void 0!==r)switch(t.encryptedContent.algorithm){case n.pki.oids.rsaEncryption:case n.pki.oids.desCBC:var i=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=n.util.createBuffer(i);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}f(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:n.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(void 0===e.encryptedContent.content){var i,a,o;switch(r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key,r){case n.pki.oids["aes128-CBC"]:i=16,a=16,o=n.aes.createEncryptionCipher;break;case n.pki.oids["aes192-CBC"]:i=24,a=16,o=n.aes.createEncryptionCipher;break;case n.pki.oids["aes256-CBC"]:i=32,a=16,o=n.aes.createEncryptionCipher;break;case n.pki.oids["des-EDE3-CBC"]:i=24,a=8,o=n.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===t)t=n.util.createBuffer(n.random.getBytes(i));else if(t.length()!=i)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+i+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=n.util.createBuffer(n.random.getBytes(a));var s=o(t);if(s.start(e.encryptedContent.parameter.copy()),s.update(e.content),!s.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=s.output}for(var u=0;u<e.recipients.length;++u){var l=e.recipients[u];if(void 0===l.encryptedContent.content)switch(l.encryptedContent.algorithm){case n.pki.oids.rsaEncryption:l.encryptedContent.content=l.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+l.encryptedContent.algorithm)}}}}}},function(e,t,r){var n=r(0);r(6),r(10),r(18),r(11),r(1);var i=e.exports=n.ssh=n.ssh||{};function a(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function o(e,t){e.putInt32(t.length),e.putString(t)}function s(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}i.privateKeyToPutty=function(e,t,r){var i=""===(t=t||"")?"none":"aes256-cbc",u="PuTTY-User-Key-File-2: ssh-rsa\r\n";u+="Encryption: "+i+"\r\n",u+="Comment: "+(r=r||"")+"\r\n";var l=n.util.createBuffer();o(l,"ssh-rsa"),a(l,e.e),a(l,e.n);var c=n.util.encode64(l.bytes(),64),f=Math.floor(c.length/66)+1;u+="Public-Lines: "+f+"\r\n",u+=c;var h,p=n.util.createBuffer();if(a(p,e.d),a(p,e.p),a(p,e.q),a(p,e.qInv),t){var d=p.length()+16-1;d-=d%16;var g=s(p.bytes());g.truncate(g.length()-d+p.length()),p.putBuffer(g);var y=n.util.createBuffer();y.putBuffer(s("\0\0\0\0",t)),y.putBuffer(s("\0\0\0",t));var m=n.aes.createEncryptionCipher(y.truncate(8),"CBC");m.start(n.util.createBuffer().fillWithByte(0,16)),m.update(p.copy()),m.finish();var v=m.output;v.truncate(16),h=n.util.encode64(v.bytes(),64)}else h=n.util.encode64(p.bytes(),64);u+="\r\nPrivate-Lines: "+(f=Math.floor(h.length/66)+1)+"\r\n",u+=h;var E=s("putty-private-key-file-mac-key",t),C=n.util.createBuffer();o(C,"ssh-rsa"),o(C,i),o(C,r),C.putInt32(l.length()),C.putBuffer(l),C.putInt32(p.length()),C.putBuffer(p);var b=n.hmac.create();return b.start("sha1",E),b.update(C.bytes()),u+="\r\nPrivate-MAC: "+b.digest().toHex()+"\r\n"},i.publicKeyToOpenSSH=function(e,t){t=t||"";var r=n.util.createBuffer();return o(r,"ssh-rsa"),a(r,e.e),a(r,e.n),"ssh-rsa "+n.util.encode64(r.bytes())+" "+t},i.privateKeyToOpenSSH=function(e,t){return t?n.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):n.pki.privateKeyToPem(e)},i.getPublicKeyFingerprint=function(e,t){var r=(t=t||{}).md||n.md.md5.create(),i=n.util.createBuffer();o(i,"ssh-rsa"),a(i,e.e),a(i,e.n),r.start(),r.update(i.getBytes());var s=r.digest();if("hex"===t.encoding){var u=s.toHex();return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".');return s}},function(e,t,r){var n=r(0);r(35),r(37),r(1);var i="forge.task",a={},o=0;n.debug.set(i,"tasks",a);var s={};n.debug.set(i,"queues",s);var u="ready",l="running",c="blocked",f="sleeping",h="done",p="error",d="stop",g="start",y={ready:{}};y[u][d]=u,y[u][g]=l,y[u].cancel=h,y[u].fail=p,y[l]={},y[l][d]=u,y[l][g]=l,y[l].block=c,y[l].unblock=l,y[l].sleep=f,y[l].wakeup=l,y[l].cancel=h,y[l].fail=p,y[c]={},y[c][d]=c,y[c][g]=c,y[c].block=c,y[c].unblock=c,y[c].sleep=c,y[c].wakeup=c,y[c].cancel=h,y[c].fail=p,y[f]={},y[f][d]=f,y[f][g]=f,y[f].block=f,y[f].unblock=f,y[f].sleep=f,y[f].wakeup=f,y[f].cancel=h,y[f].fail=p,y[h]={},y[h][d]=h,y[h][g]=h,y[h].block=h,y[h].unblock=h,y[h].sleep=h,y[h].wakeup=h,y[h].cancel=h,y[h].fail=p,y[p]={},y[p][d]=p,y[p][g]=p,y[p].block=p,y[p].unblock=p,y[p].sleep=p,y[p].wakeup=p,y[p].cancel=p,y[p].fail=p;var m=function(e){this.id=-1,this.name=e.name||"?",this.parent=e.parent||null,this.run=e.run,this.subtasks=[],this.error=!1,this.state=u,this.blocks=0,this.timeoutId=null,this.swapTime=null,this.userData=null,this.id=o++,a[this.id]=this};m.prototype.debug=function(e){e=e||"",n.log.debug(i,e,"[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",s)},m.prototype.next=function(e,t){"function"==typeof e&&(t=e,e=this.name);var r=new m({run:t,name:e,parent:this});return r.state=l,r.type=this.type,r.successCallback=this.successCallback||null,r.failureCallback=this.failureCallback||null,this.subtasks.push(r),this},m.prototype.parallel=function(e,t){return n.util.isArray(e)&&(t=e,e=this.name),this.next(e,(function(r){var i=r;i.block(t.length);for(var a=function(e,r){n.task.start({type:e,run:function(e){t[r](e)},success:function(e){i.unblock()},failure:function(e){i.unblock()}})},o=0;o<t.length;o++){a(e+"__parallel-"+r.id+"-"+o,o)}}))},m.prototype.stop=function(){this.state=y[this.state][d]},m.prototype.start=function(){this.error=!1,this.state=y[this.state][g],this.state===l&&(this.start=new Date,this.run(this),v(this,0))},m.prototype.block=function(e){e=void 0===e?1:e,this.blocks+=e,this.blocks>0&&(this.state=y[this.state].block)},m.prototype.unblock=function(e){return e=void 0===e?1:e,this.blocks-=e,0===this.blocks&&this.state!==h&&(this.state=l,v(this,0)),this.blocks},m.prototype.sleep=function(e){e=void 0===e?0:e,this.state=y[this.state].sleep;var t=this;this.timeoutId=setTimeout((function(){t.timeoutId=null,t.state=l,v(t,0)}),e)},m.prototype.wait=function(e){e.wait(this)},m.prototype.wakeup=function(){this.state===f&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=l,v(this,0))},m.prototype.cancel=function(){this.state=y[this.state].cancel,this.permitsNeeded=0,null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},m.prototype.fail=function(e){if(this.error=!0,E(this,!0),e)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,v(e,0);else{if(null!==this.parent){for(var t=this.parent;null!==t.parent;)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,t=t.parent;E(t,!0)}this.failureCallback&&this.failureCallback(this)}};var v=function(e,t){var r=t>30||+new Date-e.swapTime>20,n=function(t){if(t++,e.state===l)if(r&&(e.swapTime=+new Date),e.subtasks.length>0){var n=e.subtasks.shift();n.error=e.error,n.swapTime=e.swapTime,n.userData=e.userData,n.run(n),n.error||v(n,t)}else E(e),e.error||null!==e.parent&&(e.parent.error=e.error,e.parent.swapTime=e.swapTime,e.parent.userData=e.userData,v(e.parent,t))};r?setTimeout(n,0):n(t)},E=function(e,t){e.state=h,delete a[e.id],null===e.parent&&(e.type in s?0===s[e.type].length?n.log.error(i,"[%s][%s] task queue empty [%s]",e.id,e.name,e.type):s[e.type][0]!==e?n.log.error(i,"[%s][%s] task not first in queue [%s]",e.id,e.name,e.type):(s[e.type].shift(),0===s[e.type].length?delete s[e.type]:s[e.type][0].start()):n.log.error(i,"[%s][%s] task queue missing [%s]",e.id,e.name,e.type),t||(e.error&&e.failureCallback?e.failureCallback(e):!e.error&&e.successCallback&&e.successCallback(e)))};e.exports=n.task=n.task||{},n.task.start=function(e){var t=new m({run:e.run,name:e.name||"?"});t.type=e.type,t.successCallback=e.success||null,t.failureCallback=e.failure||null,t.type in s?s[e.type].push(t):(s[t.type]=[t],function(e){e.error=!1,e.state=y[e.state][g],setTimeout((function(){e.state===l&&(e.swapTime=+new Date,e.run(e),v(e,0))}),0)}(t))},n.task.cancel=function(e){e in s&&(s[e]=[s[e][0]])},n.task.createCondition=function(){var e={tasks:{},wait:function(t){t.id in e.tasks||(t.block(),e.tasks[t.id]=t)},notify:function(){var t=e.tasks;for(var r in e.tasks={},t)t[r].unblock()}};return e}},function(e,t,r){function n(e){this.mode=a.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t<r;t++){var n=[],i=this.data.charCodeAt(t);i>65536?(n[0]=240|(1835008&i)>>>18,n[1]=128|(258048&i)>>>12,n[2]=128|(4032&i)>>>6,n[3]=128|63&i):i>2048?(n[0]=224|(61440&i)>>>12,n[1]=128|(4032&i)>>>6,n[2]=128|63&i):i>128?(n[0]=192|(1984&i)>>>6,n[1]=128|63&i):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function i(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t<r;t++)e.put(this.parsedData[t],8)}},i.prototype={addData:function(e){var t=new n(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[r][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(this.modules[e+r][t+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=v.getLostPoint(this);(0==r||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r);this.make();for(var i=0;i<this.modules.length;i++)for(var a=1*i,o=0;o<this.modules[i].length;o++){var s=1*o;this.modules[i][o]&&(n.beginFill(0,100),n.moveTo(s,a),n.lineTo(s+1,a),n.lineTo(s+1,a+1),n.lineTo(s,a+1),n.endFill())}return n},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=v.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var r=0;r<e.length;r++){var n=e[t],i=e[r];if(null==this.modules[n][i])for(var a=-2;a<=2;a++)for(var o=-2;o<=2;o++)this.modules[n+a][i+o]=-2==a||2==a||-2==o||2==o||0==a&&0==o}},setupTypeNumber:function(e){for(var t=v.getBCHTypeNumber(this.typeNumber),r=0;r<18;r++){var n=!e&&1==(t>>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!e&&1==(t>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=v.getBCHTypeInfo(r),i=0;i<15;i++){var a=!e&&1==(n>>i&1);i<6?this.modules[i][8]=a:i<8?this.modules[i+1][8]=a:this.modules[this.moduleCount-15+i][8]=a}for(i=0;i<15;i++){a=!e&&1==(n>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=a:i<9?this.modules[8][15-i-1+1]=a:this.modules[8][15-i-1]=a}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,i=7,a=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var s=0;s<2;s++)if(null==this.modules[n][o-s]){var u=!1;a<e.length&&(u=1==(e[a]>>>i&1)),v.getMask(t,n,o-s)&&(u=!u),this.modules[n][o-s]=u,-1==--i&&(a++,i=7)}if((n+=r)<0||this.moduleCount<=n){n-=r,r=-r;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(e,t,r){for(var n=T.getRSBlocks(e,t),a=new S,o=0;o<r.length;o++){var s=r[o];a.put(s.mode,4),a.put(s.getLength(),v.getLengthInBits(s.mode,e)),s.write(a)}var u=0;for(o=0;o<n.length;o++)u+=n[o].dataCount;if(a.getLengthInBits()>8*u)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+8*u+")");for(a.getLengthInBits()+4<=8*u&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=8*u||(a.put(i.PAD0,8),a.getLengthInBits()>=8*u));)a.put(i.PAD1,8);return i.createBytes(a,n)},i.createBytes=function(e,t){for(var r=0,n=0,i=0,a=new Array(t.length),o=new Array(t.length),s=0;s<t.length;s++){var u=t[s].dataCount,l=t[s].totalCount-u;n=Math.max(n,u),i=Math.max(i,l),a[s]=new Array(u);for(var c=0;c<a[s].length;c++)a[s][c]=255&e.buffer[c+r];r+=u;var f=v.getErrorCorrectPolynomial(l),h=new b(a[s],f.getLength()-1).mod(f);o[s]=new Array(f.getLength()-1);for(c=0;c<o[s].length;c++){var p=c+h.getLength()-o[s].length;o[s][c]=p>=0?h.get(p):0}}var d=0;for(c=0;c<t.length;c++)d+=t[c].totalCount;var g=new Array(d),y=0;for(c=0;c<n;c++)for(s=0;s<t.length;s++)c<a[s].length&&(g[y++]=a[s][c]);for(c=0;c<i;c++)for(s=0;s<t.length;s++)c<o[s].length&&(g[y++]=o[s][c]);return g};for(var a={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o=1,s=0,u=3,l=2,c=0,f=1,h=2,p=3,d=4,g=5,y=6,m=7,v={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;v.getBCHDigit(t)-v.getBCHDigit(v.G15)>=0;)t^=v.G15<<v.getBCHDigit(t)-v.getBCHDigit(v.G15);return(e<<10|t)^v.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;v.getBCHDigit(t)-v.getBCHDigit(v.G18)>=0;)t^=v.G18<<v.getBCHDigit(t)-v.getBCHDigit(v.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return v.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case c:return(t+r)%2==0;case f:return t%2==0;case h:return r%3==0;case p:return(t+r)%3==0;case d:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case g:return t*r%2+t*r%3==0;case y:return(t*r%2+t*r%3)%2==0;case m:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new b([1],0),r=0;r<e;r++)t=t.multiply(new b([1,E.gexp(r)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case a.MODE_NUMBER:return 10;case a.MODE_ALPHA_NUM:return 9;case a.MODE_8BIT_BYTE:case a.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case a.MODE_NUMBER:return 12;case a.MODE_ALPHA_NUM:return 11;case a.MODE_8BIT_BYTE:return 16;case a.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case a.MODE_NUMBER:return 14;case a.MODE_ALPHA_NUM:return 13;case a.MODE_8BIT_BYTE:return 16;case a.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),r=0,n=0;n<t;n++)for(var i=0;i<t;i++){for(var a=0,o=e.isDark(n,i),s=-1;s<=1;s++)if(!(n+s<0||t<=n+s))for(var u=-1;u<=1;u++)i+u<0||t<=i+u||0==s&&0==u||o==e.isDark(n+s,i+u)&&a++;a>5&&(r+=3+a-5)}for(n=0;n<t-1;n++)for(i=0;i<t-1;i++){var l=0;e.isDark(n,i)&&l++,e.isDark(n+1,i)&&l++,e.isDark(n,i+1)&&l++,e.isDark(n+1,i+1)&&l++,0!=l&&4!=l||(r+=3)}for(n=0;n<t;n++)for(i=0;i<t-6;i++)e.isDark(n,i)&&!e.isDark(n,i+1)&&e.isDark(n,i+2)&&e.isDark(n,i+3)&&e.isDark(n,i+4)&&!e.isDark(n,i+5)&&e.isDark(n,i+6)&&(r+=40);for(i=0;i<t;i++)for(n=0;n<t-6;n++)e.isDark(n,i)&&!e.isDark(n+1,i)&&e.isDark(n+2,i)&&e.isDark(n+3,i)&&e.isDark(n+4,i)&&!e.isDark(n+5,i)&&e.isDark(n+6,i)&&(r+=40);var c=0;for(i=0;i<t;i++)for(n=0;n<t;n++)e.isDark(n,i)&&c++;return r+=10*(Math.abs(100*c/t/t-50)/5)}},E={glog:function(e){if(e<1)throw new Error("glog("+e+")");return E.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return E.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},C=0;C<8;C++)E.EXP_TABLE[C]=1<<C;for(C=8;C<256;C++)E.EXP_TABLE[C]=E.EXP_TABLE[C-4]^E.EXP_TABLE[C-5]^E.EXP_TABLE[C-6]^E.EXP_TABLE[C-8];for(C=0;C<255;C++)E.LOG_TABLE[E.EXP_TABLE[C]]=C;function b(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var r=0;r<e.length&&0==e[r];)r++;this.num=new Array(e.length-r+t);for(var n=0;n<e.length-r;n++)this.num[n]=e[n+r]}function T(e,t){this.totalCount=e,this.dataCount=t}function S(){this.buffer=[],this.length=0}b.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),r=0;r<this.getLength();r++)for(var n=0;n<e.getLength();n++)t[r+n]^=E.gexp(E.glog(this.get(r))+E.glog(e.get(n)));return new b(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=E.glog(this.get(0))-E.glog(e.get(0)),r=new Array(this.getLength()),n=0;n<this.getLength();n++)r[n]=this.get(n);for(n=0;n<e.getLength();n++)r[n]^=E.gexp(E.glog(e.get(n))+t);return new b(r,0).mod(e)}},T.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],T.getRSBlocks=function(e,t){var r=T.getRsBlockTable(e,t);if(null==r)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var n=r.length/3,i=[],a=0;a<n;a++)for(var o=r[3*a+0],s=r[3*a+1],u=r[3*a+2],l=0;l<o;l++)i.push(new T(s,u));return i},T.getRsBlockTable=function(e,t){switch(t){case o:return T.RS_BLOCK_TABLE[4*(e-1)+0];case s:return T.RS_BLOCK_TABLE[4*(e-1)+1];case u:return T.RS_BLOCK_TABLE[4*(e-1)+2];case l:return T.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},S.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var r=0;r<t;r++)this.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var A=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function _(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M"},"string"==typeof e&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if("string"!=typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0&&this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var r=this.options.content,n=function(e,t){for(var r=function(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}(e),n=1,i=0,a=0,o=A.length;a<=o;a++){var s=A[a];if(!s)throw new Error("Content too long: expected "+i+" but got "+r);switch(t){case"L":i=s[0];break;case"M":i=s[1];break;case"Q":i=s[2];break;case"H":i=s[3];break;default:throw new Error("Unknwon error correction level: "+t)}if(r<=i)break;n++}if(n>A.length)throw new Error("Content too long");return n}(r,this.options.ecl),a=function(e){switch(e){case"L":return o;case"M":return s;case"Q":return u;case"H":return l;default:throw new Error("Unknwon error correction level: "+e)}}(this.options.ecl);this.qrcode=new i(n,a),this.qrcode.addData(r),this.qrcode.make()}_.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;void 0===e&&(e={container:t.container||"svg"});for(var n=void 0===t.pretty||!!t.pretty,i=n?" ":"",a=n?"\r\n":"",o=t.width,s=t.height,u=r.length,l=o/(u+2*t.padding),c=s/(u+2*t.padding),f=void 0!==t.join&&!!t.join,h=void 0!==t.swap&&!!t.swap,p=void 0===t.xmlDeclaration||!!t.xmlDeclaration,d=void 0!==t.predefined&&!!t.predefined,g=d?i+'<defs><path id="qrmodule" d="M0 0 h'+c+" v"+l+' H0 z" style="fill:'+t.color+';shape-rendering:crispEdges;" /></defs>'+a:"",y=i+'<rect x="0" y="0" width="'+o+'" height="'+s+'" style="fill:'+t.background+';shape-rendering:crispEdges;"/>'+a,m="",v="",E=0;E<u;E++)for(var C=0;C<u;C++){if(r[C][E]){var b=C*l+t.padding*l,T=E*c+t.padding*c;if(h){var S=b;b=T,T=S}if(f){var A=l+b,_=c+T;b=Number.isInteger(b)?Number(b):b.toFixed(2),T=Number.isInteger(T)?Number(T):T.toFixed(2),A=Number.isInteger(A)?Number(A):A.toFixed(2),v+="M"+b+","+T+" V"+(_=Number.isInteger(_)?Number(_):_.toFixed(2))+" H"+A+" V"+T+" H"+b+" Z "}else m+=d?i+'<use x="'+b.toString()+'" y="'+T.toString()+'" href="#qrmodule" />'+a:i+'<rect x="'+b.toString()+'" y="'+T.toString()+'" width="'+l+'" height="'+c+'" style="fill:'+t.color+';shape-rendering:crispEdges;"/>'+a}}f&&(m=i+'<path x="0" y="0" style="fill:'+t.color+';shape-rendering:crispEdges;" d="'+v+'" />');var I="";switch(e.container){case"svg":p&&(I+='<?xml version="1.0" standalone="yes"?>'+a),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+s+'">'+a,I+=g+y+m,I+="</svg>";break;case"svg-viewbox":p&&(I+='<?xml version="1.0" standalone="yes"?>'+a),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+s+'">'+a,I+=g+y+m,I+="</svg>";break;case"g":I+='<g width="'+o+'" height="'+s+'">'+a,I+=g+y+m,I+="</g>";break;default:I+=(g+y+m).replace(/^\s+/,"")}return I},_.prototype.save=function(e,t){var n=this.svg();"function"!=typeof t&&(t=function(e,t){});try{r(!function(){var e=new Error("Cannot find module 'fs'");throw e.code="MODULE_NOT_FOUND",e}()).writeFile(e,n,t)}catch(e){t(e)}},e.exports=_},function(e,t,r){}]);
|
||
//# sourceMappingURL=main.js.map
|