var Dt={exports:{}};/*! For license information please see jsencrypt.min.js.LICENSE.txt */(function(Z,H){(function(pt,z){Z.exports=z()})(window,function(){return(()=>{var pt=[,(G,M,C)=>{function O(r){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(r)}function At(r,t){return r&t}function W(r,t){return r|t}function dt(r,t){return r^t}function vt(r,t){return r&~t}function Bt(r){if(r==0)return-1;var t=0;return(65535&r)==0&&(r>>=16,t+=16),(255&r)==0&&(r>>=8,t+=8),(15&r)==0&&(r>>=4,t+=4),(3&r)==0&&(r>>=2,t+=2),(1&r)==0&&++t,t}function Rt(r){for(var t=0;r!=0;)r&=r-1,++t;return t}C.d(M,{default:()=>Lt});var L,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function X(r){var t,e,i="";for(t=0;t+3<=r.length;t+=3)e=parseInt(r.substring(t,t+3),16),i+=K.charAt(e>>6)+K.charAt(63&e);for(t+1==r.length?(e=parseInt(r.substring(t,t+1),16),i+=K.charAt(e<<2)):t+2==r.length&&(e=parseInt(r.substring(t,t+2),16),i+=K.charAt(e>>2)+K.charAt((3&e)<<4));(3&i.length)>0;)i+="=";return i}function mt(r){var t,e="",i=0,n=0;for(t=0;t>2),n=3&s,i=1):i==1?(e+=O(n<<2|s>>4),n=15&s,i=2):i==2?(e+=O(n),e+=O(s>>2),n=3&s,i=3):(e+=O(n<<2|s>>4),e+=O(15&s),i=0))}return i==1&&(e+=O(n<<2)),e}var q,ot={decode:function(r){var t;if(q===void 0){var e=`= \f \r \xA0\u2028\u2029`;for(q=Object.create(null),t=0;t<64;++t)q["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(q["-"]=62,q._=63,t=0;t=4?(i[i.length]=n>>16,i[i.length]=n>>8&255,i[i.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=n>>10;break;case 3:i[i.length]=n>>16,i[i.length]=n>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(r){var t=ot.re.exec(r);if(t)if(t[1])r=t[1];else{if(!t[2])throw new Error("RegExp out of sync");r=t[2]}return ot.decode(r)}},F=1e13,Y=function(){function r(t){this.buf=[+t||0]}return r.prototype.mulAdd=function(t,e){var i,n,s=this.buf,o=s.length;for(i=0;i0&&(s[i]=e)},r.prototype.sub=function(t){var e,i,n=this.buf,s=n.length;for(e=0;e=0;--n)i+=(F+e[n]).toString().substring(1);return i},r.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*F+t[i];return e},r.prototype.simplify=function(){var t=this.buf;return t.length==1?t[0]:this},r}(),Ot=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,Vt=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function U(r,t){return r.length>t&&(r=r.substring(0,t)+"\u2026"),r}var I,ht=function(){function r(t,e){this.hexDigits="0123456789ABCDEF",t instanceof r?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=e)}return r.prototype.get=function(t){if(t===void 0&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return typeof this.enc=="string"?this.enc.charCodeAt(t):this.enc[t]},r.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},r.prototype.hexDump=function(t,e,i){for(var n="",s=t;s176)return!1}return!0},r.prototype.parseStringISO=function(t,e){for(var i="",n=t;n191&&s<224?String.fromCharCode((31&s)<<6|63&this.get(n++)):String.fromCharCode((15&s)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return i},r.prototype.parseStringBMP=function(t,e){for(var i,n,s="",o=t;o127,o=s?255:0,h="";n==o&&++t4){for(h=n,i<<=3;(128&(+h^o))==0;)h=+h<<1,--i;h="("+i+` bit) `}s&&(n-=256);for(var a=new Y(n),c=t+1;c=c;--f)o+=a>>f&1?"1":"0";if(o.length>i)return s+U(o,i)}return s+o},r.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return U(this.parseStringISO(t,e),i);var n=e-t,s="("+n+` byte) `;n>(i/=2)&&(e=t+i);for(var o=t;oi&&(s+="\u2026"),s},r.prototype.parseOID=function(t,e,i){for(var n="",s=new Y,o=0,h=t;hi)return U(n,i);s=new Y,o=0}}return o>0&&(n+=".incomplete"),n},r}(),It=function(){function r(t,e,i,n,s){if(!(n instanceof yt))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=n,this.sub=s}return r.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},r.prototype.content=function(t){if(this.tag===void 0)return null;t===void 0&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return this.stream.get(e)===0?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return U(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return U(this.stream.parseStringISO(e,e+i),t);case 30:return U(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,this.tag.tagNumber==23)}return null},r.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},r.prototype.toPrettyString=function(t){t===void 0&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||this.tag.tagNumber!=3&&this.tag.tagNumber!=4||this.sub===null||(e+=" (encapsulates)"),e+=` `,this.sub!==null){t+=" ";for(var i=0,n=this.sub.length;i6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(i===0)return null;e=0;for(var n=0;n>6,this.tagConstructed=(32&e)!=0,this.tagNumber=31&e,this.tagNumber==31){var i=new Y;do e=t.get(),i.mulAdd(128,127&e);while(128&e);this.tagNumber=i.simplify()}}return r.prototype.isUniversal=function(){return this.tagClass===0},r.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},r}(),w=[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,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Nt=(1<<26)/w[w.length-1],p=function(){function r(t,e,i){t!=null&&(typeof t=="number"?this.fromNumber(t,e,i):e==null&&typeof t!="string"?this.fromString(t,256):this.fromString(t,e))}return r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(t==16)e=4;else if(t==8)e=3;else if(t==2)e=1;else if(t==32)e=5;else{if(t!=4)return this.toRadix(t);e=2}var i,n=(1<0)for(a>a)>0&&(s=!0,o=O(i));h>=0;)a>(a+=this.DB-e)):(i=this[h]>>(a-=e)&n,a<=0&&(a+=this.DB,--h)),i>0&&(s=!0),s&&(o+=O(i));return s?o:"0"},r.prototype.negate=function(){var t=d();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(e!=0)return e;var i=this.t;if((e=i-t.t)!=0)return this.s<0?-e:e;for(;--i>=0;)if((e=this[i]-t[i])!=0)return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+tt(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=d();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new bt(e):new Tt(e),this.exp(t,i)},r.prototype.clone=function(){var t=d();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},r.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,n=this.DB-t*this.DB%8,s=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[s++]=i|this.s<=0;)n<8?(i=(this[t]&(1<>(n+=this.DB-8)):(i=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),(128&i)!=0&&(i|=-256),s==0&&(128&this.s)!=(128&i)&&++s,(s>0||i!=this.s)&&(e[s++]=i);return e},r.prototype.equals=function(t){return this.compareTo(t)==0},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=d();return this.bitwiseTo(t,At,e),e},r.prototype.or=function(t){var e=d();return this.bitwiseTo(t,W,e),e},r.prototype.xor=function(t){var e=d();return this.bitwiseTo(t,dt,e),e},r.prototype.andNot=function(t){var e=d();return this.bitwiseTo(t,vt,e),e},r.prototype.not=function(){for(var t=d(),e=0;e=this.t?this.s!=0:(this[e]&1<1){var v=d();for(n.sqrTo(h[1],v);a<=f;)h[a]=d(),n.mulTo(v,h[a-2],h[a]),a+=2}var g,b,y=t.t-1,m=!0,T=d();for(s=tt(t[y])-1;y>=0;){for(s>=c?g=t[y]>>s-c&f:(g=(t[y]&(1<0&&(g|=t[y-1]>>this.DB+s-c)),a=i;(1&g)==0;)g>>=1,--a;if((s-=a)<0&&(s+=this.DB,--y),m)h[g].copyTo(o),m=!1;else{for(;a>1;)n.sqrTo(o,T),n.sqrTo(T,o),a-=2;a>0?n.sqrTo(o,T):(b=o,o=T,T=b),n.mulTo(T,h[g],o)}for(;y>=0&&(t[y]&1<=0?(i.subTo(n,i),e&&s.subTo(h,s),o.subTo(a,o)):(n.subTo(i,n),e&&h.subTo(s,h),a.subTo(o,a))}return n.compareTo(r.ONE)!=0?r.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},r.prototype.pow=function(t){return this.exp(t,new Pt)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var n=e;e=i,i=n}var s=e.getLowestSetBit(),o=i.getLowestSetBit();if(o<0)return e;for(s0&&(e.rShiftTo(o,e),i.rShiftTo(o,i));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return o>0&&i.lShiftTo(o,i),i},r.prototype.isProbablePrime=function(t){var e,i=this.abs();if(i.t==1&&i[0]<=w[w.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var i;if(e==16)i=4;else if(e==8)i=3;else if(e==256)i=8;else if(e==2)i=1;else if(e==32)i=5;else{if(e!=4)return void this.fromRadix(t,e);i=2}this.t=0,this.s=0;for(var n=t.length,s=!1,o=0;--n>=0;){var h=i==8?255&+t[n]:Et(t,n);h<0?t.charAt(n)=="-"&&(s=!0):(s=!1,o==0?this[this.t++]=h:o+i>this.DB?(this[this.t-1]|=(h&(1<>this.DB-o):this[this.t-1]|=h<=this.DB&&(o-=this.DB))}i==8&&(128&+t[0])!=0&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var i=t;i=0;--a)e[a+o+1]=this[a]>>n|h,h=(this[a]&s)<=0;--a)e[a]=0;e[o]=h,e.t=this.t+o+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var n=t%this.DB,s=this.DB-n,o=(1<>n;for(var h=i+1;h>n;n>0&&(e[this.t-i-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;i>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[i++]=this.DV+n:n>0&&(e[i++]=n),e.t=i,e.clamp()},r.prototype.multiplyTo=function(t,e){var i=this.abs(),n=t.abs(),s=i.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s=0;)t[i]=0;for(i=0;i=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,i){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t0?(n.lShiftTo(c,o),s.lShiftTo(c,i)):(n.copyTo(o),s.copyTo(i));var f=o.t,v=o[f-1];if(v!=0){var g=v*(1<1?o[f-2]>>this.F2:0),b=this.FV/g,y=(1<=0&&(i[i.t++]=1,i.subTo(D,i)),r.ONE.dlShiftTo(f,D),D.subTo(o,o);o.t=0;){var x=i[--T]==v?this.DM:Math.floor(i[T]*b+(i[T-1]+m)*y);if((i[T]+=o.am(0,x,i,V,0,f))0&&i.rShiftTo(c,i),h<0&&r.ZERO.subTo(i,i)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if((1&t)==0)return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return(this.t>0?1&this[0]:this.s)==0},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var i=d(),n=d(),s=e.convert(this),o=tt(t)-1;for(s.copyTo(i);--o>=0;)if(e.sqrTo(i,n),(t&1<0)e.mulTo(n,s,i);else{var h=i;i=n,n=h}return e.revert(i)},r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(t==null&&(t=10),this.signum()==0||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),n=N(i),s=d(),o=d(),h="";for(this.divRemTo(n,s,o);s.signum()>0;)h=(i+o.intValue()).toString(t).substr(1)+h,s.divRemTo(n,s,o);return o.intValue().toString(t)+h},r.prototype.fromRadix=function(t,e){this.fromInt(0),e==null&&(e=10);for(var i=this.chunkSize(e),n=Math.pow(e,i),s=!1,o=0,h=0,a=0;a=i&&(this.dMultiply(n),this.dAddOffset(h,0),o=0,h=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(h,0)),s&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,i){if(typeof e=="number")if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),W,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var n=[],s=7&t;n.length=1+(t>>3),e.nextBytes(n),s>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;i>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[i++]=n:n<-1&&(e[i++]=this.DV+n),e.t=i,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(t!=0){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,i){var n=Math.min(this.t+t.t,e);for(i.s=0,i.t=n;n>0;)i[--n]=0;for(var s=i.t-this.t;n=0;)i[n]=0;for(n=Math.max(e-this.t,0);n0)if(e==0)i=this[0]%t;else for(var n=this.t-1;n>=0;--n)i=(e*i+this[n])%t;return i},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),i=e.getLowestSetBit();if(i<=0)return!1;var n=e.shiftRight(i);(t=t+1>>1)>w.length&&(t=w.length);for(var s=d(),o=0;o0&&(i.rShiftTo(h,i),n.rShiftTo(h,n));var a=function(){(o=i.getLowestSetBit())>0&&i.rShiftTo(o,i),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),i.compareTo(n)>=0?(i.subTo(n,i),i.rShiftTo(1,i)):(n.subTo(i,n),n.rShiftTo(1,n)),i.signum()>0?setTimeout(a,0):(h>0&&n.lShiftTo(h,n),setTimeout(function(){e(n)},0))};setTimeout(a,10)}},r.prototype.fromNumberAsync=function(t,e,i,n){if(typeof e=="number")if(t<2)this.fromInt(1);else{this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),W,this),this.isEven()&&this.dAddOffset(1,0);var s=this,o=function(){s.dAddOffset(2,0),s.bitLength()>t&&s.subTo(r.ONE.shiftLeft(t-1),s),s.isProbablePrime(e)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var h=[],a=7&t;h.length=1+(t>>3),e.nextBytes(h),a>0?h[0]&=(1<=0?t.mod(this.m):t},r.prototype.revert=function(t){return t},r.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}(),Tt=function(){function r(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},r.prototype.revert=function(t){var e=d();return t.copyTo(e),this.reduce(e),e},r.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}(),Mt=function(){function r(t){this.m=t,this.r2=d(),this.q3=d(),p.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return r.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=d();return t.copyTo(e),this.reduce(e),e},r.prototype.revert=function(t){return t},r.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},r.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},r.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r}();function d(){return new p(null)}function S(r,t){return new p(r,t)}var St=typeof navigator!="undefined";St&&navigator.appName=="Microsoft Internet Explorer"?(p.prototype.am=function(r,t,e,i,n,s){for(var o=32767&t,h=t>>15;--s>=0;){var a=32767&this[r],c=this[r++]>>15,f=h*a+c*o;n=((a=o*a+((32767&f)<<15)+e[i]+(1073741823&n))>>>30)+(f>>>15)+h*c+(n>>>30),e[i++]=1073741823&a}return n},I=30):St&&navigator.appName!="Netscape"?(p.prototype.am=function(r,t,e,i,n,s){for(;--s>=0;){var o=t*this[r++]+e[i]+n;n=Math.floor(o/67108864),e[i++]=67108863&o}return n},I=26):(p.prototype.am=function(r,t,e,i,n,s){for(var o=16383&t,h=t>>14;--s>=0;){var a=16383&this[r],c=this[r++]>>14,f=h*a+c*o;n=((a=o*a+((16383&f)<<14)+e[i]+n)>>28)+(f>>14)+h*c,e[i++]=268435455&a}return n},I=28),p.prototype.DB=I,p.prototype.DM=(1<>>16)!=0&&(r=t,e+=16),(t=r>>8)!=0&&(r=t,e+=8),(t=r>>4)!=0&&(r=t,e+=4),(t=r>>2)!=0&&(r=t,e+=2),(t=r>>1)!=0&&(r=t,e+=1),e}p.ZERO=N(0),p.ONE=N(1);var et,B,qt=function(){function r(){this.i=0,this.j=0,this.S=[]}return r.prototype.init=function(t){var e,i,n;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[i],this.S[i]=n;this.i=0,this.j=0},r.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},r}(),P=null;if(P==null){P=[],B=0;var it=void 0;if(window.crypto&&window.crypto.getRandomValues){var at=new Uint32Array(256);for(window.crypto.getRandomValues(at),it=0;it=256||B>=256)window.removeEventListener?window.removeEventListener("mousemove",rt,!1):window.detachEvent&&window.detachEvent("onmousemove",rt);else try{var t=r.x+r.y;P[B++]=255&t,ut+=1}catch{}};window.addEventListener?window.addEventListener("mousemove",rt,!1):window.attachEvent&&window.attachEvent("onmousemove",rt)}function jt(){if(et==null){for(et=new qt;B<256;){var r=Math.floor(65536*Math.random());P[B++]=255&r}for(et.init(P),B=0;B0&&e.length>0?(this.n=S(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},r.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=function(a,c){if(c=0&&c>0;){var g=a.charCodeAt(v--);g<128?f[--c]=g:g>127&&g<2048?(f[--c]=63&g|128,f[--c]=g>>6|192):(f[--c]=63&g|128,f[--c]=g>>6&63|128,f[--c]=g>>12|224)}f[--c]=0;for(var b=new ct,y=[];c>2;){for(y[0]=0;y[0]==0;)b.nextBytes(y);f[--c]=y[0]}return f[--c]=2,f[--c]=0,new p(f)}(t,e);if(i==null)return null;var n=this.doPublic(i);if(n==null)return null;for(var s=n.toString(16),o=s.length,h=0;h<2*e-o;h++)s="0"+s;return s},r.prototype.setPrivate=function(t,e,i){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=S(t,16),this.e=parseInt(e,16),this.d=S(i,16)):console.error("Invalid RSA private key")},r.prototype.setPrivateEx=function(t,e,i,n,s,o,h,a){t!=null&&e!=null&&t.length>0&&e.length>0?(this.n=S(t,16),this.e=parseInt(e,16),this.d=S(i,16),this.p=S(n,16),this.q=S(s,16),this.dmp1=S(o,16),this.dmq1=S(h,16),this.coeff=S(a,16)):console.error("Invalid RSA private key")},r.prototype.generate=function(t,e){var i=new ct,n=t>>1;this.e=parseInt(e,16);for(var s=new p(e,16);;){for(;this.p=new p(t-n,1,i),this.p.subtract(p.ONE).gcd(s).compareTo(p.ONE)!=0||!this.p.isProbablePrime(10););for(;this.q=new p(n,1,i),this.q.subtract(p.ONE).gcd(s).compareTo(p.ONE)!=0||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var h=this.p.subtract(p.ONE),a=this.q.subtract(p.ONE),c=h.multiply(a);if(c.gcd(s).compareTo(p.ONE)==0){this.n=this.p.multiply(this.q),this.d=s.modInverse(c),this.dmp1=this.d.mod(h),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},r.prototype.decrypt=function(t){var e=S(t,16),i=this.doPrivate(e);return i==null?null:function(n,s){for(var o=n.toByteArray(),h=0;h=o.length)return null;for(var a="";++h191&&c<224?(a+=String.fromCharCode((31&c)<<6|63&o[h+1]),++h):(a+=String.fromCharCode((15&c)<<12|(63&o[h+1])<<6|63&o[h+2]),h+=2)}return a}(i,this.n.bitLength()+7>>3)},r.prototype.generateAsync=function(t,e,i){var n=new ct,s=t>>1;this.e=parseInt(e,16);var o=new p(e,16),h=this,a=function(){var c=function(){if(h.p.compareTo(h.q)<=0){var g=h.p;h.p=h.q,h.q=g}var b=h.p.subtract(p.ONE),y=h.q.subtract(p.ONE),m=b.multiply(y);m.gcd(o).compareTo(p.ONE)==0?(h.n=h.p.multiply(h.q),h.d=o.modInverse(m),h.dmp1=h.d.mod(b),h.dmq1=h.d.mod(y),h.coeff=h.q.modInverse(h.p),setTimeout(function(){i()},0)):setTimeout(a,0)},f=function(){h.q=d(),h.q.fromNumberAsync(s,1,n,function(){h.q.subtract(p.ONE).gcda(o,function(g){g.compareTo(p.ONE)==0&&h.q.isProbablePrime(10)?setTimeout(c,0):setTimeout(f,0)})})},v=function(){h.p=d(),h.p.fromNumberAsync(t-s,1,n,function(){h.p.subtract(p.ONE).gcda(o,function(g){g.compareTo(p.ONE)==0&&h.p.isProbablePrime(10)?setTimeout(f,0):setTimeout(v,0)})})};setTimeout(v,0)};setTimeout(a,0)},r.prototype.sign=function(t,e,i){var n=function(h,a){if(a15)throw"ASN.1 length too long to represent by 8x: n = "+r.toString(16);return(128+e).toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},u.asn1.DERAbstractString=function(r){u.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(typeof r=="string"?this.setString(r):r.str!==void 0?this.setString(r.str):r.hex!==void 0&&this.setStringHex(r.hex))},E.lang.extend(u.asn1.DERAbstractString,u.asn1.ASN1Object),u.asn1.DERAbstractTime=function(r){u.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,i){var n=this.zeroPadding,s=this.localDateToUTC(t),o=String(s.getFullYear());e=="utc"&&(o=o.substr(2,2));var h=o+n(String(s.getMonth()+1),2)+n(String(s.getDate()),2)+n(String(s.getHours()),2)+n(String(s.getMinutes()),2)+n(String(s.getSeconds()),2);if(i===!0){var a=s.getMilliseconds();if(a!=0){var c=n(String(a),3);h=h+"."+(c=c.replace(/[0]+$/,""))}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,i,n,s,o){var h=new Date(Date.UTC(t,e-1,i,n,s,o,0));this.setByDate(h)},this.getFreshValueHex=function(){return this.hV}},E.lang.extend(u.asn1.DERAbstractTime,u.asn1.ASN1Object),u.asn1.DERAbstractStructured=function(r){u.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,r!==void 0&&r.array!==void 0&&(this.asn1Array=r.array)},E.lang.extend(u.asn1.DERAbstractStructured,u.asn1.ASN1Object),u.asn1.DERBoolean=function(){u.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},E.lang.extend(u.asn1.DERBoolean,u.asn1.ASN1Object),u.asn1.DERInteger=function(r){u.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new p(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},r!==void 0&&(r.bigint!==void 0?this.setByBigInteger(r.bigint):r.int!==void 0?this.setByInteger(r.int):typeof r=="number"?this.setByInteger(r):r.hex!==void 0&&this.setValueHex(r.hex))},E.lang.extend(u.asn1.DERInteger,u.asn1.ASN1Object),u.asn1.DERBitString=function(r){if(r!==void 0&&r.obj!==void 0){var t=u.asn1.ASN1Util.newObject(r.obj);r.hex="00"+t.getEncodedHex()}u.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,i){if(e<0||7=2?(D[D.length]=x,x=0,_=0):x<<=4}}if(_)throw new Error("Hex encoding incomplete: 4 bits missing");return D}(e):ot.unarmor(e),o=It.decode(s);if(o.sub.length===3&&(o=o.sub[2].sub[0]),o.sub.length===9){i=o.sub[1].getHexStringValue(),this.n=S(i,16),n=o.sub[2].getHexStringValue(),this.e=parseInt(n,16);var h=o.sub[3].getHexStringValue();this.d=S(h,16);var a=o.sub[4].getHexStringValue();this.p=S(a,16);var c=o.sub[5].getHexStringValue();this.q=S(c,16);var f=o.sub[6].getHexStringValue();this.dmp1=S(f,16);var v=o.sub[7].getHexStringValue();this.dmq1=S(v,16);var g=o.sub[8].getHexStringValue();this.coeff=S(g,16)}else{if(o.sub.length!==2)return!1;var b=o.sub[1].sub[0];i=b.sub[0].getHexStringValue(),this.n=S(i,16),n=b.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch{return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new u.asn1.DERInteger({int:0}),new u.asn1.DERInteger({bigint:this.n}),new u.asn1.DERInteger({int:this.e}),new u.asn1.DERInteger({bigint:this.d}),new u.asn1.DERInteger({bigint:this.p}),new u.asn1.DERInteger({bigint:this.q}),new u.asn1.DERInteger({bigint:this.dmp1}),new u.asn1.DERInteger({bigint:this.dmq1}),new u.asn1.DERInteger({bigint:this.coeff})]};return new u.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return X(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new u.asn1.DERSequence({array:[new u.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new u.asn1.DERNull]}),i=new u.asn1.DERSequence({array:[new u.asn1.DERInteger({bigint:this.n}),new u.asn1.DERInteger({int:this.e})]}),n=new u.asn1.DERBitString({hex:"00"+i.getEncodedHex()});return new u.asn1.DERSequence({array:[e,n]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return X(this.getPublicBaseKey())},t.wordwrap=function(e,i){if(!e)return e;var n="(.{1,"+(i=i||64)+`})( +|$ ?)|(.{1,`+i+"})";return e.match(RegExp(n,"g")).join(` `)},t.prototype.getPrivateKey=function(){var e=`-----BEGIN RSA PRIVATE KEY----- `;return(e+=t.wordwrap(this.getPrivateBaseKeyB64())+` `)+"-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e=`-----BEGIN PUBLIC KEY----- `;return(e+=t.wordwrap(this.getPublicBaseKeyB64())+` `)+"-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(Ht);const Lt=function(){function r(t){t===void 0&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return r.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new wt(t)},r.prototype.setPrivateKey=function(t){this.setKey(t)},r.prototype.setPublicKey=function(t){this.setKey(t)},r.prototype.decrypt=function(t){try{return this.getKey().decrypt(mt(t))}catch{return!1}},r.prototype.encrypt=function(t){try{return X(this.getKey().encrypt(t))}catch{return!1}},r.prototype.sign=function(t,e,i){try{return X(this.getKey().sign(t,e,i))}catch{return!1}},r.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,mt(e),i)}catch{return!1}},r.prototype.getKey=function(t){if(!this.key){if(this.key=new wt,t&&{}.toString.call(t)==="[object Function]")return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},r.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},r.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},r.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},r.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},r.version="3.2.1",r}()}],z={d:(G,M)=>{for(var C in M)z.o(M,C)&&!z.o(G,C)&&Object.defineProperty(G,C,{enumerable:!0,get:M[C]})},o:(G,M)=>Object.prototype.hasOwnProperty.call(G,M)},gt={};return pt[1](0,gt,z),gt.default})()})})(Dt);var xt=Dt.exports;const Ft=`MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==`,Ut=`MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY 7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3 UP8iWi1Qw0Y=`;function kt(Z){const H=new xt;return H.setPublicKey(Ft),H.encrypt(Z)}function _t(Z){const H=new xt;return H.setPrivateKey(Ut),H.decrypt(Z)}export{_t as d,kt as e};