mirror of
https://github.com/logos-co/open-law.git
synced 2025-02-20 18:48:07 +00:00
2 lines
2.5 MiB
2 lines
2.5 MiB
/*! For license information please see main.js.LICENSE.txt */
|
||
(()=>{var e={3877:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(8677).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,i){for(var o=0,s=0,a=Math.min(e.length,n),l=t;l<a;l++){var u=e.charCodeAt(l)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s<i,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),n=0!==o||s!==this.length-1?d[6-l.length]+l+n:l+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=p[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(c).toString(e);n=(h=h.idivn(c)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===o?(n<e.length&&(e[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===o?(n>=0&&(e[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},b.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},b.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<n;this.words[t]=l|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=n;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,s=e.length+n;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(l)):(n.isub(t),a.isub(i),l.isub(s))}return{a,b:l,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(_,A),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,A),i(M,A),i(k,A),k.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}l=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},3286:(e,t,n)=>{"use strict";n.d(t,{lE:()=>u,zo:()=>c,xs:()=>y,E1:()=>g,p3:()=>v,Ou:()=>w,$P:()=>b,$m:()=>A,Dv:()=>m,_t:()=>l,Zq:()=>s,A7:()=>f,gV:()=>E,N:()=>_,G1:()=>h,Bu:()=>d});const r=new(n(711).Yd)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function s(e){return f(e)&&!(e.length%2)||l(e)}function a(e){return"number"==typeof e&&e==e&&e%1==0}function l(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!a(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const n=e[t];if(!a(n)||n<0||n>=256)return!1}return!0}function u(e,t){if(t||(t={}),"number"==typeof e){r.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),f(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":r.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;e<n.length;e+=2)i.push(parseInt(n.substring(e,e+2),16));return o(new Uint8Array(i))}return l(e)?o(new Uint8Array(e)):r.throwArgumentError("invalid arrayify value","value",e)}function c(e){const t=e.map((e=>u(e))),n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);return t.reduce(((e,t)=>(r.set(t,e),e+t.length)),0),o(r)}function h(e){let t=u(e);if(0===t.length)return t;let n=0;for(;n<t.length&&0===t[n];)n++;return n&&(t=t.slice(n)),t}function d(e,t){(e=u(e)).length>t&&r.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(t);return n.set(e,t-e.length),o(n)}function f(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const p="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){r.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=p[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(f(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":r.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){let t="0x";for(let n=0;n<e.length;n++){let r=e[n];t+=p[(240&r)>>4]+p[15&r]}return t}return r.throwArgumentError("invalid hexlify value","value",e)}function g(e){if("string"!=typeof e)e=m(e);else if(!f(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,n){return"string"!=typeof e?e=m(e):(!f(e)||e.length%2)&&r.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function y(e){let t="0x";return e.forEach((e=>{t+=m(e).substring(2)})),t}function b(e){const t=w(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!=typeof e&&(e=m(e)),f(e)||r.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function A(e,t){for("string"!=typeof e?e=m(e):f(e)||r.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&r.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function _(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(e)){let n=u(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=m(n.slice(0,32)),t.s=m(n.slice(32,64))):65===n.length?(t.r=m(n.slice(0,32)),t.s=m(n.slice(32,64)),t.v=n[64]):r.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:r.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=m(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const n=d(u(t._vs),32);t._vs=m(n);const i=n[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&r.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),n[0]&=127;const o=m(n);null==t.s?t.s=o:t.s!==o&&r.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?r.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const n=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==n&&r.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&f(t.r)?t.r=A(t.r,32):r.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&f(t.s)?t.s=A(t.s,32):r.throwArgumentError("signature missing or invalid s","signature",e);const n=u(t.s);n[0]>=128&&r.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(n[0]|=128);const i=m(n);t._vs&&(f(t._vs)||r.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&r.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function E(e){return m(c([(e=_(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},711:(e,t,n)=>{"use strict";n.d(t,{jK:()=>c,Yd:()=>d});let r=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=o.default,a=null;const l=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var u,c;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(u||(u={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(c||(c={}));const h="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();null==o[n]&&this.throwArgumentError("invalid log level name","logLevel",e),s>o[n]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,n){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),n||(n={});const r=[];Object.keys(n).forEach((e=>{const t=n[e];try{if(t instanceof Uint8Array){let n="";for(let e=0;e<t.length;e++)n+=h[t[e]>>4],n+=h[15&t[e]];r.push(e+"=Uint8Array(0x"+n+")")}else r.push(e+"="+JSON.stringify(t))}catch(t){r.push(e+"="+JSON.stringify(n[e].toString()))}})),r.push(`code=${t}`),r.push(`version=${this.version}`);const o=e;let s="";switch(t){case c.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=t,Object.keys(n).forEach((function(e){a[e]=n[e]})),a}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",e<t&&this.throwError("missing argument"+n,d.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+n,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new d("logger/5.7.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,r=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?s=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=u},2500:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(2808).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,i){for(var o=0,s=0,a=Math.min(e.length,n),l=t;l<a;l++){var u=e.charCodeAt(l)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s<i,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),n=0!==o||s!==this.length-1?d[6-l.length]+l+n:l+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=p[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(c).toString(e);n=(h=h.idivn(c)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===o?(n<e.length&&(e[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===o?(n>=0&&(e[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},b.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},b.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<n;this.words[t]=l|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=n;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,s=e.length+n;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(l)):(n.isub(t),a.isub(i),l.isub(s))}return{a,b:l,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(_,A),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,A),i(M,A),i(k,A),k.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}l=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},4242:(e,t,n)=>{"use strict";n.d(t,{Uj:()=>o,te:()=>l,Uw:()=>s,U$:()=>d,uu:()=>f,Y0:()=>c,XL:()=>m,ZN:()=>p});var r=n(3286);const i=new(n(711).Yd)("strings/5.7.0");var o,s;function a(e,t,n,r,i){if(e===s.BAD_PREFIX||e===s.UNEXPECTED_CONTINUE){let e=0;for(let r=t+1;r<n.length&&n[r]>>6==2;r++)e++;return e}return e===s.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(s||(s={}));const l=Object.freeze({error:function(e,t,n,r,o){return i.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",n)},ignore:a,replace:function(e,t,n,r,i){return e===s.OVERLONG?(r.push(i),0):(r.push(65533),a(e,t,n))}});function u(e,t){null==t&&(t=l.error),e=(0,r.lE)(e);const n=[];let i=0;for(;i<e.length;){const r=e[i++];if(r>>7==0){n.push(r);continue}let o=null,a=null;if(192==(224&r))o=1,a=127;else if(224==(240&r))o=2,a=2047;else{if(240!=(248&r)){i+=t(128==(192&r)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,e,n);continue}o=3,a=65535}if(i-1+o>=e.length){i+=t(s.OVERRUN,i-1,e,n);continue}let l=r&(1<<8-o-1)-1;for(let r=0;r<o;r++){let r=e[i];if(128!=(192&r)){i+=t(s.MISSING_CONTINUE,i,e,n),l=null;break}l=l<<6|63&r,i++}null!==l&&(l>1114111?i+=t(s.OUT_OF_RANGE,i-1-o,e,n,l):l>=55296&&l<=57343?i+=t(s.UTF16_SURROGATE,i-1-o,e,n,l):l<=a?i+=t(s.OVERLONG,i-1-o,e,n,l):n.push(l))}return n}function c(e,t=o.current){t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let n=[];for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);if(r<128)n.push(r);else if(r<2048)n.push(r>>6|192),n.push(63&r|128);else if(55296==(64512&r)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&r)<<10)+(1023&i);n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(63&o|128)}else n.push(r>>12|224),n.push(r>>6&63|128),n.push(63&r|128)}return(0,r.lE)(n)}function h(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+u(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?h(e):h(55296+((e-=65536)>>10&1023))+h(56320+(1023&e))})).join("")+'"'}function f(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function p(e,t){return f(u(e,t))}function m(e,t=o.current){return u(c(e,t))}},4145:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}var r=void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},i=void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},o=[],s=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,l=!1;function u(){l=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)o[t]=e[t],s[e.charCodeAt(t)]=t;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63}function c(e,t,n){for(var r,i,s=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],s.push(o[(i=r)>>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return s.join("")}function h(e){var t;l||u();for(var n=e.length,r=n%3,i="",s=[],a=16383,h=0,d=n-r;h<d;h+=a)s.push(c(e,h,h+a>d?d:h+a));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),s.push(i),s.join("")}function d(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=a;c>0;o=256*o+e[t+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=u}return(f?-1:1)*s*Math.pow(2,o-r)}function f(e,t,n,r,i,o){var s,a,l,u=8*o-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+f]=255&s,f+=p,s/=256,u-=8);e[n+f-p]|=128*m}var p={}.toString,m=Array.isArray||function(e){return"[object Array]"==p.call(e)};b.TYPED_ARRAY_SUPPORT=void 0===i.TYPED_ARRAY_SUPPORT||i.TYPED_ARRAY_SUPPORT;var g=v();function v(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function y(e,t){if(v()<t)throw new RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=b.prototype:(null===e&&(e=new b(t)),e.length=t),e}function b(e,t,n){if(!(b.TYPED_ARRAY_SUPPORT||this instanceof b))return new b(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return _(this,e)}return w(this,e,t,n)}function w(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),b.TYPED_ARRAY_SUPPORT?(e=t).__proto__=b.prototype:e=E(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!b.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|S(t,n),i=(e=y(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(k(t)){var n=0|M(t.length);return 0===(e=y(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?y(e,0):E(e,t);if("Buffer"===t.type&&m(t.data))return E(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function A(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 _(e,t){if(A(t),e=y(e,t<0?0:0|M(t)),!b.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function E(e,t){var n=t.length<0?0:0|M(t.length);e=y(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function M(e){if(e>=v())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v().toString(16)+" bytes");return 0|e}function k(e){return!(null==e||!e._isBuffer)}function S(e,t){if(k(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 n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ee(e).length;default:if(r)return X(e).length;t=(""+t).toLowerCase(),r=!0}}function x(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return z(this,t,n);case"utf8":case"utf-8":return j(this,t,n);case"ascii":return U(this,t,n);case"latin1":case"binary":return q(this,t,n);case"base64":return D(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function T(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=b.from(t,r)),k(t))return 0===t.length?-1:O(e,t,n,r,i);if("number"==typeof t)return t&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):O(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function O(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){h=!1;break}if(h)return o}return-1}function R(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function P(e,t,n,r){return te(X(t,e.length-n),e,n,r)}function N(e,t,n,r){return te(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function L(e,t,n,r){return N(e,t,n,r)}function I(e,t,n,r){return te(ee(t),e,n,r)}function B(e,t,n,r){return te(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function D(e,t,n){return 0===t&&n===e.length?h(e):h(e.slice(t,n))}function j(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=F)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=F));return n}(r)}b.poolSize=8192,b._augment=function(e){return e.__proto__=b.prototype,e},b.from=function(e,t,n){return w(null,e,t,n)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&b[Symbol.species]),b.alloc=function(e,t,n){return function(e,t,n,r){return A(t),t<=0?y(e,t):void 0!==n?"string"==typeof r?y(e,t).fill(n,r):y(e,t).fill(n):y(e,t)}(null,e,t,n)},b.allocUnsafe=function(e){return _(null,e)},b.allocUnsafeSlow=function(e){return _(null,e)},b.isBuffer=ne,b.compare=function(e,t){if(!k(e)||!k(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},b.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}},b.concat=function(e,t){if(!m(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return b.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=b.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!k(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},b.byteLength=S,b.prototype._isBuffer=!0,b.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)C(this,t,t+1);return this},b.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)C(this,t,t+3),C(this,t+1,t+2);return this},b.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)C(this,t,t+7),C(this,t+1,t+6),C(this,t+2,t+5),C(this,t+3,t+4);return this},b.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?j(this,0,e):x.apply(this,arguments)},b.prototype.equals=function(e){if(!k(e))throw new TypeError("Argument must be a Buffer");return this===e||0===b.compare(this,e)},b.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},b.prototype.compare=function(e,t,n,r,i){if(!k(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(r,i),u=e.slice(t,n),c=0;c<a;++c)if(l[c]!==u[c]){o=l[c],s=u[c];break}return o<s?-1:s<o?1:0},b.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},b.prototype.indexOf=function(e,t,n){return T(this,e,t,n,!0)},b.prototype.lastIndexOf=function(e,t,n){return T(this,e,t,n,!1)},b.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return R(this,e,t,n);case"utf8":case"utf-8":return P(this,e,t,n);case"ascii":return N(this,e,t,n);case"latin1":case"binary":return L(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var F=4096;function U(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function q(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function z(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=J(e[o]);return i}function H(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function K(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function V(e,t,n,r,i,o){if(!k(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function W(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function $(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function Y(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function G(e,t,n,r,i){return i||Y(e,0,n,4),f(e,t,n,r,23,4),n+4}function Z(e,t,n,r,i){return i||Y(e,0,n,8),f(e,t,n,r,52,8),n+8}b.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),b.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=b.prototype;else{var i=t-e;n=new b(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},b.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||K(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},b.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||K(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},b.prototype.readUInt8=function(e,t){return t||K(e,1,this.length),this[e]},b.prototype.readUInt16LE=function(e,t){return t||K(e,2,this.length),this[e]|this[e+1]<<8},b.prototype.readUInt16BE=function(e,t){return t||K(e,2,this.length),this[e]<<8|this[e+1]},b.prototype.readUInt32LE=function(e,t){return t||K(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},b.prototype.readUInt32BE=function(e,t){return t||K(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},b.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||K(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},b.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||K(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},b.prototype.readInt8=function(e,t){return t||K(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},b.prototype.readInt16LE=function(e,t){t||K(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt16BE=function(e,t){t||K(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt32LE=function(e,t){return t||K(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},b.prototype.readInt32BE=function(e,t){return t||K(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},b.prototype.readFloatLE=function(e,t){return t||K(e,4,this.length),d(this,e,!0,23,4)},b.prototype.readFloatBE=function(e,t){return t||K(e,4,this.length),d(this,e,!1,23,4)},b.prototype.readDoubleLE=function(e,t){return t||K(e,8,this.length),d(this,e,!0,52,8)},b.prototype.readDoubleBE=function(e,t){return t||K(e,8,this.length),d(this,e,!1,52,8)},b.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||V(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},b.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||V(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},b.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,1,255,0),b.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},b.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):W(this,e,t,!0),t+2},b.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):W(this,e,t,!1),t+2},b.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$(this,e,t,!0),t+4},b.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},b.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);V(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},b.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);V(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},b.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,1,127,-128),b.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},b.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):W(this,e,t,!0),t+2},b.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):W(this,e,t,!1),t+2},b.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},b.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),b.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},b.prototype.writeFloatLE=function(e,t,n){return G(this,e,t,!0,n)},b.prototype.writeFloatBE=function(e,t,n){return G(this,e,t,!1,n)},b.prototype.writeDoubleLE=function(e,t,n){return Z(this,e,t,!0,n)},b.prototype.writeDoubleBE=function(e,t,n){return Z(this,e,t,!1,n)},b.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!b.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},b.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!b.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=k(e)?e:X(new b(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var Q=/[^+\/0-9A-Za-z-_]/g;function J(e){return e<16?"0"+e.toString(16):e.toString(16)}function X(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function ee(e){return function(e){var t,n,r,i,o,c;l||u();var h=e.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[h-2]?2:"="===e[h-1]?1:0,c=new a(3*h/4-o),r=o>0?h-4:h;var d=0;for(t=0,n=0;t<r;t+=4,n+=3)i=s[e.charCodeAt(t)]<<18|s[e.charCodeAt(t+1)]<<12|s[e.charCodeAt(t+2)]<<6|s[e.charCodeAt(t+3)],c[d++]=i>>16&255,c[d++]=i>>8&255,c[d++]=255&i;return 2===o?(i=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,c[d++]=255&i):1===o&&(i=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,c[d++]=i>>8&255,c[d++]=255&i),c}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function te(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function ne(e){return null!=e&&(!!e._isBuffer||re(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&re(e.slice(0,0))}(e))}function re(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var ie=Object.freeze({__proto__:null,Buffer:b,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),b.alloc(+e)},isBuffer:ne,kMaxLength:g}),oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{};function se(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var ae={},le={},ue={},ce=se(ie),he={};function de(){throw new Error("setTimeout has not been defined")}function fe(){throw new Error("clearTimeout has not been defined")}var pe=de,me=fe;function ge(e){if(pe===setTimeout)return setTimeout(e,0);if((pe===de||!pe)&&setTimeout)return pe=setTimeout,setTimeout(e,0);try{return pe(e,0)}catch(t){try{return pe.call(null,e,0)}catch(t){return pe.call(this,e,0)}}}"function"==typeof i.setTimeout&&(pe=setTimeout),"function"==typeof i.clearTimeout&&(me=clearTimeout);var ve,ye=[],be=!1,we=-1;function Ae(){be&&ve&&(be=!1,ve.length?ye=ve.concat(ye):we=-1,ye.length&&_e())}function _e(){if(!be){var e=ge(Ae);be=!0;for(var t=ye.length;t;){for(ve=ye,ye=[];++we<t;)ve&&ve[we].run();we=-1,t=ye.length}ve=null,be=!1,function(e){if(me===clearTimeout)return clearTimeout(e);if((me===fe||!me)&&clearTimeout)return me=clearTimeout,clearTimeout(e);try{return me(e)}catch(t){try{return me.call(null,e)}catch(t){return me.call(this,e)}}}(e)}}function Ee(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ye.push(new Me(e,t)),1!==ye.length||be||ge(_e)}function Me(e,t){this.fun=e,this.array=t}function ke(){}Me.prototype.run=function(){this.fun.apply(null,this.array)};var Se=ke,xe=ke,Ce=ke,Te=ke,Oe=ke,Re=ke,Pe=ke,Ne=i.performance||{},Le=Ne.now||Ne.mozNow||Ne.msNow||Ne.oNow||Ne.webkitNow||function(){return(new Date).getTime()},Ie=new Date,Be={nextTick:Ee,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Se,addListener:xe,once:Ce,off:Te,removeListener:Oe,removeAllListeners:Re,emit:Pe,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Le.call(Ne),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Ie)/1e3}},De={exports:{}},je={exports:{}};!function(e,t){var n=ce,r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(je,je.exports);var Fe=je.exports,Ue=65536,qe=Fe.Buffer,ze=oe.crypto||oe.msCrypto;ze&&ze.getRandomValues?De.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=qe.allocUnsafe(e);if(e>0)if(e>Ue)for(var r=0;r<e;r+=Ue)ze.getRandomValues(n.slice(r,r+Ue));else ze.getRandomValues(n);return"function"==typeof t?Ee((function(){t(null,n)})):n}:De.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var He=De.exports,Ke={exports:{}};"function"==typeof Object.create?Ke.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ke.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Ve=Ke.exports,We={exports:{}};function $e(){}function Ye(){Ye.init.call(this)}function Ge(e){return void 0===e._maxListeners?Ye.defaultMaxListeners:e._maxListeners}function Ze(e,t,n,r){var i,o,s,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]):(o=e._events=new $e,e._eventsCount=0),s){if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(i=Ge(e))&&i>0&&s.length>i){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,"function"==typeof console.warn?console.warn(a):console.log(a)}}else s=o[t]=n,++e._eventsCount;return e}function Qe(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function Je(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function Xe(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}$e.prototype=Object.create(null),Ye.EventEmitter=Ye,Ye.usingDomains=!1,Ye.prototype.domain=void 0,Ye.prototype._events=void 0,Ye.prototype._maxListeners=void 0,Ye.defaultMaxListeners=10,Ye.init=function(){this.domain=null,Ye.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new $e,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ye.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Ye.prototype.getMaxListeners=function(){return Ge(this)},Ye.prototype.emit=function(e){var t,n,r,i,o,s,a,l="error"===e;if(s=this._events)l=l&&null==s.error;else if(!l)return!1;if(a=this.domain,l){if(t=arguments[1],!a){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(n=s[e]))return!1;var c="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=Xe(e,r),o=0;o<r;++o)i[o].call(n)}(n,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=Xe(e,i),s=0;s<i;++s)o[s].call(n,r)}(n,c,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,s=Xe(e,o),a=0;a<o;++a)s[a].call(n,r,i)}(n,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var s=e.length,a=Xe(e,s),l=0;l<s;++l)a[l].call(n,r,i,o)}(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=Xe(e,i),s=0;s<i;++s)o[s].apply(n,r)}(n,c,this,i)}return!0},Ye.prototype.addListener=function(e,t){return Ze(this,e,t,!1)},Ye.prototype.on=Ye.prototype.addListener,Ye.prototype.prependListener=function(e,t){return Ze(this,e,t,!0)},Ye.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Qe(this,e,t)),this},Ye.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Qe(this,e,t)),this},Ye.prototype.removeListener=function(e,t){var n,r,i,o,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new $e:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new $e,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,s||t)}return this},Ye.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new $e,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new $e:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new $e,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},Ye.prototype.listeners=function(e){var t,n,r=this._events;return n=r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[],n},Ye.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Je.call(e,t)},Ye.prototype.listenerCount=Je,Ye.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var et=se(Object.freeze({__proto__:null,EventEmitter:Ye,default:Ye})),tt=et.EventEmitter,nt="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},rt=/%[sdj%]/g;function it(e){if(!wt(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(ut(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(rt,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])vt(s)||!Mt(s)?o+=" "+s:o+=" "+ut(s);return o}function ot(e,t){if(_t(i.process))return function(){return ot(e,t).apply(this,arguments)};if(!0===Be.noDeprecation)return e;var n=!1;return function(){if(!n){if(Be.throwDeprecation)throw new Error(t);Be.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var st,at={};function lt(e){return _t(st)&&(st=Be.env.NODE_DEBUG||""),e=e.toUpperCase(),at[e]||(new RegExp("\\b"+e+"\\b","i").test(st)?at[e]=function(){var t=it.apply(null,arguments);console.error("%s %d: %s",e,0,t)}:at[e]=function(){}),at[e]}function ut(e,t){var n={seen:[],stylize:ht};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),gt(t)?n.showHidden=t:t&&Lt(n,t),_t(n.showHidden)&&(n.showHidden=!1),_t(n.depth)&&(n.depth=2),_t(n.colors)&&(n.colors=!1),_t(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ct),dt(n,e,n.depth)}function ct(e,t){var n=ut.styles[t];return n?"["+ut.colors[n][0]+"m"+e+"["+ut.colors[n][1]+"m":e}function ht(e,t){return e}function dt(e,t,n){if(e.customInspect&&t&&xt(t.inspect)&&t.inspect!==ut&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return wt(r)||(r=dt(e,r,n)),r}var i=function(e,t){if(_t(t))return e.stylize("undefined","undefined");if(wt(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return bt(t)?e.stylize(""+t,"number"):gt(t)?e.stylize(""+t,"boolean"):vt(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),St(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ft(t);if(0===o.length){if(xt(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(Et(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(kt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(St(t))return ft(t)}var l,u="",c=!1,h=["{","}"];return mt(t)&&(c=!0,h=["[","]"]),xt(t)&&(u=" [Function"+(t.name?": "+t.name:"")+"]"),Et(t)&&(u=" "+RegExp.prototype.toString.call(t)),kt(t)&&(u=" "+Date.prototype.toUTCString.call(t)),St(t)&&(u=" "+ft(t)),0!==o.length||c&&0!=t.length?n<0?Et(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=c?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)It(t,String(s))?o.push(pt(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(pt(e,t,n,r,i,!0))})),o}(e,t,n,s,o):o.map((function(r){return pt(e,t,n,s,r,c)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,u,h)):h[0]+u+h[1]}function ft(e){return"["+Error.prototype.toString.call(e)+"]"}function pt(e,t,n,r,i,o){var s,a,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),It(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(l.value)<0?(a=vt(n)?dt(e,l.value,null):dt(e,l.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),_t(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function mt(e){return Array.isArray(e)}function gt(e){return"boolean"==typeof e}function vt(e){return null===e}function yt(e){return null==e}function bt(e){return"number"==typeof e}function wt(e){return"string"==typeof e}function At(e){return"symbol"==typeof e}function _t(e){return void 0===e}function Et(e){return Mt(e)&&"[object RegExp]"===Ot(e)}function Mt(e){return"object"==typeof e&&null!==e}function kt(e){return Mt(e)&&"[object Date]"===Ot(e)}function St(e){return Mt(e)&&("[object Error]"===Ot(e)||e instanceof Error)}function xt(e){return"function"==typeof e}function Ct(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function Tt(e){return ne(e)}function Ot(e){return Object.prototype.toString.call(e)}function Rt(e){return e<10?"0"+e.toString(10):e.toString(10)}ut.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ut.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Nt(){var e,t;console.log("%s - %s",(t=[Rt((e=new Date).getHours()),Rt(e.getMinutes()),Rt(e.getSeconds())].join(":"),[e.getDate(),Pt[e.getMonth()],t].join(" ")),it.apply(null,arguments))}function Lt(e,t){if(!t||!Mt(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function It(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Bt,Dt,jt={inherits:nt,_extend:Lt,log:Nt,isBuffer:Tt,isPrimitive:Ct,isFunction:xt,isError:St,isDate:kt,isObject:Mt,isRegExp:Et,isUndefined:_t,isSymbol:At,isString:wt,isNumber:bt,isNullOrUndefined:yt,isNull:vt,isBoolean:gt,isArray:mt,inspect:ut,deprecate:ot,format:it,debuglog:lt},Ft=se(Object.freeze({__proto__:null,_extend:Lt,debuglog:lt,default:jt,deprecate:ot,format:it,inherits:nt,inspect:ut,isArray:mt,isBoolean:gt,isBuffer:Tt,isDate:kt,isError:St,isFunction:xt,isNull:vt,isNullOrUndefined:yt,isNumber:bt,isObject:Mt,isPrimitive:Ct,isRegExp:Et,isString:wt,isSymbol:At,isUndefined:_t,log:Nt}));function Ut(e,t){zt(e,t),qt(e)}function qt(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function zt(e,t){e.emit("error",t)}var Ht={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ee(zt,this,e)):Ee(zt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?Ee(qt,n):(n._writableState.errorEmitted=!0,Ee(Ut,n,e)):Ee(Ut,n,e):t?(Ee(qt,n),t(e)):Ee(qt,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}},Kt={},Vt={};function Wt(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,Vt[e]=r}function $t(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}Wt("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),Wt("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i;if("string"==typeof t&&("not ","not "===t.substr(0,4))?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length)," argument"===e.substring(n-9,n)}(e))i="The ".concat(e," ").concat(r," ").concat($t(t,"type"));else{var o=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+1>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(r," ").concat($t(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),Wt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Wt("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),Wt("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Wt("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),Wt("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Wt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Wt("ERR_STREAM_WRITE_AFTER_END","write after end"),Wt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Wt("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),Wt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Kt.codes=Vt;var Yt,Gt,Zt,Qt,Jt,Xt,en=Kt.codes.ERR_INVALID_OPT_VALUE,tn={getHighWaterMark:function(e,t,n,r){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,r,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new en(r?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}};function nn(){if(Gt)return Yt;function e(e){try{if(!oe.localStorage)return!1}catch(e){return!1}var t=oe.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return Gt=1,Yt=function(t,n){if(e("noDeprecation"))return t;var r=!1;return function(){if(!r){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),r=!0}return t.apply(this,arguments)}},Yt}function rn(){if(Qt)return Zt;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Qt=1,Zt=A,A.WritableState=w;var n,r={deprecate:nn()},i=tt,o=ce.Buffer,s=(void 0!==oe?oe:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},a=Ht,l=tn.getHighWaterMark,u=Kt.codes,c=u.ERR_INVALID_ARG_TYPE,h=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,f=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,v=u.ERR_UNKNOWN_ENCODING,y=a.errorOrDestroy;function b(){}function w(n,r,i){t=t||on(),n=n||{},"boolean"!=typeof i&&(i=r instanceof t),this.objectMode=!!n.objectMode,i&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=l(this,n,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(Ee(i,r),Ee(x,e,t),e._writableState.errorEmitted=!0,y(e,r)):(i(r),e._writableState.errorEmitted=!0,y(e,r),x(e,t))}(e,n,r,t,i);else{var o=k(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),r?Ee(E,e,n,o,i):E(e,n,o,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function A(e){var r=this instanceof(t=t||on());if(!r&&!n.call(A,this))return new A(e);this._writableState=new w(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function _(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new p("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function E(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),x(e,t)}function M(t,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(t._writev&&r&&r.next){var i=n.bufferedRequestCount,o=new Array(i),s=n.corkedRequestsFree;s.entry=r;for(var a=0,l=!0;r;)o[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;o.allBuffers=l,_(t,n,!0,n.length,o,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(_(t,n,!1,n.objectMode?1:u.length,u,c,h),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(n){t.pendingcb--,n&&y(e,n),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var n=k(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,Ee(S,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}return Ve(A,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===A&&e&&e._writableState instanceof w}})):n=function(e){return e instanceof this},A.prototype.pipe=function(){y(this,new f)},A.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,l=!i.objectMode&&(r=e,o.isBuffer(r)||r instanceof s);return l&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(n=t,t=null),l?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=b),i.ending?function(e,t){var n=new g;y(e,n),Ee(t,n)}(this,n):(l||function(e,t,n,r){var i;return null===n?i=new m:"string"==typeof n||t.objectMode||(i=new c("chunk",["string","Buffer"],n)),!i||(y(e,i),Ee(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,s){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var l=t.objectMode?1:r.length;t.length+=l;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,l,r,i,s);return u}(this,i,l,e,t,n)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new h("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,x(e,t),n&&(t.finished?Ee(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=a.destroy,A.prototype._undestroy=a.undestroy,A.prototype._destroy=function(e,t){t(e)},Zt}function on(){if(Xt)return Jt;Xt=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};Jt=s;var t=yn(),n=rn();Ve(s,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||Ee(l,this)}function l(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Jt}var sn,an={};function ln(){if(sn)return an;sn=1;var e=Fe.Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=a,this.end=l,r=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}return an.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var o=r(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},an}var un=Kt.codes.ERR_STREAM_PREMATURE_CLOSE;function cn(){}var hn,dn,fn,pn,mn,gn,vn=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(r||cn);var i=n.readable||!1!==n.readable&&t.readable,o=n.writable||!1!==n.writable&&t.writable,s=function(){t.writable||l()},a=t._writableState&&t._writableState.finished,l=function(){o=!1,a=!0,i||r.call(t)},u=t._readableState&&t._readableState.endEmitted,c=function(){i=!1,u=!0,o||r.call(t)},h=function(e){r.call(t,e)},d=function(){var e;return i&&!u?(t._readableState&&t._readableState.ended||(e=new un),r.call(t,e)):o&&!a?(t._writableState&&t._writableState.ended||(e=new un),r.call(t,e)):void 0},f=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",d),t.req?f():t.on("request",f)):o&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",c),t.on("finish",l),!1!==n.error&&t.on("error",h),t.on("close",d),function(){t.removeListener("complete",l),t.removeListener("abort",d),t.removeListener("request",f),t.req&&t.req.removeListener("finish",l),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",l),t.removeListener("end",c),t.removeListener("error",h),t.removeListener("close",d)}};function yn(){if(gn)return mn;var e;gn=1,mn=A,A.ReadableState=w,et.EventEmitter;var t,n=function(e,t){return e.listeners(t).length},r=tt,i=ce.Buffer,o=(void 0!==oe?oe:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},s=Ft;t=s&&s.debuglog?s.debuglog("stream"):function(){};var a,l,u,c=function(){if(Dt)return Bt;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}Dt=1;var o=ce.Buffer,s=Ft.inspect,a=s&&s.custom||"inspect";return Bt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var n,i;return n=e,i=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,r=a,o.prototype.copy.call(t,n,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:a,value:function(e,n){return s(this,t(t({},n),{},{depth:0,customInspect:!1}))}}],i&&r(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(),Bt}(),h=Ht,d=tn.getHighWaterMark,f=Kt.codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_STREAM_PUSH_AFTER_EOF,g=f.ERR_METHOD_NOT_IMPLEMENTED,v=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Ve(A,r);var y=h.errorOrDestroy,b=["error","close","destroy","pause","resume"];function w(t,n,r){e=e||on(),t=t||{},"boolean"!=typeof r&&(r=n instanceof e),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=d(this,t,"readableHighWaterMark",r),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a||(a=ln().StringDecoder),this.decoder=new a(t.encoding),this.encoding=t.encoding)}function A(t){if(e=e||on(),!(this instanceof A))return new A(t);var n=this instanceof e;this._readableState=new w(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function _(e,n,r,s,a){t("readableAddChunk",n);var l,u=e._readableState;if(null===n)u.reading=!1,function(e,n){if(t("onEofChunk"),!n.ended){if(n.decoder){var r=n.decoder.end();r&&r.length&&(n.buffer.push(r),n.length+=n.objectMode?1:r.length)}n.ended=!0,n.sync?S(e):(n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,x(e)))}}(e,u);else if(a||(l=function(e,t){var n,r;return r=t,i.isBuffer(r)||r instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new p("chunk",["string","Buffer","Uint8Array"],t)),n}(u,n)),l)y(e,l);else if(u.objectMode||n&&n.length>0)if("string"==typeof n||u.objectMode||Object.getPrototypeOf(n)===i.prototype||(n=function(e){return i.from(e)}(n)),s)u.endEmitted?y(e,new v):E(e,u,n,!0);else if(u.ended)y(e,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(n=u.decoder.write(n),u.objectMode||0!==n.length?E(e,u,n,!1):C(e,u)):E(e,u,n,!1)}else s||(u.reading=!1,C(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),C(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=i.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},A.prototype.unshift=function(e){return _(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){a||(a=ln().StringDecoder);var t=new a(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var M=1073741824;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var n=e._readableState;t("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(t("emitReadable",n.flowing),n.emittedReadable=!0,Ee(x,e))}function x(e){var n=e._readableState;t("emitReadable_",n.destroyed,n.length,n.ended),n.destroyed||!n.length&&!n.ended||(e.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,N(e)}function C(e,t){t.readingMore||(t.readingMore=!0,Ee(T,e,t))}function T(e,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){var r=n.length;if(t("maybeReadMore read 0"),e.read(0),r===n.length)break}n.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){t("readable nexttick read 0"),e.read(0)}function P(e,n){t("resume",n.reading),n.reading||e.read(0),n.resumeScheduled=!1,e.emit("resume"),N(e),n.flowing&&!n.reading&&e.read(0)}function N(e){var n=e._readableState;for(t("flow",n.flowing);n.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var n=e._readableState;t("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,Ee(B,n,e))}function B(e,n){if(t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,n.readable=!1,n.emit("end"),e.autoDestroy)){var r=n._writableState;(!r||r.autoDestroy&&r.finished)&&n.destroy()}}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return A.prototype.read=function(e){t("read",e),e=parseInt(e,10);var n=this._readableState,r=e;if(0!==e&&(n.emittedReadable=!1),0===e&&n.needReadable&&((0!==n.highWaterMark?n.length>=n.highWaterMark:n.length>0)||n.ended))return t("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?I(this):S(this),null;if(0===(e=k(e,n))&&n.ended)return 0===n.length&&I(this),null;var i,o=n.needReadable;return t("need readable",o),(0===n.length||n.length-e<n.highWaterMark)&&t("length less than watermark",o=!0),n.ended||n.reading?t("reading or ended",o=!1):o&&(t("do read"),n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1,n.reading||(e=k(r,n))),null===(i=e>0?L(e,n):null)?(n.needReadable=n.length<=n.highWaterMark,e=0):(n.length-=e,n.awaitDrain=0),0===n.length&&(n.ended||(n.needReadable=!0),r!==e&&n.ended&&I(this)),null!==i&&this.emit("data",i),i},A.prototype._read=function(e){y(this,new g("_read()"))},A.prototype.pipe=function(e,r){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,t("pipe count=%d opts=%j",o.pipesCount,r);var s=r&&!1===r.end||e===Be.stdout||e===Be.stderr?p:a;function a(){t("onend"),e.end()}o.endEmitted?Ee(s):i.once("end",s),e.on("unpipe",(function n(r,s){t("onunpipe"),r===i&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,t("cleanup"),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",n),i.removeListener("end",a),i.removeListener("end",p),i.removeListener("data",c),u=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var r=e._readableState;t("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&n(e,"data")&&(r.flowing=!0,N(e))}}(i);e.on("drain",l);var u=!1;function c(n){t("ondata");var r=e.write(n);t("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==D(o.pipes,e))&&!u&&(t("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function h(r){t("onerror",r),p(),e.removeListener("error",h),0===n(e,"error")&&y(e,r)}function d(){e.removeListener("finish",f),p()}function f(){t("onfinish"),e.removeListener("close",d),p()}function p(){t("unpipe"),i.unpipe(e)}return i.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",d),e.once("finish",f),e.emit("pipe",i),o.flowing||(t("pipe resume"),i.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=D(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},A.prototype.on=function(e,n){var i=r.prototype.on.call(this,e,n),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,t("on readable",o.length,o.reading),o.length?S(this):o.reading||Ee(R,this))),i},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var n=r.prototype.removeListener.call(this,e,t);return"readable"===e&&Ee(O,this),n},A.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||Ee(O,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(t("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ee(P,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var n=this,r=this._readableState,i=!1;for(var o in e.on("end",(function(){if(t("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(o){t("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(n.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<b.length;s++)e.on(b[s],this.emit.bind(this,b[s]));return this._read=function(n){t("wrapped _read",n),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=function(){if(dn)return hn;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}dn=1;var n=vn,r=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function c(e,t){return{value:e,done:t}}function h(e){var t=e[r];if(null!==t){var n=e[u].read();null!==n&&(e[a]=null,e[r]=null,e[i]=null,t(c(n,!1)))}}function d(e){Ee(h,e)}var f=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((t(e={get stream(){return this[u]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(c(void 0,!0));if(this[u].destroyed)return new Promise((function(t,n){Ee((function(){e[o]?n(e[o]):t(c(void 0,!0))}))}));var n,r=this[a];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[s]?n(c(void 0,!0)):t[l](n,r)}),r)}}(r,this));else{var i=this[u].read();if(null!==i)return Promise.resolve(c(i,!1));n=new Promise(this[l])}return this[a]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[u].destroy(null,(function(e){e?n(e):t(c(void 0,!0))}))}))})),e),f);return hn=function(e){var h,f=Object.create(p,(t(h={},u,{value:e,writable:!0}),t(h,r,{value:null,writable:!0}),t(h,i,{value:null,writable:!0}),t(h,o,{value:null,writable:!0}),t(h,s,{value:e._readableState.endEmitted,writable:!0}),t(h,l,{value:function(e,t){var n=f[u].read();n?(f[a]=null,f[r]=null,f[i]=null,e(c(n,!1))):(f[r]=e,f[i]=t)},writable:!0}),h));return f[a]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=f[i];return null!==t&&(f[a]=null,f[r]=null,f[i]=null,t(e)),void(f[o]=e)}var n=f[r];null!==n&&(f[a]=null,f[r]=null,f[i]=null,n(c(void 0,!0))),f[s]=!0})),e.on("readable",d.bind(null,f)),f},hn}()),l(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=L,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===u&&(u=pn?fn:(pn=1,fn=function(){throw new Error("Readable.from is not available in the browser")})),u(A,e,t)}),mn}var bn=xn,wn=Kt.codes,An=wn.ERR_METHOD_NOT_IMPLEMENTED,_n=wn.ERR_MULTIPLE_CALLBACK,En=wn.ERR_TRANSFORM_ALREADY_TRANSFORMING,Mn=wn.ERR_TRANSFORM_WITH_LENGTH_0,kn=on();function Sn(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new _n);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function xn(e){if(!(this instanceof xn))return new xn(e);kn.call(this,e),this._transformState={afterTransform:Sn.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",Cn)}function Cn(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?Tn(this,null,null):this._flush((function(t,n){Tn(e,t,n)}))}function Tn(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Mn;if(e._transformState.transforming)throw new En;return e.push(null)}Ve(xn,kn),xn.prototype.push=function(e,t){return this._transformState.needTransform=!1,kn.prototype.push.call(this,e,t)},xn.prototype._transform=function(e,t,n){n(new An("_transform()"))},xn.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},xn.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},xn.prototype._destroy=function(e,t){kn.prototype._destroy.call(this,e,(function(e){t(e)}))};var On,Rn=Nn,Pn=bn;function Nn(e){if(!(this instanceof Nn))return new Nn(e);Pn.call(this,e)}Ve(Nn,Pn),Nn.prototype._transform=function(e,t,n){n(null,e)};var Ln=Kt.codes,In=Ln.ERR_MISSING_ARGS,Bn=Ln.ERR_STREAM_DESTROYED;function Dn(e){if(e)throw e}function jn(e){e()}function Fn(e,t){return e.pipe(t)}var Un=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=function(e){return e.length?"function"!=typeof e[e.length-1]?Dn:e.pop():Dn}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new In("streams");var o=t.map((function(e,n){var s=n<t.length-1;return function(e,t,n,r){r=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(r);var i=!1;e.on("close",(function(){i=!0})),void 0===On&&(On=vn),On(e,{readable:t,writable:n},(function(e){if(e)return r(e);i=!0,r()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void r(t||new Bn("pipe"))}}(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(jn),s||(o.forEach(jn),i(r))}))}));return t.reduce(Fn)};!function(e,t){(t=We.exports=yn()).Stream=t,t.Readable=t,t.Writable=rn(),t.Duplex=on(),t.Transform=bn,t.PassThrough=Rn,t.finished=vn,t.pipeline=Un}(0,We.exports);var qn=We.exports,zn=Fe.Buffer,Hn=qn.Transform;function Kn(e){Hn.call(this),this._block=zn.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Ve(Kn,Hn),Kn.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},Kn.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},Kn.prototype.update=function(e,t){if(function(e,t){if(!zn.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");zn.isBuffer(e)||(e=zn.from(e,t));for(var n=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)n[i++]=e[r++];this._update(),this._blockOffset=0}for(;r<e.length;)n[this._blockOffset++]=e[r++];for(var o=0,s=8*e.length;s>0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},Kn.prototype._update=function(){throw new Error("_update is not implemented")},Kn.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},Kn.prototype._digest=function(){throw new Error("_digest is not implemented")};var Vn=Kn,Wn=Ve,$n=Vn,Yn=Fe.Buffer,Gn=new Array(16);function Zn(){$n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Qn(e,t){return e<<t|e>>>32-t}function Jn(e,t,n,r,i,o,s){return Qn(e+(t&n|~t&r)+i+o|0,s)+t|0}function Xn(e,t,n,r,i,o,s){return Qn(e+(t&r|n&~r)+i+o|0,s)+t|0}function er(e,t,n,r,i,o,s){return Qn(e+(t^n^r)+i+o|0,s)+t|0}function tr(e,t,n,r,i,o,s){return Qn(e+(n^(t|~r))+i+o|0,s)+t|0}Wn(Zn,$n),Zn.prototype._update=function(){for(var e=Gn,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,o=this._d;n=Jn(n,r,i,o,e[0],3614090360,7),o=Jn(o,n,r,i,e[1],3905402710,12),i=Jn(i,o,n,r,e[2],606105819,17),r=Jn(r,i,o,n,e[3],3250441966,22),n=Jn(n,r,i,o,e[4],4118548399,7),o=Jn(o,n,r,i,e[5],1200080426,12),i=Jn(i,o,n,r,e[6],2821735955,17),r=Jn(r,i,o,n,e[7],4249261313,22),n=Jn(n,r,i,o,e[8],1770035416,7),o=Jn(o,n,r,i,e[9],2336552879,12),i=Jn(i,o,n,r,e[10],4294925233,17),r=Jn(r,i,o,n,e[11],2304563134,22),n=Jn(n,r,i,o,e[12],1804603682,7),o=Jn(o,n,r,i,e[13],4254626195,12),i=Jn(i,o,n,r,e[14],2792965006,17),n=Xn(n,r=Jn(r,i,o,n,e[15],1236535329,22),i,o,e[1],4129170786,5),o=Xn(o,n,r,i,e[6],3225465664,9),i=Xn(i,o,n,r,e[11],643717713,14),r=Xn(r,i,o,n,e[0],3921069994,20),n=Xn(n,r,i,o,e[5],3593408605,5),o=Xn(o,n,r,i,e[10],38016083,9),i=Xn(i,o,n,r,e[15],3634488961,14),r=Xn(r,i,o,n,e[4],3889429448,20),n=Xn(n,r,i,o,e[9],568446438,5),o=Xn(o,n,r,i,e[14],3275163606,9),i=Xn(i,o,n,r,e[3],4107603335,14),r=Xn(r,i,o,n,e[8],1163531501,20),n=Xn(n,r,i,o,e[13],2850285829,5),o=Xn(o,n,r,i,e[2],4243563512,9),i=Xn(i,o,n,r,e[7],1735328473,14),n=er(n,r=Xn(r,i,o,n,e[12],2368359562,20),i,o,e[5],4294588738,4),o=er(o,n,r,i,e[8],2272392833,11),i=er(i,o,n,r,e[11],1839030562,16),r=er(r,i,o,n,e[14],4259657740,23),n=er(n,r,i,o,e[1],2763975236,4),o=er(o,n,r,i,e[4],1272893353,11),i=er(i,o,n,r,e[7],4139469664,16),r=er(r,i,o,n,e[10],3200236656,23),n=er(n,r,i,o,e[13],681279174,4),o=er(o,n,r,i,e[0],3936430074,11),i=er(i,o,n,r,e[3],3572445317,16),r=er(r,i,o,n,e[6],76029189,23),n=er(n,r,i,o,e[9],3654602809,4),o=er(o,n,r,i,e[12],3873151461,11),i=er(i,o,n,r,e[15],530742520,16),n=tr(n,r=er(r,i,o,n,e[2],3299628645,23),i,o,e[0],4096336452,6),o=tr(o,n,r,i,e[7],1126891415,10),i=tr(i,o,n,r,e[14],2878612391,15),r=tr(r,i,o,n,e[5],4237533241,21),n=tr(n,r,i,o,e[12],1700485571,6),o=tr(o,n,r,i,e[3],2399980690,10),i=tr(i,o,n,r,e[10],4293915773,15),r=tr(r,i,o,n,e[1],2240044497,21),n=tr(n,r,i,o,e[8],1873313359,6),o=tr(o,n,r,i,e[15],4264355552,10),i=tr(i,o,n,r,e[6],2734768916,15),r=tr(r,i,o,n,e[13],1309151649,21),n=tr(n,r,i,o,e[4],4149444226,6),o=tr(o,n,r,i,e[11],3174756917,10),i=tr(i,o,n,r,e[2],718787259,15),r=tr(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},Zn.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Yn.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var nr=Zn,rr=ce.Buffer,ir=Ve,or=Vn,sr=new Array(16),ar=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],lr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],ur=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],cr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],hr=[0,1518500249,1859775393,2400959708,2840853838],dr=[1352829926,1548603684,1836072691,2053994217,0];function fr(){or.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function pr(e,t){return e<<t|e>>>32-t}function mr(e,t,n,r,i,o,s,a){return pr(e+(t^n^r)+o+s|0,a)+i|0}function gr(e,t,n,r,i,o,s,a){return pr(e+(t&n|~t&r)+o+s|0,a)+i|0}function vr(e,t,n,r,i,o,s,a){return pr(e+((t|~n)^r)+o+s|0,a)+i|0}function yr(e,t,n,r,i,o,s,a){return pr(e+(t&r|n&~r)+o+s|0,a)+i|0}function br(e,t,n,r,i,o,s,a){return pr(e+(t^(n|~r))+o+s|0,a)+i|0}ir(fr,or),fr.prototype._update=function(){for(var e=sr,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,a=0|this._a,l=0|this._b,u=0|this._c,c=0|this._d,h=0|this._e,d=0;d<80;d+=1){var f,p;d<16?(f=mr(n,r,i,o,s,e[ar[d]],hr[0],ur[d]),p=br(a,l,u,c,h,e[lr[d]],dr[0],cr[d])):d<32?(f=gr(n,r,i,o,s,e[ar[d]],hr[1],ur[d]),p=yr(a,l,u,c,h,e[lr[d]],dr[1],cr[d])):d<48?(f=vr(n,r,i,o,s,e[ar[d]],hr[2],ur[d]),p=vr(a,l,u,c,h,e[lr[d]],dr[2],cr[d])):d<64?(f=yr(n,r,i,o,s,e[ar[d]],hr[3],ur[d]),p=gr(a,l,u,c,h,e[lr[d]],dr[3],cr[d])):(f=br(n,r,i,o,s,e[ar[d]],hr[4],ur[d]),p=mr(a,l,u,c,h,e[lr[d]],dr[4],cr[d])),n=s,s=o,o=pr(i,10),i=r,r=f,a=h,h=c,c=pr(u,10),u=l,l=p}var m=this._b+i+c|0;this._b=this._c+o+h|0,this._c=this._d+s+a|0,this._d=this._e+n+l|0,this._e=this._a+r+u|0,this._a=m},fr.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=rr.alloc?rr.alloc(20):new rr(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};var wr=fr,Ar={exports:{}},_r=Fe.Buffer;function Er(e,t){this._block=_r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Er.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=_r.from(e,t));for(var n=this._block,r=this._blockSize,i=e.length,o=this._len,s=0;s<i;){for(var a=o%r,l=Math.min(i-s,r-a),u=0;u<l;u++)n[a+u]=e[s+u];s+=l,(o+=l)%r==0&&this._update(n)}return this._len+=i,this},Er.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},Er.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Mr=Er,kr=Ve,Sr=Mr,xr=Fe.Buffer,Cr=[1518500249,1859775393,-1894007588,-899497514],Tr=new Array(80);function Or(){this.init(),this._w=Tr,Sr.call(this,64,56)}function Rr(e){return e<<30|e>>>2}function Pr(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}kr(Or,Sr),Or.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Or.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,l=0;l<16;++l)n[l]=e.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var u=0;u<80;++u){var c=~~(u/20),h=0|((t=r)<<5|t>>>27)+Pr(c,i,o,s)+a+n[u]+Cr[c];a=s,s=o,o=Rr(i),i=r,r=h}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Or.prototype._hash=function(){var e=xr.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Nr=Or,Lr=Ve,Ir=Mr,Br=Fe.Buffer,Dr=[1518500249,1859775393,-1894007588,-899497514],jr=new Array(80);function Fr(){this.init(),this._w=jr,Ir.call(this,64,56)}function Ur(e){return e<<5|e>>>27}function qr(e){return e<<30|e>>>2}function zr(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}Lr(Fr,Ir),Fr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Fr.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,l=0;l<16;++l)n[l]=e.readInt32BE(4*l);for(;l<80;++l)n[l]=(t=n[l-3]^n[l-8]^n[l-14]^n[l-16])<<1|t>>>31;for(var u=0;u<80;++u){var c=~~(u/20),h=Ur(r)+zr(c,i,o,s)+a+n[u]+Dr[c]|0;a=s,s=o,o=qr(i),i=r,r=h}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Fr.prototype._hash=function(){var e=Br.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Hr=Fr,Kr=Ve,Vr=Mr,Wr=Fe.Buffer,$r=[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],Yr=new Array(64);function Gr(){this.init(),this._w=Yr,Vr.call(this,64,56)}function Zr(e,t,n){return n^e&(t^n)}function Qr(e,t,n){return e&t|n&(e|t)}function Jr(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Xr(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function ei(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}Kr(Gr,Vr),Gr.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Gr.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,l=0|this._f,u=0|this._g,c=0|this._h,h=0;h<16;++h)n[h]=e.readInt32BE(4*h);for(;h<64;++h)n[h]=0|(((t=n[h-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[h-7]+ei(n[h-15])+n[h-16];for(var d=0;d<64;++d){var f=c+Xr(a)+Zr(a,l,u)+$r[d]+n[d]|0,p=Jr(r)+Qr(r,i,o)|0;c=u,u=l,l=a,a=s+f|0,s=o,o=i,i=r,r=f+p|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=l+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},Gr.prototype._hash=function(){var e=Wr.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var ti=Gr,ni=Ve,ri=ti,ii=Mr,oi=Fe.Buffer,si=new Array(64);function ai(){this.init(),this._w=si,ii.call(this,64,56)}ni(ai,ri),ai.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},ai.prototype._hash=function(){var e=oi.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var li=ai,ui=Ve,ci=Mr,hi=Fe.Buffer,di=[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],fi=new Array(160);function pi(){this.init(),this._w=fi,ci.call(this,128,112)}function mi(e,t,n){return n^e&(t^n)}function gi(e,t,n){return e&t|n&(e|t)}function yi(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function bi(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function wi(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function Ai(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function _i(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Ei(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Mi(e,t){return e>>>0<t>>>0?1:0}ui(pi,ci),pi.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},pi.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,a=0|this._fh,l=0|this._gh,u=0|this._hh,c=0|this._al,h=0|this._bl,d=0|this._cl,f=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,v=0|this._hl,y=0;y<32;y+=2)t[y]=e.readInt32BE(4*y),t[y+1]=e.readInt32BE(4*y+4);for(;y<160;y+=2){var b=t[y-30],w=t[y-30+1],A=wi(b,w),_=Ai(w,b),E=_i(b=t[y-4],w=t[y-4+1]),M=Ei(w,b),k=t[y-14],S=t[y-14+1],x=t[y-32],C=t[y-32+1],T=_+S|0,O=A+k+Mi(T,_)|0;O=(O=O+E+Mi(T=T+M|0,M)|0)+x+Mi(T=T+C|0,C)|0,t[y]=O,t[y+1]=T}for(var R=0;R<160;R+=2){O=t[R],T=t[R+1];var P=gi(n,r,i),N=gi(c,h,d),L=yi(n,c),I=yi(c,n),B=bi(s,p),D=bi(p,s),j=di[R],F=di[R+1],U=mi(s,a,l),q=mi(p,m,g),z=v+D|0,H=u+B+Mi(z,v)|0;H=(H=(H=H+U+Mi(z=z+q|0,q)|0)+j+Mi(z=z+F|0,F)|0)+O+Mi(z=z+T|0,T)|0;var K=I+N|0,V=L+P+Mi(K,I)|0;u=l,v=g,l=a,g=m,a=s,m=p,s=o+H+Mi(p=f+z|0,f)|0,o=i,f=d,i=r,d=h,r=n,h=c,n=H+V+Mi(c=z+K|0,z)|0}this._al=this._al+c|0,this._bl=this._bl+h|0,this._cl=this._cl+d|0,this._dl=this._dl+f|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+v|0,this._ah=this._ah+n+Mi(this._al,c)|0,this._bh=this._bh+r+Mi(this._bl,h)|0,this._ch=this._ch+i+Mi(this._cl,d)|0,this._dh=this._dh+o+Mi(this._dl,f)|0,this._eh=this._eh+s+Mi(this._el,p)|0,this._fh=this._fh+a+Mi(this._fl,m)|0,this._gh=this._gh+l+Mi(this._gl,g)|0,this._hh=this._hh+u+Mi(this._hl,v)|0},pi.prototype._hash=function(){var e=hi.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var ki=pi,Si=Ve,xi=ki,Ci=Mr,Ti=Fe.Buffer,Oi=new Array(160);function Ri(){this.init(),this._w=Oi,Ci.call(this,128,112)}Si(Ri,xi),Ri.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Ri.prototype._hash=function(){var e=Ti.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Pi=Ri,Ni=Ar.exports=function(e){e=e.toLowerCase();var t=Ni[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Ni.sha=Nr,Ni.sha1=Hr,Ni.sha224=li,Ni.sha256=ti,Ni.sha384=Pi,Ni.sha512=ki;var Li=Ar.exports;function Ii(){this.head=null,this.tail=null,this.length=0}Ii.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Ii.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Ii.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Ii.prototype.clear=function(){this.head=this.tail=null,this.length=0},Ii.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},Ii.prototype.concat=function(e){if(0===this.length)return b.alloc(0);if(1===this.length)return this.head.data;for(var t=b.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var Bi=b.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Di(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Bi(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Fi;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Ui;break;default:return void(this.write=ji)}this.charBuffer=new b(6),this.charReceived=0,this.charLength=0}function ji(e){return e.toString(this.encoding)}function Fi(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function Ui(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}Di.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},Di.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},Di.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t};var qi=Object.freeze({__proto__:null,StringDecoder:Di});Ki.ReadableState=Hi;var zi=lt("stream");function Hi(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof bo&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Ii,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new Di(e.encoding),this.encoding=e.encoding)}function Ki(e){if(!(this instanceof Ki))return new Ki(e);this._readableState=new Hi(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Ye.call(this)}function Vi(e,t,n,r,i){var o=function(e,t){var n=null;return ne(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,Yi(e)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var l;!t.decoder||i||r||(n=t.decoder.write(n),l=!t.objectMode&&0===n.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&Yi(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ee(Zi,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}nt(Ki,Ye),Ki.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=b.from(e,t),t=""),Vi(this,n,e,t,!1)},Ki.prototype.unshift=function(e){return Vi(this,this._readableState,e,"",!0)},Ki.prototype.isPaused=function(){return!1===this._readableState.flowing},Ki.prototype.setEncoding=function(e){return this._readableState.decoder=new Di(e),this._readableState.encoding=e,this};var Wi=8388608;function $i(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=Wi?e=Wi:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Yi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(zi("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ee(Gi,e):Gi(e))}function Gi(e){zi("emit readable"),e.emit("readable"),Xi(e)}function Zi(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(zi("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function Qi(e){zi("readable nexttick read 0"),e.read(0)}function Ji(e,t){t.reading||(zi("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Xi(e),t.flowing&&!t.reading&&e.read(0)}function Xi(e){var t=e._readableState;for(zi("flow",t.flowing);t.flowing&&null!==e.read(););}function eo(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=b.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0==(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function to(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ee(no,t,e))}function no(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function ro(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function io(){}function oo(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function so(e,t){Object.defineProperty(this,"buffer",{get:ot((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof bo&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?Ee(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=ho(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||co(e,n),r?Ee(uo,e,n,o,i):uo(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new mo(this)}function ao(e){if(!(this instanceof ao||this instanceof bo))return new ao(e);this._writableState=new so(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),Ye.call(this)}function lo(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function uo(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),po(e,t)}function co(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;lo(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new mo(t)}else{for(;n;){var a=n.chunk,l=n.encoding,u=n.callback;if(lo(e,t,!1,t.objectMode?1:a.length,a,l,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function ho(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function fo(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function po(e,t){var n=ho(t);return n&&(0===t.pendingcb?(fo(e,t),t.finished=!0,e.emit("finish")):fo(e,t)),n}function mo(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}Ki.prototype.read=function(e){zi("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return zi("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?to(this):Yi(this),null;if(0===(e=$i(e,t))&&t.ended)return 0===t.length&&to(this),null;var r,i=t.needReadable;return zi("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&zi("length less than watermark",i=!0),t.ended||t.reading?zi("reading or ended",i=!1):i&&(zi("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=$i(n,t))),null===(r=e>0?eo(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&to(this)),null!==r&&this.emit("data",r),r},Ki.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Ki.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,zi("pipe count=%d opts=%j",r.pipesCount,t);var i=t&&!1===t.end?u:s;function o(e){zi("onunpipe"),e===n&&u()}function s(){zi("onend"),e.end()}r.endEmitted?Ee(i):n.once("end",i),e.on("unpipe",o);var a=function(e){return function(){var t=e._readableState;zi("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Xi(e))}}(n);e.on("drain",a);var l=!1;function u(){zi("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",a),e.removeListener("error",d),e.removeListener("unpipe",o),n.removeListener("end",s),n.removeListener("end",u),n.removeListener("data",h),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var c=!1;function h(t){zi("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==ro(r.pipes,e))&&!l&&(zi("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function d(t){zi("onerror",t),m(),e.removeListener("error",d),0===e.listeners("error").length&&e.emit("error",t)}function f(){e.removeListener("finish",p),m()}function p(){zi("onfinish"),e.removeListener("close",f),m()}function m(){zi("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",n),r.flowing||(zi("pipe resume"),n.resume()),e},Ki.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=ro(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},Ki.prototype.on=function(e,t){var n=Ye.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&Yi(this):Ee(Qi,this))}return n},Ki.prototype.addListener=Ki.prototype.on,Ki.prototype.resume=function(){var e=this._readableState;return e.flowing||(zi("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ee(Ji,e,t))}(this,e)),this},Ki.prototype.pause=function(){return zi("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(zi("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Ki.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(zi("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){zi("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n])}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){zi("wrapped _read",t),n&&(n=!1,e.resume())},r},Ki._fromList=eo,ao.WritableState=so,nt(ao,Ye),so.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},ao.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},ao.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),b.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=io),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),Ee(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):b.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ee(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=b.from(t,n)),t}(t,n,r),b.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new oo(n,r,i),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else lo(e,t,!1,o,n,r,i);return s}(this,r,e,t,n)),i},ao.prototype.cork=function(){this._writableState.corked++},ao.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||co(this,e))},ao.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},ao.prototype._write=function(e,t,n){n(new Error("not implemented"))},ao.prototype._writev=null,ao.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,po(e,t),n&&(t.finished?Ee(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},nt(bo,Ki);for(var go=Object.keys(ao.prototype),vo=0;vo<go.length;vo++){var yo=go[vo];bo.prototype[yo]||(bo.prototype[yo]=ao.prototype[yo])}function bo(e){if(!(this instanceof bo))return new bo(e);Ki.call(this,e),ao.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",wo)}function wo(){this.allowHalfOpen||this._writableState.ended||Ee(Ao,this)}function Ao(e){e.end()}function _o(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Eo(e){if(!(this instanceof Eo))return new Eo(e);bo.call(this,e),this._transformState=new _o(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Mo(t,e)})):Mo(t)}))}function Mo(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function ko(e){if(!(this instanceof ko))return new ko(e);Eo.call(this,e)}function So(){Ye.call(this)}nt(Eo,bo),Eo.prototype.push=function(e,t){return this._transformState.needTransform=!1,bo.prototype.push.call(this,e,t)},Eo.prototype._transform=function(e,t,n){throw new Error("Not implemented")},Eo.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Eo.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},nt(ko,Eo),ko.prototype._transform=function(e,t,n){n(null,e)},nt(So,Ye),So.Readable=Ki,So.Writable=ao,So.Duplex=bo,So.Transform=Eo,So.PassThrough=ko,So.Stream=So,So.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",a));var o=!1;function s(){o||(o=!0,e.end())}function a(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===Ye.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",l),e.on("error",l),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e};var xo=se(Object.freeze({__proto__:null,Duplex:bo,PassThrough:ko,Readable:Ki,Stream:So,Transform:Eo,Writable:ao,default:So})),Co=se(qi),To=Fe.Buffer,Oo=xo.Transform,Ro=Co.StringDecoder;function Po(e){Oo.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Ve(Po,Oo),Po.prototype.update=function(e,t,n){"string"==typeof e&&(e=To.from(e,t));var r=this._update(e);return this.hashMode?this:(n&&(r=this._toString(r,n)),r)},Po.prototype.setAutoPadding=function(){},Po.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Po.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Po.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Po.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},Po.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},Po.prototype._finalOrDigest=function(e){var t=this.__final()||To.alloc(0);return e&&(t=this._toString(t,e,!0)),t},Po.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new Ro(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r};var No=Po,Lo=nr,Io=wr,Bo=Li,Do=No;function jo(e){Do.call(this,"digest"),this._hash=e}Ve(jo,Do),jo.prototype._update=function(e){this._hash.update(e)},jo.prototype._final=function(){return this._hash.digest()};var Fo=function(e){return"md5"===(e=e.toLowerCase())?new Lo:"rmd160"===e||"ripemd160"===e?new Io:new jo(Bo(e))},Uo=Ve,qo=Fe.Buffer,zo=No,Ho=qo.alloc(128),Ko=64;function Vo(e,t){zo.call(this,"digest"),"string"==typeof t&&(t=qo.from(t)),this._alg=e,this._key=t,t.length>Ko?t=e(t):t.length<Ko&&(t=qo.concat([t,Ho],Ko));for(var n=this._ipad=qo.allocUnsafe(Ko),r=this._opad=qo.allocUnsafe(Ko),i=0;i<Ko;i++)n[i]=54^t[i],r[i]=92^t[i];this._hash=[n]}Uo(Vo,zo),Vo.prototype._update=function(e){this._hash.push(e)},Vo.prototype._final=function(){var e=this._alg(qo.concat(this._hash));return this._alg(qo.concat([this._opad,e]))};var Wo=nr,$o=function(e){return(new Wo).update(e).digest()},Yo=Ve,Go=Vo,Zo=No,Qo=Fe.Buffer,Jo=$o,Xo=wr,es=Li,ts=Qo.alloc(128);function ns(e,t){Zo.call(this,"digest"),"string"==typeof t&&(t=Qo.from(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=("rmd160"===e?new Xo:es(e)).update(t).digest():t.length<n&&(t=Qo.concat([t,ts],n));for(var r=this._ipad=Qo.allocUnsafe(n),i=this._opad=Qo.allocUnsafe(n),o=0;o<n;o++)r[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new Xo:es(e),this._hash.update(r)}Yo(ns,Zo),ns.prototype._update=function(e){this._hash.update(e)},ns.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new Xo:es(this._alg)).update(this._opad).update(e).digest()};var rs=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new ns("rmd160",t):"md5"===e?new Go(Jo,t):new ns(e,t)},is={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},os=is,ss={},as=Math.pow(2,30)-1,ls=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>as||t!=t)throw new TypeError("Bad key length")},us=oe.process&&oe.process.browser?"utf-8":oe.process&&oe.process.version?parseInt(Be.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",cs=Fe.Buffer,hs=function(e,t,n){if(cs.isBuffer(e))return e;if("string"==typeof e)return cs.from(e,t);if(ArrayBuffer.isView(e))return cs.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")},ds=$o,fs=wr,ps=Li,ms=Fe.Buffer,gs=ls,vs=us,ys=hs,bs=ms.alloc(128),ws={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function As(e,t,n){var r=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new fs).update(e).digest()}:"md5"===e?ds:function(t){return ps(e).update(t).digest()}}(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=r(t):t.length<i&&(t=ms.concat([t,bs],i));for(var o=ms.allocUnsafe(i+ws[e]),s=ms.allocUnsafe(i+ws[e]),a=0;a<i;a++)o[a]=54^t[a],s[a]=92^t[a];var l=ms.allocUnsafe(i+n+4);o.copy(l,0,0,i),this.ipad1=l,this.ipad2=o,this.opad=s,this.alg=e,this.blocksize=i,this.hash=r,this.size=ws[e]}As.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)};var _s,Es,Ms=function(e,t,n,r,i){gs(n,r);var o=new As(i=i||"sha1",e=ys(e,vs,"Password"),(t=ys(t,vs,"Salt")).length),s=ms.allocUnsafe(r),a=ms.allocUnsafe(t.length+4);t.copy(a,0,0,t.length);for(var l=0,u=ws[i],c=Math.ceil(r/u),h=1;h<=c;h++){a.writeUInt32BE(h,t.length);for(var d=o.run(a,o.ipad1),f=d,p=1;p<n;p++){f=o.run(f,o.ipad2);for(var m=0;m<u;m++)d[m]^=f[m]}d.copy(s,l),l+=u}return s},ks=Fe.Buffer,Ss=ls,xs=us,Cs=Ms,Ts=hs,Os=oe.crypto&&oe.crypto.subtle,Rs={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Ps=[];function Ns(){return Es||(Es=oe.process&&oe.process.nextTick?oe.process.nextTick:oe.queueMicrotask?oe.queueMicrotask:oe.setImmediate?oe.setImmediate:oe.setTimeout)}function Ls(e,t,n,r,i){return Os.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return Os.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return ks.from(e)}))}ss.pbkdf2=function(e,t,n,r,i,o){"function"==typeof i&&(o=i,i=void 0);var s=Rs[(i=i||"sha1").toLowerCase()];if(s&&"function"==typeof oe.Promise){if(Ss(n,r),e=Ts(e,xs,"Password"),t=Ts(t,xs,"Salt"),"function"!=typeof o)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){Ns()((function(){t(null,e)}))}),(function(e){Ns()((function(){t(e)}))}))}(function(e){if(oe.process&&!oe.process.browser)return Promise.resolve(!1);if(!Os||!Os.importKey||!Os.deriveBits)return Promise.resolve(!1);if(void 0!==Ps[e])return Ps[e];var t=Ls(_s=_s||ks.alloc(8),_s,10,128,e).then((function(){return!0})).catch((function(){return!1}));return Ps[e]=t,t}(s).then((function(o){return o?Ls(e,t,n,r,s):Cs(e,t,n,r,i)})),o)}else Ns()((function(){var s;try{s=Cs(e,t,n,r,i)}catch(e){return o(e)}o(null,s)}))},ss.pbkdf2Sync=Ms;var Is={},Bs={},Ds={readUInt32BE:function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},writeUInt32BE:function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},ip:function(e,t,n,r){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}n[r+0]=i>>>0,n[r+1]=o>>>0},rip:function(e,t,n,r){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;n[r+0]=i>>>0,n[r+1]=o>>>0},pc1:function(e,t,n,r){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;n[r+0]=i>>>0,n[r+1]=o>>>0},r28shl:function(e,t){return e<<t&268435455|e>>>28-t}},js=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Ds.pc2=function(e,t,n,r){for(var i=0,o=0,s=js.length>>>1,a=0;a<s;a++)i<<=1,i|=e>>>js[a]&1;for(a=s;a<js.length;a++)o<<=1,o|=t>>>js[a]&1;n[r+0]=i>>>0,n[r+1]=o>>>0},Ds.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var Fs=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Ds.substitute=function(e,t){for(var n=0,r=0;r<4;r++)n<<=4,n|=Fs[64*r+(e>>>18-6*r&63)];for(r=0;r<4;r++)n<<=4,n|=Fs[256+64*r+(t>>>18-6*r&63)];return n>>>0};var Us=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Ds.permute=function(e){for(var t=0,n=0;n<Us.length;n++)t<<=1,t|=e>>>Us[n]&1;return t>>>0},Ds.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],o=0;o<t;o+=n)i.push(r.slice(o,o+n));return i.join(" ")};var qs=zs;function zs(e,t){if(!e)throw new Error(t||"Assertion failed")}zs.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Hs=qs;function Ks(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}var Vs=Ks;Ks.prototype._init=function(){},Ks.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},Ks.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},Ks.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},Ks.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},Ks.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},Ks.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},Ks.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},Ks.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},Ks.prototype._unpad=function(e){return e},Ks.prototype._finalDecrypt=function(){Hs.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)};var Ws=qs,$s=Ds,Ys=Vs;function Gs(){this.tmp=new Array(2),this.keys=null}function Zs(e){Ys.call(this,e);var t=new Gs;this._desState=t,this.deriveKeys(t,e.key)}Ve(Zs,Ys);var Qs=Zs;Zs.create=function(e){return new Zs(e)};var Js=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Zs.prototype.deriveKeys=function(e,t){e.keys=new Array(32),Ws.equal(t.length,this.blockSize,"Invalid key length");var n=$s.readUInt32BE(t,0),r=$s.readUInt32BE(t,4);$s.pc1(n,r,e.tmp,0),n=e.tmp[0],r=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var o=Js[i>>>1];n=$s.r28shl(n,o),r=$s.r28shl(r,o),$s.pc2(n,r,e.keys,i)}},Zs.prototype._update=function(e,t,n,r){var i=this._desState,o=$s.readUInt32BE(e,t),s=$s.readUInt32BE(e,t+4);$s.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],$s.writeUInt32BE(n,o,r),$s.writeUInt32BE(n,s,r+4)},Zs.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},Zs.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)Ws.equal(e[n],t);return e.slice(0,e.length-t)},Zs.prototype._encrypt=function(e,t,n,r,i){for(var o=t,s=n,a=0;a<e.keys.length;a+=2){var l=e.keys[a],u=e.keys[a+1];$s.expand(s,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var c=$s.substitute(l,u),h=s;s=(o^$s.permute(c))>>>0,o=h}$s.rip(s,o,r,i)},Zs.prototype._decrypt=function(e,t,n,r,i){for(var o=n,s=t,a=e.keys.length-2;a>=0;a-=2){var l=e.keys[a],u=e.keys[a+1];$s.expand(o,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];var c=$s.substitute(l,u),h=o;o=(s^$s.permute(c))>>>0,s=h}$s.rip(o,s,r,i)};var Xs={},ea=qs,ta=Ve,na={};function ra(e){ea.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}Xs.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}ta(t,e);for(var n=Object.keys(na),r=0;r<n.length;r++){var i=n[r];t.prototype[i]=na[i]}return t.create=function(e){return new t(e)},t},na._cbcInit=function(){var e=new ra(this.options.iv);this._cbcState=e},na._update=function(e,t,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];for(o._update.call(this,s,0,n,r),a=0;a<this.blockSize;a++)s[a]=n[r+a]}else{for(o._update.call(this,e,t,n,r),a=0;a<this.blockSize;a++)n[r+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}};var ia=qs,oa=Vs,sa=Qs;function aa(e,t){ia.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),r=t.slice(8,16),i=t.slice(16,24);this.ciphers="encrypt"===e?[sa.create({type:"encrypt",key:n}),sa.create({type:"decrypt",key:r}),sa.create({type:"encrypt",key:i})]:[sa.create({type:"decrypt",key:i}),sa.create({type:"encrypt",key:r}),sa.create({type:"decrypt",key:n})]}function la(e){oa.call(this,e);var t=new aa(this.type,this.options.key);this._edeState=t}Ve(la,oa);var ua=la;la.create=function(e){return new la(e)},la.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},la.prototype._pad=sa.prototype._pad,la.prototype._unpad=sa.prototype._unpad,Bs.utils=Ds,Bs.Cipher=Vs,Bs.DES=Qs,Bs.CBC=Xs,Bs.EDE=ua;var ca=No,ha=Bs,da=Ve,fa=Fe.Buffer,pa={"des-ede3-cbc":ha.CBC.instantiate(ha.EDE),"des-ede3":ha.EDE,"des-ede-cbc":ha.CBC.instantiate(ha.EDE),"des-ede":ha.EDE,"des-cbc":ha.CBC.instantiate(ha.DES),"des-ecb":ha.DES};pa.des=pa["des-cbc"],pa.des3=pa["des-ede3-cbc"];var ma=ga;function ga(e){ca.call(this);var t,n=e.mode.toLowerCase(),r=pa[n];t=e.decrypt?"decrypt":"encrypt";var i=e.key;fa.isBuffer(i)||(i=fa.from(i)),"des-ede"!==n&&"des-ede-cbc"!==n||(i=fa.concat([i,i.slice(0,8)]));var o=e.iv;fa.isBuffer(o)||(o=fa.from(o)),this._des=r.create({key:i,iv:o,type:t})}da(ga,ca),ga.prototype._update=function(e){return fa.from(this._des.update(e))},ga.prototype._final=function(){return fa.from(this._des.final())};var va={},ya={},ba={},wa=function(e,t){for(var n=Math.min(e.length,t.length),r=new b(n),i=0;i<n;++i)r[i]=e[i]^t[i];return r},Aa=wa;ba.encrypt=function(e,t){var n=Aa(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},ba.decrypt=function(e,t){var n=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return Aa(r,n)};var _a={},Ea=Fe.Buffer,Ma=wa;function ka(e,t,n){var r=t.length,i=Ma(t,e._cache);return e._cache=e._cache.slice(r),e._prev=Ea.concat([e._prev,n?t:i]),i}_a.encrypt=function(e,t,n){for(var r,i=Ea.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Ea.allocUnsafe(0)),!(e._cache.length<=t.length)){i=Ea.concat([i,ka(e,t,n)]);break}r=e._cache.length,i=Ea.concat([i,ka(e,t.slice(0,r),n)]),t=t.slice(r)}return i};var Sa={},xa=Fe.Buffer;function Ca(e,t,n){var r=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=xa.concat([e._prev.slice(1),xa.from([n?t:r])]),r}Sa.encrypt=function(e,t,n){for(var r=t.length,i=xa.allocUnsafe(r),o=-1;++o<r;)i[o]=Ca(e,t[o],n);return i};var Ta={},Oa=Fe.Buffer;function Ra(e,t,n){for(var r,i,o=-1,s=0;++o<8;)r=t&1<<7-o?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^r))>>o%8,e._prev=Pa(e._prev,n?r:i);return s}function Pa(e,t){var n=e.length,r=-1,i=Oa.allocUnsafe(e.length);for(e=Oa.concat([e,Oa.from([t])]);++r<n;)i[r]=e[r]<<1|e[r+1]>>7;return i}Ta.encrypt=function(e,t,n){for(var r=t.length,i=Oa.allocUnsafe(r),o=-1;++o<r;)i[o]=Ra(e,t[o],n);return i};var Na={},La=wa;function Ia(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}Na.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=b.concat([e._cache,Ia(e)]);var n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),La(t,n)};var Ba={},Da=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}},ja=wa,Fa=Fe.Buffer,Ua=Da;function qa(e){var t=e._cipher.encryptBlockRaw(e._prev);return Ua(e._prev),t}Ba.encrypt=function(e,t){var n=Math.ceil(t.length/16),r=e._cache.length;e._cache=Fa.concat([e._cache,Fa.allocUnsafe(16*n)]);for(var i=0;i<n;i++){var o=qa(e),s=r+16*i;e._cache.writeUInt32BE(o[0],s+0),e._cache.writeUInt32BE(o[1],s+4),e._cache.writeUInt32BE(o[2],s+8),e._cache.writeUInt32BE(o[3],s+12)}var a=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),ja(t,a)};var za={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Ha={ECB:{encrypt:function(e,t){return e._cipher.encryptBlock(t)},decrypt:function(e,t){return e._cipher.decryptBlock(t)}},CBC:ba,CFB:_a,CFB8:Sa,CFB1:Ta,OFB:Na,CTR:Ba,GCM:Ba},Ka=za;for(var Va in Ka)Ka[Va].module=Ha[Ka[Va].mode];var Wa=Ka,$a={},Ya=Fe.Buffer;function Ga(e){Ya.isBuffer(e)||(e=Ya.from(e));for(var t=e.length/4|0,n=new Array(t),r=0;r<t;r++)n[r]=e.readUInt32BE(4*r);return n}function Za(e){for(;0<e.length;e++)e[0]=0}function Qa(e,t,n,r,i){for(var o,s,a,l,u=n[0],c=n[1],h=n[2],d=n[3],f=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,y=1;y<i;y++)o=u[f>>>24]^c[p>>>16&255]^h[m>>>8&255]^d[255&g]^t[v++],s=u[p>>>24]^c[m>>>16&255]^h[g>>>8&255]^d[255&f]^t[v++],a=u[m>>>24]^c[g>>>16&255]^h[f>>>8&255]^d[255&p]^t[v++],l=u[g>>>24]^c[f>>>16&255]^h[p>>>8&255]^d[255&m]^t[v++],f=o,p=s,m=a,g=l;return o=(r[f>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[v++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&f])^t[v++],a=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[f>>>8&255]<<8|r[255&p])^t[v++],l=(r[g>>>24]<<24|r[f>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[v++],[o>>>=0,s>>>=0,a>>>=0,l>>>=0]}var Ja=[0,1,2,4,8,16,32,64,128,27,54],Xa=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,l=0;l<256;++l){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,n[s]=u,r[u]=s;var c=e[s],h=e[c],d=e[h],f=257*e[u]^16843008*u;i[0][s]=f<<24|f>>>8,i[1][s]=f<<16|f>>>16,i[2][s]=f<<8|f>>>24,i[3][s]=f,f=16843009*d^65537*h^257*c^16843008*s,o[0][u]=f<<24|f>>>8,o[1][u]=f<<16|f>>>16,o[2][u]=f<<8|f>>>24,o[3][u]=f,0===s?s=a=1:(s=c^e[e[e[d^c]]],a^=e[e[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function el(e){this._key=Ga(e),this._reset()}el.blockSize=16,el.keySize=32,el.prototype.blockSize=el.blockSize,el.prototype.keySize=el.keySize,el.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var s=i[o-1];o%t==0?(s=s<<8|s>>>24,s=Xa.SBOX[s>>>24]<<24|Xa.SBOX[s>>>16&255]<<16|Xa.SBOX[s>>>8&255]<<8|Xa.SBOX[255&s],s^=Ja[o/t|0]<<24):t>6&&o%t==4&&(s=Xa.SBOX[s>>>24]<<24|Xa.SBOX[s>>>16&255]<<16|Xa.SBOX[s>>>8&255]<<8|Xa.SBOX[255&s]),i[o]=i[o-t]^s}for(var a=[],l=0;l<r;l++){var u=r-l,c=i[u-(l%4?0:4)];a[l]=l<4||u<=4?c:Xa.INV_SUB_MIX[0][Xa.SBOX[c>>>24]]^Xa.INV_SUB_MIX[1][Xa.SBOX[c>>>16&255]]^Xa.INV_SUB_MIX[2][Xa.SBOX[c>>>8&255]]^Xa.INV_SUB_MIX[3][Xa.SBOX[255&c]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=a},el.prototype.encryptBlockRaw=function(e){return Qa(e=Ga(e),this._keySchedule,Xa.SUB_MIX,Xa.SBOX,this._nRounds)},el.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=Ya.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},el.prototype.decryptBlock=function(e){var t=(e=Ga(e))[1];e[1]=e[3],e[3]=t;var n=Qa(e,this._invKeySchedule,Xa.INV_SUB_MIX,Xa.INV_SBOX,this._nRounds),r=Ya.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},el.prototype.scrub=function(){Za(this._keySchedule),Za(this._invKeySchedule),Za(this._key)},$a.AES=el;var tl=Fe.Buffer,nl=tl.alloc(16,0);function rl(e){var t=tl.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function il(e){this.h=e,this.state=tl.alloc(16,0),this.cache=tl.allocUnsafe(0)}il.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},il.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=rl(i)},il.prototype.update=function(e){var t;for(this.cache=tl.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},il.prototype.final=function(e,t){return this.cache.length&&this.ghash(tl.concat([this.cache,nl],16)),this.ghash(rl([0,e,0,t])),this.state};var ol=il,sl=$a,al=Fe.Buffer,ll=No,ul=ol,cl=wa,hl=Da;function dl(e,t,n,r){ll.call(this);var i=al.alloc(4,0);this._cipher=new sl.AES(t);var o=this._cipher.encryptBlock(i);this._ghash=new ul(o),n=function(e,t,n){if(12===t.length)return e._finID=al.concat([t,al.from([0,0,0,1])]),al.concat([t,al.from([0,0,0,2])]);var r=new ul(n),i=t.length,o=i%16;r.update(t),o&&(o=16-o,r.update(al.alloc(o,0))),r.update(al.alloc(8,0));var s=8*i,a=al.alloc(8);a.writeUIntBE(s,0,8),r.update(a),e._finID=r.state;var l=al.from(e._finID);return hl(l),l}(this,n,o),this._prev=al.from(n),this._cache=al.allocUnsafe(0),this._secCache=al.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}Ve(dl,ll),dl.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=al.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},dl.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=cl(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},dl.prototype.getAuthTag=function(){if(this._decrypt||!al.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},dl.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},dl.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};var fl=dl,pl=$a,ml=Fe.Buffer,gl=No;function vl(e,t,n,r){gl.call(this),this._cipher=new pl.AES(t),this._prev=ml.from(n),this._cache=ml.allocUnsafe(0),this._secCache=ml.allocUnsafe(0),this._decrypt=r,this._mode=e}Ve(vl,gl),vl.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},vl.prototype._final=function(){this._cipher.scrub()};var yl=vl,bl=Fe.Buffer,wl=nr,Al=function(e,t,n,r){if(bl.isBuffer(e)||(e=bl.from(e,"binary")),t&&(bl.isBuffer(t)||(t=bl.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=n/8,o=bl.alloc(i),s=bl.alloc(r||0),a=bl.alloc(0);i>0||r>0;){var l=new wl;l.update(a),l.update(e),t&&l.update(t),a=l.digest();var u=0;if(i>0){var c=o.length-i;u=Math.min(i,a.length),a.copy(o,c,0,u),i-=u}if(u<a.length&&r>0){var h=s.length-r,d=Math.min(r,a.length-u);a.copy(s,h,u,u+d),r-=d}}return a.fill(0),{key:o,iv:s}},_l=Wa,El=fl,Ml=Fe.Buffer,kl=yl,Sl=No,xl=$a,Cl=Al;function Tl(e,t,n){Sl.call(this),this._cache=new Rl,this._cipher=new xl.AES(t),this._prev=Ml.from(n),this._mode=e,this._autopadding=!0}Ve(Tl,Sl),Tl.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return Ml.concat(r)};var Ol=Ml.alloc(16,16);function Rl(){this.cache=Ml.allocUnsafe(0)}function Pl(e,t,n){var r=_l[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=Ml.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=Ml.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===r.type?new kl(r.module,t,n):"auth"===r.type?new El(r.module,t,n):new Tl(r.module,t,n)}Tl.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(Ol))throw this._cipher.scrub(),new Error("data not multiple of block length")},Tl.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},Rl.prototype.add=function(e){this.cache=Ml.concat([this.cache,e])},Rl.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},Rl.prototype.flush=function(){for(var e=16-this.cache.length,t=Ml.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return Ml.concat([this.cache,t])},ya.createCipheriv=Pl,ya.createCipher=function(e,t){var n=_l[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=Cl(t,!1,n.key,n.iv);return Pl(e,r.key,r.iv)};var Nl={},Ll=fl,Il=Fe.Buffer,Bl=Wa,Dl=yl,jl=No,Fl=$a,Ul=Al;function ql(e,t,n){jl.call(this),this._cache=new zl,this._last=void 0,this._cipher=new Fl.AES(t),this._prev=Il.from(n),this._mode=e,this._autopadding=!0}function zl(){this.cache=Il.allocUnsafe(0)}function Hl(e,t,n){var r=Bl[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=Il.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=Il.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===r.type?new Dl(r.module,t,n,!0):"auth"===r.type?new Ll(r.module,t,n,!0):new ql(r.module,t,n)}Ve(ql,jl),ql.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return Il.concat(r)},ql.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var n=-1;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},ql.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},zl.prototype.add=function(e){this.cache=Il.concat([this.cache,e])},zl.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},zl.prototype.flush=function(){if(this.cache.length)return this.cache},Nl.createDecipher=function(e,t){var n=Bl[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=Ul(t,!1,n.key,n.iv);return Hl(e,r.key,r.iv)},Nl.createDecipheriv=Hl;var Kl=ya,Vl=Nl,Wl=za;va.createCipher=va.Cipher=Kl.createCipher,va.createCipheriv=va.Cipheriv=Kl.createCipheriv,va.createDecipher=va.Decipher=Vl.createDecipher,va.createDecipheriv=va.Decipheriv=Vl.createDecipheriv,va.listCiphers=va.getCiphers=function(){return Object.keys(Wl)};var $l={};!function(e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}}($l);var Yl=ma,Gl=va,Zl=Wa,Ql=$l,Jl=Al;function Xl(e,t,n){if(e=e.toLowerCase(),Zl[e])return Gl.createCipheriv(e,t,n);if(Ql[e])return new Yl({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function eu(e,t,n){if(e=e.toLowerCase(),Zl[e])return Gl.createDecipheriv(e,t,n);if(Ql[e])return new Yl({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}Is.createCipher=Is.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),Zl[e])n=Zl[e].key,r=Zl[e].iv;else{if(!Ql[e])throw new TypeError("invalid suite type");n=8*Ql[e].key,r=Ql[e].iv}var i=Jl(t,!1,n,r);return Xl(e,i.key,i.iv)},Is.createCipheriv=Is.Cipheriv=Xl,Is.createDecipher=Is.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),Zl[e])n=Zl[e].key,r=Zl[e].iv;else{if(!Ql[e])throw new TypeError("invalid suite type");n=8*Ql[e].key,r=Ql[e].iv}var i=Jl(t,!1,n,r);return eu(e,i.key,i.iv)},Is.createDecipheriv=Is.Decipheriv=eu,Is.listCiphers=Is.getCiphers=function(){return Object.keys(Ql).concat(Gl.getCiphers())};var tu={},nu={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[o-a-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(b,v),r(w,v),r(A,v),A.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(nu,oe);var ru=nu.exports,iu={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[o-a-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(b,v),r(w,v),r(A,v),A.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(iu,oe);var ou,su,au,lu,uu,cu=iu.exports,hu={exports:{}};function du(){if(ou)return hu.exports;var e;function t(e){this.rand=e}if(ou=1,hu.exports=function(n){return e||(e=new t(null)),e.generate(n)},hu.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=qg();if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return hu.exports}function fu(){if(au)return su;au=1;var e=cu,t=du();function n(e){this.rand=e||new t.Rand}return su=n,n.create=function(e){return new n(e)},n.prototype._randbelow=function(t){var n=t.bitLength(),r=Math.ceil(n/8);do{var i=new e(this.rand.generate(r))}while(i.cmp(t)>=0);return i},n.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},n.prototype.test=function(t,n,r){var i=t.bitLength(),o=e.mont(t),s=new e(1).toRed(o);n||(n=Math.max(1,i/48|0));for(var a=t.subn(1),l=0;!a.testn(l);l++);for(var u=t.shrn(l),c=a.toRed(o);n>0;n--){var h=this._randrange(new e(2),a);r&&r(h);var d=h.toRed(o).redPow(u);if(0!==d.cmp(s)&&0!==d.cmp(c)){for(var f=1;f<l;f++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(c))break}if(f===l)return!1}}return!0},n.prototype.getDivisor=function(t,n){var r=t.bitLength(),i=e.mont(t),o=new e(1).toRed(i);n||(n=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var l=t.shrn(a),u=s.toRed(i);n>0;n--){var c=this._randrange(new e(2),s),h=t.gcd(c);if(0!==h.cmpn(1))return h;var d=c.toRed(i).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(u)){for(var f=1;f<a;f++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(t);if(0===d.cmp(u))break}if(f===a)return(d=d.redSqr()).fromRed().subn(1).gcd(t)}}return!1},su}function pu(){if(uu)return lu;uu=1;var e=He;lu=p,p.simpleSieve=d,p.fermatTest=f;var t=ru,n=new t(24),r=new(fu()),i=new t(1),o=new t(2),s=new t(5);new t(16),new t(8);var a=new t(10),l=new t(3);new t(7);var u=new t(11),c=new t(4);new t(12);var h=null;function d(e){for(var t=function(){if(null!==h)return h;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return h=e,e}(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function f(e){var n=t.mont(e);return 0===o.toRed(n).redPow(e.subn(1)).fromRed().cmpn(1)}function p(h,p){if(h<16)return new t(2===p||5===p?[140,123]:[140,39]);var m,g;for(p=new t(p);;){for(m=new t(e(Math.ceil(h/8)));m.bitLength()>h;)m.ishrn(1);if(m.isEven()&&m.iadd(i),m.testn(1)||m.iadd(o),p.cmp(o)){if(!p.cmp(s))for(;m.mod(a).cmp(l);)m.iadd(c)}else for(;m.mod(n).cmp(u);)m.iadd(c);if(d(g=m.shrn(1))&&d(m)&&f(g)&&f(m)&&r.test(g)&&r.test(m))return m}}return lu}var mu,gu,vu,yu,bu,wu={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}},Au={exports:{}},_u=et.EventEmitter;function Eu(e,t){ku(e,t),Mu(e)}function Mu(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function ku(e,t){e.emit("error",t)}var Su={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ee(ku,this,e)):Ee(ku,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted?Ee(Mu,n):(n._writableState.errorEmitted=!0,Ee(Eu,n,e)):Ee(Eu,n,e):t?(Ee(Mu,n),t(e)):Ee(Mu,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}},xu={},Cu={};function Tu(e,t,n){n||(n=Error);var r=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);r.prototype.name=n.name,r.prototype.code=e,Cu[e]=r}function Ou(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}Tu("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),Tu("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i;if("string"==typeof t&&("not ","not "===t.substr(0,4))?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length)," argument"===e.substring(n-9,n)}(e))i="The ".concat(e," ").concat(r," ").concat(Ou(t,"type"));else{var o=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+1>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(r," ").concat(Ou(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),Tu("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Tu("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),Tu("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Tu("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),Tu("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Tu("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Tu("ERR_STREAM_WRITE_AFTER_END","write after end"),Tu("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Tu("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),Tu("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),xu.codes=Cu;var Ru,Pu,Nu,Lu,Iu=xu.codes.ERR_INVALID_OPT_VALUE,Bu={getHighWaterMark:function(e,t,n,r){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,r,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new Iu(r?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}};function Du(){if(Pu)return Ru;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Pu=1,Ru=A,A.WritableState=w;var n,r={deprecate:nn()},i=_u,o=ce.Buffer,s=(void 0!==oe?oe:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},a=Su,l=Bu.getHighWaterMark,u=xu.codes,c=u.ERR_INVALID_ARG_TYPE,h=u.ERR_METHOD_NOT_IMPLEMENTED,d=u.ERR_MULTIPLE_CALLBACK,f=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,v=u.ERR_UNKNOWN_ENCODING,y=a.errorOrDestroy;function b(){}function w(n,r,i){t=t||ju(),n=n||{},"boolean"!=typeof i&&(i=r instanceof t),this.objectMode=!!n.objectMode,i&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=l(this,n,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(Ee(i,r),Ee(x,e,t),e._writableState.errorEmitted=!0,y(e,r)):(i(r),e._writableState.errorEmitted=!0,y(e,r),x(e,t))}(e,n,r,t,i);else{var o=k(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),r?Ee(E,e,n,o,i):E(e,n,o,i)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function A(e){var r=this instanceof(t=t||ju());if(!r&&!n.call(A,this))return new A(e);this._writableState=new w(e,this,r),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function _(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new p("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function E(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),x(e,t)}function M(t,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(t._writev&&r&&r.next){var i=n.bufferedRequestCount,o=new Array(i),s=n.corkedRequestsFree;s.entry=r;for(var a=0,l=!0;r;)o[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;o.allBuffers=l,_(t,n,!0,n.length,o,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(_(t,n,!1,n.objectMode?1:u.length,u,c,h),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function k(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(n){t.pendingcb--,n&&y(e,n),t.prefinished=!0,e.emit("prefinish"),x(e,t)}))}function x(e,t){var n=k(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,Ee(S,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}return Ve(A,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===A&&e&&e._writableState instanceof w}})):n=function(e){return e instanceof this},A.prototype.pipe=function(){y(this,new f)},A.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,l=!i.objectMode&&(r=e,o.isBuffer(r)||r instanceof s);return l&&!o.isBuffer(e)&&(e=function(e){return o.from(e)}(e)),"function"==typeof t&&(n=t,t=null),l?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=b),i.ending?function(e,t){var n=new g;y(e,n),Ee(t,n)}(this,n):(l||function(e,t,n,r){var i;return null===n?i=new m:"string"==typeof n||t.objectMode||(i=new c("chunk",["string","Buffer"],n)),!i||(y(e,i),Ee(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,s){if(!n){var a=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,n)),t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var l=t.objectMode?1:r.length;t.length+=l;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else _(e,t,!1,l,r,i,s);return u}(this,i,l,e,t,n)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new h("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,x(e,t),n&&(t.finished?Ee(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=a.destroy,A.prototype._undestroy=a.undestroy,A.prototype._destroy=function(e,t){t(e)},Ru}function ju(){if(Lu)return Nu;Lu=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};Nu=s;var t=Qu(),n=Du();Ve(s,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||Ee(l,this)}function l(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Nu}var Fu,Uu={};function qu(){if(Fu)return Uu;Fu=1;var e=Fe.Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=a,this.end=l,r=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}return Uu.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var o=r(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Uu}var zu=xu.codes.ERR_STREAM_PREMATURE_CLOSE;function Hu(){}var Ku,Vu,Wu,$u,Yu,Gu,Zu=function e(t,n,r){if("function"==typeof n)return e(t,null,n);n||(n={}),r=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(r||Hu);var i=n.readable||!1!==n.readable&&t.readable,o=n.writable||!1!==n.writable&&t.writable,s=function(){t.writable||l()},a=t._writableState&&t._writableState.finished,l=function(){o=!1,a=!0,i||r.call(t)},u=t._readableState&&t._readableState.endEmitted,c=function(){i=!1,u=!0,o||r.call(t)},h=function(e){r.call(t,e)},d=function(){var e;return i&&!u?(t._readableState&&t._readableState.ended||(e=new zu),r.call(t,e)):o&&!a?(t._writableState&&t._writableState.ended||(e=new zu),r.call(t,e)):void 0},f=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",d),t.req?f():t.on("request",f)):o&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",c),t.on("finish",l),!1!==n.error&&t.on("error",h),t.on("close",d),function(){t.removeListener("complete",l),t.removeListener("abort",d),t.removeListener("request",f),t.req&&t.req.removeListener("finish",l),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",l),t.removeListener("end",c),t.removeListener("error",h),t.removeListener("close",d)}};function Qu(){if(Gu)return Yu;var e;Gu=1,Yu=A,A.ReadableState=w,et.EventEmitter;var t,n=function(e,t){return e.listeners(t).length},r=_u,i=ce.Buffer,o=(void 0!==oe?oe:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},s=Ft;t=s&&s.debuglog?s.debuglog("stream"):function(){};var a,l,u,c=function(){if(bu)return yu;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}bu=1;var o=ce.Buffer,s=Ft.inspect,a=s&&s.custom||"inspect";return yu=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var n,i;return n=e,i=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,r=a,o.prototype.copy.call(t,n,r),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(s));break}++r}return this.length-=r,t}},{key:a,value:function(e,n){return s(this,t(t({},n),{},{depth:0,customInspect:!1}))}}],i&&r(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(),yu}(),h=Su,d=Bu.getHighWaterMark,f=xu.codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_STREAM_PUSH_AFTER_EOF,g=f.ERR_METHOD_NOT_IMPLEMENTED,v=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Ve(A,r);var y=h.errorOrDestroy,b=["error","close","destroy","pause","resume"];function w(t,n,r){e=e||ju(),t=t||{},"boolean"!=typeof r&&(r=n instanceof e),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=d(this,t,"readableHighWaterMark",r),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a||(a=qu().StringDecoder),this.decoder=new a(t.encoding),this.encoding=t.encoding)}function A(t){if(e=e||ju(),!(this instanceof A))return new A(t);var n=this instanceof e;this._readableState=new w(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),r.call(this)}function _(e,n,r,s,a){t("readableAddChunk",n);var l,u=e._readableState;if(null===n)u.reading=!1,function(e,n){if(t("onEofChunk"),!n.ended){if(n.decoder){var r=n.decoder.end();r&&r.length&&(n.buffer.push(r),n.length+=n.objectMode?1:r.length)}n.ended=!0,n.sync?S(e):(n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,x(e)))}}(e,u);else if(a||(l=function(e,t){var n,r;return r=t,i.isBuffer(r)||r instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new p("chunk",["string","Buffer","Uint8Array"],t)),n}(u,n)),l)y(e,l);else if(u.objectMode||n&&n.length>0)if("string"==typeof n||u.objectMode||Object.getPrototypeOf(n)===i.prototype||(n=function(e){return i.from(e)}(n)),s)u.endEmitted?y(e,new v):E(e,u,n,!0);else if(u.ended)y(e,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(n=u.decoder.write(n),u.objectMode||0!==n.length?E(e,u,n,!1):C(e,u)):E(e,u,n,!1)}else s||(u.reading=!1,C(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),C(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=i.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},A.prototype.unshift=function(e){return _(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){a||(a=qu().StringDecoder);var t=new a(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var M=1073741824;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=M?e=M:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var n=e._readableState;t("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(t("emitReadable",n.flowing),n.emittedReadable=!0,Ee(x,e))}function x(e){var n=e._readableState;t("emitReadable_",n.destroyed,n.length,n.ended),n.destroyed||!n.length&&!n.ended||(e.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,N(e)}function C(e,t){t.readingMore||(t.readingMore=!0,Ee(T,e,t))}function T(e,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){var r=n.length;if(t("maybeReadMore read 0"),e.read(0),r===n.length)break}n.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){t("readable nexttick read 0"),e.read(0)}function P(e,n){t("resume",n.reading),n.reading||e.read(0),n.resumeScheduled=!1,e.emit("resume"),N(e),n.flowing&&!n.reading&&e.read(0)}function N(e){var n=e._readableState;for(t("flow",n.flowing);n.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function I(e){var n=e._readableState;t("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,Ee(B,n,e))}function B(e,n){if(t("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,n.readable=!1,n.emit("end"),e.autoDestroy)){var r=n._writableState;(!r||r.autoDestroy&&r.finished)&&n.destroy()}}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return A.prototype.read=function(e){t("read",e),e=parseInt(e,10);var n=this._readableState,r=e;if(0!==e&&(n.emittedReadable=!1),0===e&&n.needReadable&&((0!==n.highWaterMark?n.length>=n.highWaterMark:n.length>0)||n.ended))return t("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?I(this):S(this),null;if(0===(e=k(e,n))&&n.ended)return 0===n.length&&I(this),null;var i,o=n.needReadable;return t("need readable",o),(0===n.length||n.length-e<n.highWaterMark)&&t("length less than watermark",o=!0),n.ended||n.reading?t("reading or ended",o=!1):o&&(t("do read"),n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1,n.reading||(e=k(r,n))),null===(i=e>0?L(e,n):null)?(n.needReadable=n.length<=n.highWaterMark,e=0):(n.length-=e,n.awaitDrain=0),0===n.length&&(n.ended||(n.needReadable=!0),r!==e&&n.ended&&I(this)),null!==i&&this.emit("data",i),i},A.prototype._read=function(e){y(this,new g("_read()"))},A.prototype.pipe=function(e,r){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,t("pipe count=%d opts=%j",o.pipesCount,r);var s=r&&!1===r.end||e===Be.stdout||e===Be.stderr?p:a;function a(){t("onend"),e.end()}o.endEmitted?Ee(s):i.once("end",s),e.on("unpipe",(function n(r,s){t("onunpipe"),r===i&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,t("cleanup"),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",n),i.removeListener("end",a),i.removeListener("end",p),i.removeListener("data",c),u=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var r=e._readableState;t("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&n(e,"data")&&(r.flowing=!0,N(e))}}(i);e.on("drain",l);var u=!1;function c(n){t("ondata");var r=e.write(n);t("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==D(o.pipes,e))&&!u&&(t("false write response, pause",o.awaitDrain),o.awaitDrain++),i.pause())}function h(r){t("onerror",r),p(),e.removeListener("error",h),0===n(e,"error")&&y(e,r)}function d(){e.removeListener("finish",f),p()}function f(){t("onfinish"),e.removeListener("close",d),p()}function p(){t("unpipe"),i.unpipe(e)}return i.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",d),e.once("finish",f),e.emit("pipe",i),o.flowing||(t("pipe resume"),i.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=D(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},A.prototype.on=function(e,n){var i=r.prototype.on.call(this,e,n),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,t("on readable",o.length,o.reading),o.length?S(this):o.reading||Ee(R,this))),i},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var n=r.prototype.removeListener.call(this,e,t);return"readable"===e&&Ee(O,this),n},A.prototype.removeAllListeners=function(e){var t=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||Ee(O,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(t("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ee(P,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var n=this,r=this._readableState,i=!1;for(var o in e.on("end",(function(){if(t("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(o){t("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(n.push(o)||(i=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var s=0;s<b.length;s++)e.on(b[s],this.emit.bind(this,b[s]));return this._read=function(n){t("wrapped _read",n),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=function(){if(Vu)return Ku;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Vu=1;var n=Zu,r=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function c(e,t){return{value:e,done:t}}function h(e){var t=e[r];if(null!==t){var n=e[u].read();null!==n&&(e[a]=null,e[r]=null,e[i]=null,t(c(n,!1)))}}function d(e){Ee(h,e)}var f=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((t(e={get stream(){return this[u]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(c(void 0,!0));if(this[u].destroyed)return new Promise((function(t,n){Ee((function(){e[o]?n(e[o]):t(c(void 0,!0))}))}));var n,r=this[a];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[s]?n(c(void 0,!0)):t[l](n,r)}),r)}}(r,this));else{var i=this[u].read();if(null!==i)return Promise.resolve(c(i,!1));n=new Promise(this[l])}return this[a]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[u].destroy(null,(function(e){e?n(e):t(c(void 0,!0))}))}))})),e),f);return Ku=function(e){var h,f=Object.create(p,(t(h={},u,{value:e,writable:!0}),t(h,r,{value:null,writable:!0}),t(h,i,{value:null,writable:!0}),t(h,o,{value:null,writable:!0}),t(h,s,{value:e._readableState.endEmitted,writable:!0}),t(h,l,{value:function(e,t){var n=f[u].read();n?(f[a]=null,f[r]=null,f[i]=null,e(c(n,!1))):(f[r]=e,f[i]=t)},writable:!0}),h));return f[a]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=f[i];return null!==t&&(f[a]=null,f[r]=null,f[i]=null,t(e)),void(f[o]=e)}var n=f[r];null!==n&&(f[a]=null,f[r]=null,f[i]=null,n(c(void 0,!0))),f[s]=!0})),e.on("readable",d.bind(null,f)),f},Ku}()),l(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=L,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===u&&(u=$u?Wu:($u=1,Wu=function(){throw new Error("Readable.from is not available in the browser")})),u(A,e,t)}),Yu}var Ju=sc,Xu=xu.codes,ec=Xu.ERR_METHOD_NOT_IMPLEMENTED,tc=Xu.ERR_MULTIPLE_CALLBACK,nc=Xu.ERR_TRANSFORM_ALREADY_TRANSFORMING,rc=Xu.ERR_TRANSFORM_WITH_LENGTH_0,ic=ju();function oc(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new tc);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function sc(e){if(!(this instanceof sc))return new sc(e);ic.call(this,e),this._transformState={afterTransform:oc.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",ac)}function ac(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?lc(this,null,null):this._flush((function(t,n){lc(e,t,n)}))}function lc(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new rc;if(e._transformState.transforming)throw new nc;return e.push(null)}Ve(sc,ic),sc.prototype.push=function(e,t){return this._transformState.needTransform=!1,ic.prototype.push.call(this,e,t)},sc.prototype._transform=function(e,t,n){n(new ec("_transform()"))},sc.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},sc.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},sc.prototype._destroy=function(e,t){ic.prototype._destroy.call(this,e,(function(e){t(e)}))};var uc,cc=dc,hc=Ju;function dc(e){if(!(this instanceof dc))return new dc(e);hc.call(this,e)}Ve(dc,hc),dc.prototype._transform=function(e,t,n){n(null,e)};var fc=xu.codes,pc=fc.ERR_MISSING_ARGS,mc=fc.ERR_STREAM_DESTROYED;function gc(e){if(e)throw e}function vc(e){e()}function yc(e,t){return e.pipe(t)}var bc=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=function(e){return e.length?"function"!=typeof e[e.length-1]?gc:e.pop():gc}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new pc("streams");var o=t.map((function(e,n){var s=n<t.length-1;return function(e,t,n,r){r=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(r);var i=!1;e.on("close",(function(){i=!0})),void 0===uc&&(uc=Zu),uc(e,{readable:t,writable:n},(function(e){if(e)return r(e);i=!0,r()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void r(t||new mc("pipe"))}}(e,s,n>0,(function(e){r||(r=e),e&&o.forEach(vc),s||(o.forEach(vc),i(r))}))}));return t.reduce(yc)};!function(e,t){(t=Au.exports=Qu()).Stream=t,t.Readable=t,t.Writable=Du(),t.Duplex=ju(),t.Transform=Ju,t.PassThrough=cc,t.finished=Zu,t.pipeline=bc}(0,Au.exports);var wc=Au.exports,Ac={exports:{}},_c={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),l=t;l<a;l++){var u=e.charCodeAt(l)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(e){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-l.length]+l+r:l+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],c=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(c).toString(e);r=(p=p.idivn(c)).isZero()?m+r:h[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===o?(n<e.length&&(e[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===o?(n>=0&&(e[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function g(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function v(e,t,n){return g(e,t,n)}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?p(this,e,t):n<1024?g(this,e,t):v(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),v(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new M(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(w,b),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(A,b),r(_,b),r(E,b),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new A;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return y[e]=t,t},M.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},r(k,M),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(_c,oe);var Ec=_c.exports,Mc=Ec,kc=He;function Sc(e){var t,n=e.modulus.byteLength();do{t=new Mc(kc(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function xc(e,t){var n=function(e){var t=Sc(e);return{blinder:t.toRed(Mc.mont(e.modulus)).redPow(new Mc(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),r=t.modulus.byteLength(),i=new Mc(e).mul(n.blinder).umod(t.modulus),o=i.toRed(Mc.mont(t.prime1)),s=i.toRed(Mc.mont(t.prime2)),a=t.coefficient,l=t.prime1,u=t.prime2,c=o.redPow(t.exponent1).fromRed(),h=s.redPow(t.exponent2).fromRed(),d=c.isub(h).imul(a).umod(l).imul(u);return h.iadd(d).imul(n.unblinder).umod(t.modulus).toArrayLike(b,"be",r)}xc.getr=Sc;var Cc=xc,Tc={},Oc={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},Rc={},Pc={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[o-a-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(b,v),r(w,v),r(A,v),A.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Pc,oe);var Nc=Pc.exports,Lc={};!function(e){var t=Lc;function n(e){return 1===e.length?"0"+e:e}function r(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16));else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n},t.zero2=n,t.toHex=r,t.encode=function(e,t){return"hex"===t?r(e):e}}(),function(e){var t=Rc,n=Nc,r=qs,i=Lc;t.assert=r,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,o=e.clone(),s=0;s<r.length;s++){var a,l=o.andln(i-1);o.isOdd()?(a=l>(i>>1)-1?(i>>1)-l:l,o.isubn(a)):a=0,r[s]=a,o.iushrn(1)}return r},t.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,l=e.andln(3)+i&3,u=t.andln(3)+o&3;3===l&&(l=-1),3===u&&(u=-1),s=0==(1&l)?0:3!=(r=e.andln(7)+i&7)&&5!==r||2!==u?l:-l,n[0].push(s),a=0==(1&u)?0:3!=(r=t.andln(7)+o&7)&&5!==r||2!==l?u:-u,n[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},t.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},t.parseBytes=function(e){return"string"==typeof e?t.toArray(e,"hex"):e},t.intFromLE=function(e){return new n(e,"hex","le")}}();var Ic={},Bc=Nc,Dc=Rc,jc=Dc.getNAF,Fc=Dc.getJSF,Uc=Dc.assert;function qc(e,t){this.type=e,this.p=new Bc(t.p,16),this.red=t.prime?Bc.red(t.prime):Bc.mont(this.p),this.zero=new Bc(0).toRed(this.red),this.one=new Bc(1).toRed(this.red),this.two=new Bc(2).toRed(this.red),this.n=t.n&&new Bc(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var zc=qc;function Hc(e,t){this.curve=e,this.type=t,this.precomputed=null}qc.prototype.point=function(){throw new Error("Not implemented")},qc.prototype.validate=function(){throw new Error("Not implemented")},qc.prototype._fixedNafMul=function(e,t){Uc(e.precomputed);var n=e._getDoubles(),r=jc(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var o,s,a=[];for(o=0;o<r.length;o+=n.step){s=0;for(var l=o+n.step-1;l>=o;l--)s=(s<<1)+r[l];a.push(s)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<a.length;o++)(s=a[o])===h?c=c.mixedAdd(n.points[o]):s===-h&&(c=c.mixedAdd(n.points[o].neg()));u=u.add(c)}return u.toP()},qc.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=jc(t,n,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var l=0;a>=0&&0===o[a];a--)l++;if(a>=0&&l++,s=s.dblp(l),a<0)break;var u=o[a];Uc(0!==u),s="affine"===e.type?u>0?s.mixedAdd(i[u-1>>1]):s.mixedAdd(i[-u-1>>1].neg()):u>0?s.add(i[u-1>>1]):s.add(i[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},qc.prototype._wnafMulAdd=function(e,t,n,r,i){var o,s,a,l=this._wnafT1,u=this._wnafT2,c=this._wnafT3,h=0;for(o=0;o<r;o++){var d=(a=t[o])._getNAFPoints(e);l[o]=d.wnd,u[o]=d.points}for(o=r-1;o>=1;o-=2){var f=o-1,p=o;if(1===l[f]&&1===l[p]){var m=[t[f],null,null,t[p]];0===t[f].y.cmp(t[p].y)?(m[1]=t[f].add(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg())):0===t[f].y.cmp(t[p].y.redNeg())?(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].add(t[p].neg())):(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=Fc(n[f],n[p]);for(h=Math.max(v[0].length,h),c[f]=new Array(h),c[p]=new Array(h),s=0;s<h;s++){var y=0|v[0][s],b=0|v[1][s];c[f][s]=g[3*(y+1)+(b+1)],c[p][s]=0,u[f]=m}}else c[f]=jc(n[f],l[f],this._bitLength),c[p]=jc(n[p],l[p],this._bitLength),h=Math.max(c[f].length,h),h=Math.max(c[p].length,h)}var w=this.jpoint(null,null,null),A=this._wnafT4;for(o=h;o>=0;o--){for(var _=0;o>=0;){var E=!0;for(s=0;s<r;s++)A[s]=0|c[s][o],0!==A[s]&&(E=!1);if(!E)break;_++,o--}if(o>=0&&_++,w=w.dblp(_),o<0)break;for(s=0;s<r;s++){var M=A[s];0!==M&&(M>0?a=u[s][M-1>>1]:M<0&&(a=u[s][-M-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(o=0;o<r;o++)u[o]=null;return i?w:w.toP()},qc.BasePoint=Hc,Hc.prototype.eq=function(){throw new Error("Not implemented")},Hc.prototype.validate=function(){return this.curve.validate(this)},qc.prototype.decodePoint=function(e,t){e=Dc.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?Uc(e[e.length-1]%2==0):7===e[0]&&Uc(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},Hc.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Hc.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},Hc.prototype.encode=function(e,t){return Dc.encode(this._encode(t),e)},Hc.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Hc.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Hc.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},Hc.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},Hc.prototype._getBeta=function(){return null},Hc.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t};var Kc=Nc,Vc=Ve,Wc=zc,$c=Rc.assert;function Yc(e){Wc.call(this,"short",e),this.a=new Kc(e.a,16).toRed(this.red),this.b=new Kc(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Vc(Yc,Wc);var Gc=Yc;function Zc(e,t,n,r){Wc.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new Kc(t,16),this.y=new Kc(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Qc(e,t,n,r){Wc.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Kc(0)):(this.x=new Kc(t,16),this.y=new Kc(n,16),this.z=new Kc(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Yc.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new Kc(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new Kc(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],$c(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new Kc(e.a,16),b:new Kc(e.b,16)}})):this._getEndoBasis(n)}}},Yc.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Kc.mont(e),n=new Kc(2).toRed(t).redInvm(),r=n.redNeg(),i=new Kc(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},Yc.prototype._getEndoBasis=function(e){for(var t,n,r,i,o,s,a,l,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),f=new Kc(1),p=new Kc(0),m=new Kc(0),g=new Kc(1),v=0;0!==h.cmpn(0);){var y=d.div(h);l=d.sub(y.mul(h)),u=m.sub(y.mul(f));var b=g.sub(y.mul(p));if(!r&&l.cmp(c)<0)t=a.neg(),n=f,r=l.neg(),i=u;else if(r&&2==++v)break;a=l,d=h,h=l,m=f,f=u,g=p,p=b}o=l.neg(),s=u;var w=r.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=t,s=n),r.negative&&(r=r.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:i},{a:o,b:s}]},Yc.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),a=o.mul(r.a),l=i.mul(n.b),u=o.mul(r.b);return{k1:e.sub(s).sub(a),k2:l.add(u).neg()}},Yc.prototype.pointFromX=function(e,t){(e=new Kc(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},Yc.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},Yc.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),r[2*o]=a,r[2*o+1]=l,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,r,i,2*o,n),c=0;c<2*o;c++)r[c]=null,i[c]=null;return u},Vc(Zc,Wc.BasePoint),Yc.prototype.point=function(e,t,n){return new Zc(this,e,t,n)},Yc.prototype.pointFromJSON=function(e,t){return Zc.fromJSON(this,e,t)},Zc.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},Zc.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Zc.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var o=t[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},Zc.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Zc.prototype.isInfinity=function(){return this.inf},Zc.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},Zc.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Zc.prototype.getX=function(){return this.x.fromRed()},Zc.prototype.getY=function(){return this.y.fromRed()},Zc.prototype.mul=function(e){return e=new Kc(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Zc.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},Zc.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},Zc.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Zc.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},Zc.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Vc(Qc,Wc.BasePoint),Yc.prototype.jpoint=function(e,t,n){return new Qc(this,e,t,n)},Qc.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},Qc.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Qc.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),h=r.redMul(u),d=l.redSqr().redIAdd(c).redISub(h).redISub(h),f=l.redMul(h.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},Qc.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=n.redSub(r),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),c=n.redMul(l),h=a.redSqr().redIAdd(u).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(i.redMul(u)),f=this.z.redMul(s);return this.curve.jpoint(h,d,f)},Qc.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),u=s.redAdd(s);for(t=0;t<e;t++){var c=o.redSqr(),h=u.redSqr(),d=h.redSqr(),f=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(l)),p=o.redMul(h),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=f.redMul(g);v=v.redIAdd(v).redISub(d);var y=u.redMul(a);t+1<e&&(l=l.redMul(d)),o=m,a=y,u=v}return this.curve.jpoint(o,u.redMul(i),a)},Qc.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Qc.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r),l=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=l,t=a.redMul(s.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),f=this.x.redAdd(h).redSqr().redISub(c).redISub(d);f=f.redIAdd(f);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},Qc.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=a.redMul(s.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),f=this.x.redSub(c).redMul(this.x.redAdd(c));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},Qc.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),s=n.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),l=t.redAdd(t),u=(l=l.redIAdd(l)).redMul(s),c=a.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(h).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,f,p)},Qc.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(l),c=t.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(a).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(u.redMul(l.redISub(u)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(a);return this.curve.jpoint(h,d,f)},Qc.prototype.mul=function(e,t){return e=new Kc(e,t),this.curve._wnafMul(this,e)},Qc.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},Qc.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},Qc.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Qc.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Jc=Nc,Xc=Ve,eh=zc,th=Rc;function nh(e){eh.call(this,"mont",e),this.a=new Jc(e.a,16).toRed(this.red),this.b=new Jc(e.b,16).toRed(this.red),this.i4=new Jc(4).toRed(this.red).redInvm(),this.two=new Jc(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Xc(nh,eh);var rh=nh;function ih(e,t,n){eh.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Jc(t,16),this.z=new Jc(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}nh.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},Xc(ih,eh.BasePoint),nh.prototype.decodePoint=function(e,t){return this.point(th.toArray(e,t),1)},nh.prototype.point=function(e,t){return new ih(this,e,t)},nh.prototype.pointFromJSON=function(e){return ih.fromJSON(this,e)},ih.prototype.precompute=function(){},ih.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},ih.fromJSON=function(e,t){return new ih(e,t[0],t[1]||e.one)},ih.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},ih.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},ih.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},ih.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},ih.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(n),s=i.redMul(r),a=t.z.redMul(o.redAdd(s).redSqr()),l=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,l)},ih.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},ih.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},ih.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},ih.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},ih.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},ih.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var oh=Nc,sh=Ve,ah=zc,lh=Rc.assert;function uh(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,ah.call(this,"edwards",e),this.a=new oh(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new oh(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new oh(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),lh(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}sh(uh,ah);var ch=uh;function hh(e,t,n,r,i){ah.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new oh(t,16),this.y=new oh(n,16),this.z=r?new oh(r,16):this.curve.one,this.t=i&&new oh(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}uh.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},uh.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},uh.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},uh.prototype.pointFromX=function(e,t){(e=new oh(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),o=r.redMul(i.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var a=s.fromRed().isOdd();return(t&&!a||!t&&a)&&(s=s.redNeg()),this.point(e,s)},uh.prototype.pointFromY=function(e,t){(e=new oh(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},uh.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},sh(hh,ah.BasePoint),uh.prototype.pointFromJSON=function(e){return hh.fromJSON(this,e)},uh.prototype.point=function(e,t,n,r){return new hh(this,e,t,n,r)},hh.fromJSON=function(e,t){return new hh(e,t[0],t[1],t[2])},hh.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},hh.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},hh.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=r.redAdd(t),s=o.redSub(n),a=r.redSub(t),l=i.redMul(s),u=o.redMul(a),c=i.redMul(a),h=s.redMul(o);return this.curve.point(l,u,h,c)},hh.prototype._projDbl=function(){var e,t,n,r,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(a)).redAdd(l);this.zOne?(e=s.redSub(a).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(l)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=s.redSub(a).redISub(l).redMul(o),t=u.redMul(r.redSub(l)),n=u.redMul(o))}else r=a.redAdd(l),i=this.curve._mulC(this.z).redSqr(),o=r.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(r)).redMul(o),t=this.curve._mulC(r).redMul(a.redISub(l)),n=r.redMul(o);return this.curve.point(e,t,n)},hh.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},hh.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),s=i.redSub(r),a=i.redAdd(r),l=n.redAdd(t),u=o.redMul(s),c=a.redMul(l),h=o.redMul(l),d=s.redMul(a);return this.curve.point(u,c,d,h)},hh.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),l=i.redSub(a),u=i.redAdd(a),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=r.redMul(l).redMul(c);return this.curve.twisted?(t=r.redMul(u).redMul(s.redSub(this.curve._mulA(o))),n=l.redMul(u)):(t=r.redMul(u).redMul(s.redSub(o)),n=this.curve._mulC(l).redMul(u)),this.curve.point(h,t,n)},hh.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},hh.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},hh.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},hh.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},hh.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},hh.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},hh.prototype.getX=function(){return this.normalize(),this.x.fromRed()},hh.prototype.getY=function(){return this.normalize(),this.y.fromRed()},hh.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},hh.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},hh.prototype.toP=hh.prototype.normalize,hh.prototype.mixedAdd=hh.prototype.add,function(e){var t=e;t.base=zc,t.short=Gc,t.mont=rh,t.edwards=ch}(Ic);var dh={},fh={},ph={},mh=qs,gh=Ve;function vh(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function yh(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function bh(e){return 1===e.length?"0"+e:e}function wh(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}ph.inherits=gh,ph.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=o>>6|192,n[r++]=63&o|128):vh(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),n[r++]=o>>18|240,n[r++]=o>>12&63|128,n[r++]=o>>6&63|128,n[r++]=63&o|128):(n[r++]=o>>12|224,n[r++]=o>>6&63|128,n[r++]=63&o|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},ph.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=bh(e[n].toString(16));return t},ph.htonl=yh,ph.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=yh(i)),n+=wh(i.toString(16))}return n},ph.zero2=bh,ph.zero8=wh,ph.join32=function(e,t,n,r){var i=n-t;mh(i%4==0);for(var o=new Array(i/4),s=0,a=t;s<o.length;s++,a+=4){var l;l="big"===r?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],o[s]=l>>>0}return o},ph.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},ph.rotr32=function(e,t){return e>>>t|e<<32-t},ph.rotl32=function(e,t){return e<<t|e>>>32-t},ph.sum32=function(e,t){return e+t>>>0},ph.sum32_3=function(e,t,n){return e+t+n>>>0},ph.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},ph.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},ph.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=o},ph.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},ph.sum64_lo=function(e,t,n,r){return t+r>>>0},ph.sum64_4_hi=function(e,t,n,r,i,o,s,a){var l=0,u=t;return l+=(u=u+r>>>0)<t?1:0,l+=(u=u+o>>>0)<o?1:0,e+n+i+s+(l+=(u=u+a>>>0)<a?1:0)>>>0},ph.sum64_4_lo=function(e,t,n,r,i,o,s,a){return t+r+o+a>>>0},ph.sum64_5_hi=function(e,t,n,r,i,o,s,a,l,u){var c=0,h=t;return c+=(h=h+r>>>0)<t?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+a>>>0)<a?1:0,e+n+i+s+l+(c+=(h=h+u>>>0)<u?1:0)>>>0},ph.sum64_5_lo=function(e,t,n,r,i,o,s,a,l,u){return t+r+o+a+u>>>0},ph.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},ph.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},ph.shr64_hi=function(e,t,n){return e>>>n},ph.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0};var Ah={},_h=ph,Eh=qs;function Mh(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ah.BlockHash=Mh,Mh.prototype.update=function(e,t){if(e=_h.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=_h.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},Mh.prototype.digest=function(e){return this.update(this._pad()),Eh(null===this.pending),this._digest(e)},Mh.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r};var kh={},Sh={},xh=ph.rotr32;function Ch(e,t,n){return e&t^~e&n}function Th(e,t,n){return e&t^e&n^t&n}function Oh(e,t,n){return e^t^n}Sh.ft_1=function(e,t,n,r){return 0===e?Ch(t,n,r):1===e||3===e?Oh(t,n,r):2===e?Th(t,n,r):void 0},Sh.ch32=Ch,Sh.maj32=Th,Sh.p32=Oh,Sh.s0_256=function(e){return xh(e,2)^xh(e,13)^xh(e,22)},Sh.s1_256=function(e){return xh(e,6)^xh(e,11)^xh(e,25)},Sh.g0_256=function(e){return xh(e,7)^xh(e,18)^e>>>3},Sh.g1_256=function(e){return xh(e,17)^xh(e,19)^e>>>10};var Rh=ph,Ph=Ah,Nh=Sh,Lh=Rh.rotl32,Ih=Rh.sum32,Bh=Rh.sum32_5,Dh=Nh.ft_1,jh=Ph.BlockHash,Fh=[1518500249,1859775393,2400959708,3395469782];function Uh(){if(!(this instanceof Uh))return new Uh;jh.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Rh.inherits(Uh,jh);var qh=Uh;Uh.blockSize=512,Uh.outSize=160,Uh.hmacStrength=80,Uh.padLength=64,Uh.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=Lh(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4];for(r=0;r<n.length;r++){var u=~~(r/20),c=Bh(Lh(i,5),Dh(u,o,s,a),l,n[r],Fh[u]);l=a,a=s,s=Lh(o,30),o=i,i=c}this.h[0]=Ih(this.h[0],i),this.h[1]=Ih(this.h[1],o),this.h[2]=Ih(this.h[2],s),this.h[3]=Ih(this.h[3],a),this.h[4]=Ih(this.h[4],l)},Uh.prototype._digest=function(e){return"hex"===e?Rh.toHex32(this.h,"big"):Rh.split32(this.h,"big")};var zh=ph,Hh=Ah,Kh=Sh,Vh=qs,Wh=zh.sum32,$h=zh.sum32_4,Yh=zh.sum32_5,Gh=Kh.ch32,Zh=Kh.maj32,Qh=Kh.s0_256,Jh=Kh.s1_256,Xh=Kh.g0_256,ed=Kh.g1_256,td=Hh.BlockHash,nd=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function rd(){if(!(this instanceof rd))return new rd;td.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=nd,this.W=new Array(64)}zh.inherits(rd,td);var id=rd;rd.blockSize=512,rd.outSize=256,rd.hmacStrength=192,rd.padLength=64,rd.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=$h(ed(n[r-2]),n[r-7],Xh(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],l=this.h[4],u=this.h[5],c=this.h[6],h=this.h[7];for(Vh(this.k.length===n.length),r=0;r<n.length;r++){var d=Yh(h,Jh(l),Gh(l,u,c),this.k[r],n[r]),f=Wh(Qh(i),Zh(i,o,s));h=c,c=u,u=l,l=Wh(a,d),a=s,s=o,o=i,i=Wh(d,f)}this.h[0]=Wh(this.h[0],i),this.h[1]=Wh(this.h[1],o),this.h[2]=Wh(this.h[2],s),this.h[3]=Wh(this.h[3],a),this.h[4]=Wh(this.h[4],l),this.h[5]=Wh(this.h[5],u),this.h[6]=Wh(this.h[6],c),this.h[7]=Wh(this.h[7],h)},rd.prototype._digest=function(e){return"hex"===e?zh.toHex32(this.h,"big"):zh.split32(this.h,"big")};var od=ph,sd=id;function ad(){if(!(this instanceof ad))return new ad;sd.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}od.inherits(ad,sd);var ld=ad;ad.blockSize=512,ad.outSize=224,ad.hmacStrength=192,ad.padLength=64,ad.prototype._digest=function(e){return"hex"===e?od.toHex32(this.h.slice(0,7),"big"):od.split32(this.h.slice(0,7),"big")};var ud=ph,cd=Ah,hd=qs,dd=ud.rotr64_hi,fd=ud.rotr64_lo,pd=ud.shr64_hi,md=ud.shr64_lo,gd=ud.sum64,vd=ud.sum64_hi,yd=ud.sum64_lo,bd=ud.sum64_4_hi,wd=ud.sum64_4_lo,Ad=ud.sum64_5_hi,_d=ud.sum64_5_lo,Ed=cd.BlockHash,Md=[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];function kd(){if(!(this instanceof kd))return new kd;Ed.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Md,this.W=new Array(160)}ud.inherits(kd,Ed);var Sd=kd;function xd(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function Cd(e,t,n,r,i,o){var s=t&r^~t&o;return s<0&&(s+=4294967296),s}function Td(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function Od(e,t,n,r,i,o){var s=t&r^t&o^r&o;return s<0&&(s+=4294967296),s}function Rd(e,t){var n=dd(e,t,28)^dd(t,e,2)^dd(t,e,7);return n<0&&(n+=4294967296),n}function Pd(e,t){var n=fd(e,t,28)^fd(t,e,2)^fd(t,e,7);return n<0&&(n+=4294967296),n}function Nd(e,t){var n=dd(e,t,14)^dd(e,t,18)^dd(t,e,9);return n<0&&(n+=4294967296),n}function Ld(e,t){var n=fd(e,t,14)^fd(e,t,18)^fd(t,e,9);return n<0&&(n+=4294967296),n}function Id(e,t){var n=dd(e,t,1)^dd(e,t,8)^pd(e,t,7);return n<0&&(n+=4294967296),n}function Bd(e,t){var n=fd(e,t,1)^fd(e,t,8)^md(e,t,7);return n<0&&(n+=4294967296),n}function Dd(e,t){var n=dd(e,t,19)^dd(t,e,29)^pd(e,t,6);return n<0&&(n+=4294967296),n}function jd(e,t){var n=fd(e,t,19)^fd(t,e,29)^md(e,t,6);return n<0&&(n+=4294967296),n}kd.blockSize=1024,kd.outSize=512,kd.hmacStrength=192,kd.padLength=128,kd.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=Dd(n[r-4],n[r-3]),o=jd(n[r-4],n[r-3]),s=n[r-14],a=n[r-13],l=Id(n[r-30],n[r-29]),u=Bd(n[r-30],n[r-29]),c=n[r-32],h=n[r-31];n[r]=bd(i,o,s,a,l,u,c,h),n[r+1]=wd(i,o,s,a,l,u,c,h)}},kd.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],o=this.h[2],s=this.h[3],a=this.h[4],l=this.h[5],u=this.h[6],c=this.h[7],h=this.h[8],d=this.h[9],f=this.h[10],p=this.h[11],m=this.h[12],g=this.h[13],v=this.h[14],y=this.h[15];hd(this.k.length===n.length);for(var b=0;b<n.length;b+=2){var w=v,A=y,_=Nd(h,d),E=Ld(h,d),M=xd(h,0,f,0,m),k=Cd(0,d,0,p,0,g),S=this.k[b],x=this.k[b+1],C=n[b],T=n[b+1],O=Ad(w,A,_,E,M,k,S,x,C,T),R=_d(w,A,_,E,M,k,S,x,C,T);w=Rd(r,i),A=Pd(r,i),_=Td(r,0,o,0,a),E=Od(0,i,0,s,0,l);var P=vd(w,A,_,E),N=yd(w,A,_,E);v=m,y=g,m=f,g=p,f=h,p=d,h=vd(u,c,O,R),d=yd(c,c,O,R),u=a,c=l,a=o,l=s,o=r,s=i,r=vd(O,R,P,N),i=yd(O,R,P,N)}gd(this.h,0,r,i),gd(this.h,2,o,s),gd(this.h,4,a,l),gd(this.h,6,u,c),gd(this.h,8,h,d),gd(this.h,10,f,p),gd(this.h,12,m,g),gd(this.h,14,v,y)},kd.prototype._digest=function(e){return"hex"===e?ud.toHex32(this.h,"big"):ud.split32(this.h,"big")};var Fd=ph,Ud=Sd;function qd(){if(!(this instanceof qd))return new qd;Ud.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Fd.inherits(qd,Ud);var zd=qd;qd.blockSize=1024,qd.outSize=384,qd.hmacStrength=192,qd.padLength=128,qd.prototype._digest=function(e){return"hex"===e?Fd.toHex32(this.h.slice(0,12),"big"):Fd.split32(this.h.slice(0,12),"big")},kh.sha1=qh,kh.sha224=ld,kh.sha256=id,kh.sha384=zd,kh.sha512=Sd;var Hd={},Kd=ph,Vd=Ah,Wd=Kd.rotl32,$d=Kd.sum32,Yd=Kd.sum32_3,Gd=Kd.sum32_4,Zd=Vd.BlockHash;function Qd(){if(!(this instanceof Qd))return new Qd;Zd.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Jd(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function Xd(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function ef(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Kd.inherits(Qd,Zd),Hd.ripemd160=Qd,Qd.blockSize=512,Qd.outSize=160,Qd.hmacStrength=192,Qd.padLength=64,Qd.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],o=this.h[3],s=this.h[4],a=n,l=r,u=i,c=o,h=s,d=0;d<80;d++){var f=$d(Wd(Gd(n,Jd(d,r,i,o),e[tf[d]+t],Xd(d)),rf[d]),s);n=s,s=o,o=Wd(i,10),i=r,r=f,f=$d(Wd(Gd(a,Jd(79-d,l,u,c),e[nf[d]+t],ef(d)),of[d]),h),a=h,h=c,c=Wd(u,10),u=l,l=f}f=Yd(this.h[1],i,c),this.h[1]=Yd(this.h[2],o,h),this.h[2]=Yd(this.h[3],s,a),this.h[3]=Yd(this.h[4],n,l),this.h[4]=Yd(this.h[0],r,u),this.h[0]=f},Qd.prototype._digest=function(e){return"hex"===e?Kd.toHex32(this.h,"little"):Kd.split32(this.h,"little")};var tf=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],nf=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],rf=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],of=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],sf=ph,af=qs;function lf(e,t,n){if(!(this instanceof lf))return new lf(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(sf.toArray(t,n))}var uf,cf,hf=lf;lf.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),af(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},lf.prototype.update=function(e,t){return this.inner.update(e,t),this},lf.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=fh;t.utils=ph,t.common=Ah,t.sha=kh,t.ripemd=Hd,t.hmac=hf,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(),function(e){var t,n=dh,r=fh,i=Ic,o=Rc.assert;function s(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=s,a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=cf?uf:(cf=1,uf={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(e){t=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}();var df=fh,ff=Lc,pf=qs;function mf(e){if(!(this instanceof mf))return new mf(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=ff.toArray(e.entropy,e.entropyEnc||"hex"),n=ff.toArray(e.nonce,e.nonceEnc||"hex"),r=ff.toArray(e.pers,e.persEnc||"hex");pf(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var gf=mf;mf.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},mf.prototype._hmac=function(){return new df.hmac(this.hash,this.K)},mf.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},mf.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=ff.toArray(e,t),n=ff.toArray(n,r),pf(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},mf.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=ff.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(n),this._reseed++,ff.encode(o,t)};var vf=Nc,yf=Rc.assert;function bf(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var wf=bf;bf.fromPublic=function(e,t,n){return t instanceof bf?t:new bf(e,{pub:t,pubEnc:n})},bf.fromPrivate=function(e,t,n){return t instanceof bf?t:new bf(e,{priv:t,privEnc:n})},bf.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},bf.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},bf.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},bf.prototype._importPrivate=function(e,t){this.priv=new vf(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},bf.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?yf(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||yf(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},bf.prototype.derive=function(e){return e.validate()||yf(e.validate(),"public point not validated"),e.mul(this.priv).getX()},bf.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},bf.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},bf.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Af=Nc,_f=Rc,Ef=_f.assert;function Mf(e,t){if(e instanceof Mf)return e;this._importDER(e,t)||(Ef(e.r&&e.s,"Signature without r or s"),this.r=new Af(e.r,16),this.s=new Af(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var kf,Sf,xf=Mf;function Cf(){this.place=0}function Tf(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,s=t.place;o<r;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function Of(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function Rf(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}Mf.prototype._importDER=function(e,t){e=_f.toArray(e,t);var n=new Cf;if(48!==e[n.place++])return!1;var r=Tf(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=Tf(e,n);if(!1===i)return!1;var o=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var s=Tf(e,n);if(!1===s)return!1;if(e.length!==s+n.place)return!1;var a=e.slice(n.place,s+n.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new Af(o),this.s=new Af(a),this.recoveryParam=null,!0},Mf.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=Of(t),n=Of(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];Rf(r,t.length),(r=r.concat(t)).push(2),Rf(r,n.length);var i=r.concat(n),o=[48];return Rf(o,i.length),o=o.concat(i),_f.encode(o,e)};var Pf=Rc,Nf=Pf.assert,Lf=Pf.parseBytes,If=Pf.cachedProperty;function Bf(e,t){this.eddsa=e,this._secret=Lf(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=Lf(t.pub)}Bf.fromPublic=function(e,t){return t instanceof Bf?t:new Bf(e,{pub:t})},Bf.fromSecret=function(e,t){return t instanceof Bf?t:new Bf(e,{secret:t})},Bf.prototype.secret=function(){return this._secret},If(Bf,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),If(Bf,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),If(Bf,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),If(Bf,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),If(Bf,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),If(Bf,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Bf.prototype.sign=function(e){return Nf(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},Bf.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},Bf.prototype.getSecret=function(e){return Nf(this._secret,"KeyPair is public only"),Pf.encode(this.secret(),e)},Bf.prototype.getPublic=function(e){return Pf.encode(this.pubBytes(),e)};var Df=Bf,jf=Nc,Ff=Rc,Uf=Ff.assert,qf=Ff.cachedProperty,zf=Ff.parseBytes;function Hf(e,t){this.eddsa=e,"object"!=typeof t&&(t=zf(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Uf(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof jf&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}qf(Hf,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),qf(Hf,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),qf(Hf,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),qf(Hf,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Hf.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Hf.prototype.toHex=function(){return Ff.encode(this.toBytes(),"hex").toUpperCase()};var Kf=Hf,Vf=fh,Wf=dh,$f=Rc,Yf=$f.assert,Gf=$f.parseBytes,Zf=Df,Qf=Kf;function Jf(e){if(Yf("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof Jf))return new Jf(e);e=Wf[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Vf.sha512}var Xf,ep=Jf;function tp(){return Xf||(Xf=1,function(e){var t=Tc;t.version=Oc.version,t.utils=Rc,t.rand=du(),t.curve=Ic,t.curves=dh,t.ec=function(){if(Sf)return kf;Sf=1;var e=Nc,t=gf,n=Rc,r=dh,i=du(),o=n.assert,s=wf,a=xf;function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(o(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}return kf=l,l.prototype.keyPair=function(e){return new s(this,e)},l.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},l.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new e(2));;){var a=new e(r.generate(o));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},l.prototype.sign=function(n,r,i,o){"object"==typeof i&&(o=i,i=null),o||(o={}),r=this.keyFromPrivate(r,i),n=this._truncateToN(new e(n,16));for(var s=this.n.byteLength(),l=r.getPrivate().toArray("be",s),u=n.toArray("be",s),c=new t({hash:this.hash,entropy:l,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new e(1)),d=0;;d++){var f=o.k?o.k(d):new e(c.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(h)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=f.invm(this.n).mul(g.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new a({r:g,s:v,recoveryParam:y})}}}}}},l.prototype.verify=function(t,n,r,i){t=this._truncateToN(new e(t,16)),r=this.keyFromPublic(r,i);var o=(n=new a(n,"hex")).r,s=n.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var l,u=s.invm(this.n),c=u.mul(t).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(l=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&l.eqXToP(o):!(l=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===l.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,n,r,i){o((3&r)===r,"The recovery param is more than two bits"),n=new a(n,i);var s=this.n,l=new e(t),u=n.r,c=n.s,h=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),h):this.curve.pointFromX(u,h);var f=n.r.invm(s),p=s.sub(l).mul(f).umod(s),m=c.mul(f).umod(s);return this.g.mulAdd(p,u,m)},l.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new a(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")},kf}(),t.eddsa=ep}()),Tc}Jf.prototype.sign=function(e,t){e=Gf(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),i=this.g.mul(r),o=this.encodePoint(i),s=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),a=r.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:a,Rencoded:o})},Jf.prototype.verify=function(e,t,n){e=Gf(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),i=this.hashInt(t.Rencoded(),r.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(r.pub().mul(i)).eq(o)},Jf.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return $f.intFromLE(e.digest()).umod(this.curve.n)},Jf.prototype.keyFromPublic=function(e){return Zf.fromPublic(this,e)},Jf.prototype.keyFromSecret=function(e){return Zf.fromSecret(this,e)},Jf.prototype.makeSignature=function(e){return e instanceof Qf?e:new Qf(this,e)},Jf.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},Jf.prototype.decodePoint=function(e){var t=(e=$f.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=$f.intFromLE(n);return this.curve.pointFromY(i,r)},Jf.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},Jf.prototype.decodeInt=function(e){return $f.intFromLE(e)},Jf.prototype.isPoint=function(e){return e instanceof this.pointClass};var np={},rp={},ip={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[o-a-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(b,v),r(w,v),r(A,v),A.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(ip,oe);var op,sp=ip.exports,ap={},lp={},up=ce,cp=up.Buffer,hp={};for(op in up)up.hasOwnProperty(op)&&"SlowBuffer"!==op&&"Buffer"!==op&&(hp[op]=up[op]);var dp=hp.Buffer={};for(op in cp)cp.hasOwnProperty(op)&&"allocUnsafe"!==op&&"allocUnsafeSlow"!==op&&(dp[op]=cp[op]);if(hp.Buffer.prototype=cp.prototype,dp.from&&dp.from!==Uint8Array.from||(dp.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return cp(e,t,n)}),dp.alloc||(dp.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=cp(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!hp.kStringMaxLength)try{hp.kStringMaxLength=Be.binding("buffer").kStringMaxLength}catch(i){}hp.constants||(hp.constants={MAX_LENGTH:hp.kMaxLength},hp.kStringMaxLength&&(hp.constants.MAX_STRING_LENGTH=hp.kStringMaxLength));var fp=hp,pp={};const mp=Ve;function gp(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function vp(e,t){this.path=e,this.rethrow(t)}pp.Reporter=gp,gp.prototype.isError=function(e){return e instanceof vp},gp.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},gp.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},gp.prototype.enterKey=function(e){return this._reporterState.path.push(e)},gp.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},gp.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},gp.prototype.path=function(){return this._reporterState.path.join("/")},gp.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},gp.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},gp.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof vp;if(t=r?e:new vp(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},gp.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},mp(vp,Error),vp.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,vp),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this};var yp={};const bp=Ve,wp=pp.Reporter,Ap=fp.Buffer;function _p(e,t){wp.call(this,t),Ap.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function Ep(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return Ep.isEncoderBuffer(e)||(e=new Ep(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=Ap.byteLength(e);else{if(!Ap.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}bp(_p,wp),yp.DecoderBuffer=_p,_p.isDecoderBuffer=function(e){return e instanceof _p||"object"==typeof e&&Ap.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},_p.prototype.save=function(){return{offset:this.offset,reporter:wp.prototype.save.call(this)}},_p.prototype.restore=function(e){const t=new _p(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,wp.prototype.restore.call(this,e.reporter),t},_p.prototype.isEmpty=function(){return this.offset===this.length},_p.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},_p.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new _p(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},_p.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},yp.EncoderBuffer=Ep,Ep.isEncoderBuffer=function(e){return e instanceof Ep||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},Ep.prototype.join=function(e,t){return e||(e=Ap.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):Ap.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e};const Mp=pp.Reporter,kp=yp.EncoderBuffer,Sp=yp.DecoderBuffer,xp=qs,Cp=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Tp=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Cp);function Op(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}var Rp=Op;const Pp=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Op.prototype.clone=function(){const e=this._baseState,t={};Pp.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},Op.prototype._wrap=function(){const e=this._baseState;Tp.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},Op.prototype._init=function(e){const t=this._baseState;xp(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),xp.equal(t.children.length,1,"Root node can have only one child")},Op.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(xp(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(xp(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){Op.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),Cp.forEach((function(e){Op.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return xp(null===t.tag),t.tag=e,this._useArgs(n),this}})),Op.prototype.use=function(e){xp(e);const t=this._baseState;return xp(null===t.use),t.use=e,this},Op.prototype.optional=function(){return this._baseState.optional=!0,this},Op.prototype.def=function(e){const t=this._baseState;return xp(null===t.default),t.default=e,t.optional=!0,this},Op.prototype.explicit=function(e){const t=this._baseState;return xp(null===t.explicit&&null===t.implicit),t.explicit=e,this},Op.prototype.implicit=function(e){const t=this._baseState;return xp(null===t.explicit&&null===t.implicit),t.implicit=e,this},Op.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},Op.prototype.key=function(e){const t=this._baseState;return xp(null===t.key),t.key=e,this},Op.prototype.any=function(){return this._baseState.any=!0,this},Op.prototype.choice=function(e){const t=this._baseState;return xp(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},Op.prototype.contains=function(e){const t=this._baseState;return xp(null===t.use),t.contains=e,this},Op.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,o=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(o=this._peekTag(e,r,n.any),e.isError(o))return o}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(r)}}if(n.obj&&o&&(r=e.enterObject()),o){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new Sp(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&o&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,i),i},Op.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},Op.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),xp(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},Op.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(o){const s=e.save(),a=n.choice[o];try{const n=a._decode(e,t);if(e.isError(n))return!1;r={type:o,value:n},i=!0}catch(t){return e.restore(s),!1}return!0}),this),i?r:e.error("Choice not matched")},Op.prototype._createEncoderBuffer=function(e){return new kp(e,this.reporter)},Op.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const i=this._encodeValue(e,t,n);return void 0===i||this._skipDefault(i,t,n)?void 0:i},Op.prototype._encodeValue=function(e,t,n){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new Mp);let i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}let o=null,s=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,n)._encode(e,t),s=!0;else if(r.children)o=r.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==r.use?i=this._getUse(r.use,n)._encode(e,t):(o=this._encodePrimitive(r.tag,e),s=!0);if(!r.any&&null===r.choice){const e=null!==r.implicit?r.implicit:r.tag,n=null===r.implicit?"universal":"context";null===e?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(e,s,n,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},Op.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||xp(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},Op.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},Op.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},Op.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)};var Np={};!function(e){function t(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=t(e.tag)}(Np);const Lp=Ve,Ip=fp.Buffer,Bp=Rp,Dp=Np;function jp(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Up,this.tree._init(e.body)}var Fp=jp;function Up(e){Bp.call(this,"der",e)}function qp(e){return e<10?"0"+e:e}jp.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},Lp(Up,Bp),Up.prototype._encodeComposite=function(e,t,n,r){const i=function(e,t,n,r){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),Dp.tagByName.hasOwnProperty(e))i=Dp.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}return i>=31?r.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=Dp.tagClassByName[n||"universal"]<<6,i)}(e,t,n,this.reporter);if(r.length<128){const e=Ip.alloc(2);return e[0]=i,e[1]=r.length,this._createEncoderBuffer([e,r])}let o=1;for(let e=r.length;e>=256;e>>=8)o++;const s=Ip.alloc(2+o);s[0]=i,s[1]=128|o;for(let e=1+o,t=r.length;t>0;e--,t>>=8)s[e]=255&t;return this._createEncoderBuffer([s,r])},Up.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=Ip.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},Up.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let t=0;t<e.length;t++){let n=e[t];for(r++;n>=128;n>>=7)r++}const i=Ip.alloc(r);let o=i.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(i[o--]=127&n;(n>>=7)>0;)i[o--]=128|127&n}return this._createEncoderBuffer(i)},Up.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[qp(r.getUTCFullYear()),qp(r.getUTCMonth()+1),qp(r.getUTCDate()),qp(r.getUTCHours()),qp(r.getUTCMinutes()),qp(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[qp(r.getUTCFullYear()%100),qp(r.getUTCMonth()+1),qp(r.getUTCDate()),qp(r.getUTCHours()),qp(r.getUTCMinutes()),qp(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},Up.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Up.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!Ip.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=Ip.from(t)}if(Ip.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=Ip.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const r=new Array(n);for(let t=r.length-1;t>=0;t--)r[t]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(Ip.from(r))},Up.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},Up.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},Up.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const o=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==r.defaultBuffer[i])return!1;return!0};const zp=Fp;function Hp(e){zp.call(this,e),this.enc="pem"}Ve(Hp,zp);var Kp=Hp;Hp.prototype.encode=function(e,t){const n=zp.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)r.push(n.slice(e,e+64));return r.push("-----END "+t.label+"-----"),r.join("\n")},function(e){const t=e;t.der=Fp,t.pem=Kp}(lp);var Vp={};const Wp=Ve,$p=sp,Yp=yp.DecoderBuffer,Gp=Rp,Zp=Np;function Qp(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new Xp,this.tree._init(e.body)}var Jp=Qp;function Xp(e){Gp.call(this,"der",e)}function em(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=Zp.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:Zp.tag[n]}}function tm(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(let t=0;t<i;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}Qp.prototype.decode=function(e,t){return Yp.isDecoderBuffer(e)||(e=new Yp(e,t)),this.tree._decode(e,t)},Wp(Xp,Gp),Xp.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),i=em(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n)},Xp.prototype._decodeTag=function(e,t,n){const r=em(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let i=tm(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},Xp.prototype._skipUntilEnd=function(e,t){for(;;){const n=em(e,t);if(e.isError(n))return n;const r=tm(e,n.primitive,t);if(e.isError(r))return r;let i;if(i=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===n.tagStr)break}},Xp.prototype._decodeList=function(e,t,n,r){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=n.decode(e,"der",r);if(e.isError(o)&&t)break;i.push(o)}return i},Xp.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},Xp.prototype._decodeObjid=function(e,t,n){let r;const i=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,l=i[0]%40;if(r=n?i:[a,l].concat(i.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},Xp.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,i,o,s,a,l;if("gentime"===t)r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),s=0|n.slice(8,10),a=0|n.slice(10,12),l=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),s=0|n.slice(6,8),a=0|n.slice(8,10),l=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,s,a,l,0)},Xp.prototype._decodeNull=function(){return null},Xp.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},Xp.prototype._decodeInt=function(e,t){const n=e.raw();let r=new $p(n);return t&&(r=t[r.toString(10)]||r),r},Xp.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree};const nm=Ve,rm=fp.Buffer,im=Jp;function om(e){im.call(this,e),this.enc="pem"}nm(om,im);var sm=om;om.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),i=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,s=-1;for(let e=0;e<n.length;e++){const t=n[e].match(i);if(null!==t&&t[2]===r){if(-1!==o){if("END"!==t[1])break;s=e;break}if("BEGIN"!==t[1])break;o=e}}if(-1===o||-1===s)throw new Error("PEM section not found for: "+r);const a=n.slice(o+1,s).join("");a.replace(/[^a-z0-9+/=]+/gi,"");const l=rm.from(a,"base64");return im.prototype.decode.call(this,l,t)},function(e){const t=e;t.der=Jp,t.pem=sm}(Vp),function(e){const t=lp,n=Vp,r=Ve;function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}e.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return r(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n[e])),this.decoders[e]},i.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(t[e])),this.encoders[e]},i.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}}(ap);var am={};!function(e){const t=e;t.Reporter=pp.Reporter,t.DecoderBuffer=yp.DecoderBuffer,t.EncoderBuffer=yp.EncoderBuffer,t.Node=Rp}(am);var lm={};!function(e){const t=e;t._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},t.der=Np}(lm),function(e){const t=rp;t.bignum=sp,t.define=ap.define,t.base=am,t.constants=lm,t.decoders=Vp,t.encoders=lp}();var um=rp,cm=um.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),hm=um.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),dm=um.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),fm=um.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(dm),this.key("subjectPublicKey").bitstr())})),pm=um.define("RelativeDistinguishedName",(function(){this.setof(hm)})),mm=um.define("RDNSequence",(function(){this.seqof(pm)})),gm=um.define("Name",(function(){this.choice({rdnSequence:this.use(mm)})})),vm=um.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(cm),this.key("notAfter").use(cm))})),ym=um.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),bm=um.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(dm),this.key("issuer").use(gm),this.key("validity").use(vm),this.key("subject").use(gm),this.key("subjectPublicKeyInfo").use(fm),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(ym).optional())})),wm=um.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(bm),this.key("signatureAlgorithm").use(dm),this.key("signatureValue").bitstr())})),Am=rp;np.certificate=wm;var _m=Am.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));np.RSAPrivateKey=_m;var Em=Am.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));np.RSAPublicKey=Em;var Mm=Am.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(km),this.key("subjectPublicKey").bitstr())}));np.PublicKey=Mm;var km=Am.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),Sm=Am.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(km),this.key("subjectPrivateKey").octstr())}));np.PrivateKey=Sm;var xm=Am.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));np.EncryptedPrivateKey=xm;var Cm=Am.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));np.DSAPrivateKey=Cm,np.DSAparam=Am.define("DSAparam",(function(){this.int()}));var Tm=Am.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Om),this.key("publicKey").optional().explicit(1).bitstr())}));np.ECPrivateKey=Tm;var Om=Am.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));np.signature=Am.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var Rm=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,Pm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Nm=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Lm=Al,Im=va,Bm=Fe.Buffer,Dm=np,jm={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},Fm=va,Um=ss,qm=Fe.Buffer,zm=Hm;function Hm(e){var t;"object"!=typeof e||qm.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=qm.from(e));var n,r,i=function(e,t){var n,r=e.toString(),i=r.match(Rm);if(i){var o="aes"+i[1],s=Bm.from(i[2],"hex"),a=Bm.from(i[3].replace(/[\r\n]/g,""),"base64"),l=Lm(t,s.slice(0,8),parseInt(i[1],10)).key,u=[],c=Im.createDecipheriv(o,l,s);u.push(c.update(a)),u.push(c.final()),n=Bm.concat(u)}else{var h=r.match(Nm);n=Bm.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:r.match(Pm)[1],data:n}}(e,t),o=i.tag,s=i.data;switch(o){case"CERTIFICATE":r=Dm.certificate.decode(s,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r||(r=Dm.PublicKey.decode(s,"der")),n=r.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Dm.RSAPublicKey.decode(r.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return r.subjectPrivateKey=r.subjectPublicKey,{type:"ec",data:r};case"1.2.840.10040.4.1":return r.algorithm.params.pub_key=Dm.DSAparam.decode(r.subjectPublicKey.data,"der"),{type:"dsa",data:r.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":s=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=jm[e.algorithm.decrypt.cipher.algo.join(".")],o=e.algorithm.decrypt.cipher.iv,s=e.subjectPrivateKey,a=parseInt(i.split("-")[1],10)/8,l=Um.pbkdf2Sync(t,n,r,a,"sha1"),u=Fm.createDecipheriv(i,l,o),c=[];return c.push(u.update(s)),c.push(u.final()),qm.concat(c)}(s=Dm.EncryptedPrivateKey.decode(s,"der"),t);case"PRIVATE KEY":switch(n=(r=Dm.PrivateKey.decode(s,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Dm.RSAPrivateKey.decode(r.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:r.algorithm.curve,privateKey:Dm.ECPrivateKey.decode(r.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return r.algorithm.params.priv_key=Dm.DSAparam.decode(r.subjectPrivateKey,"der"),{type:"dsa",params:r.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return Dm.RSAPublicKey.decode(s,"der");case"RSA PRIVATE KEY":return Dm.RSAPrivateKey.decode(s,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Dm.DSAPrivateKey.decode(s,"der")};case"EC PRIVATE KEY":return{curve:(s=Dm.ECPrivateKey.decode(s,"der")).parameters.value,privateKey:s.privateKey};default:throw new Error("unknown key type "+o)}}Hm.signature=Dm.signature;var Km,Vm,Wm,$m,Ym,Gm={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"},Zm={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[o-a-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(b,v),r(w,v),r(A,v),A.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Zm,oe);var Qm,Jm,Xm=Zm.exports,eg={},tg=Fo,ng=Fe.Buffer,rg=function(e,t){for(var n,r=ng.alloc(0),i=0;r.length<t;)n=ig(i++),r=ng.concat([r,tg("sha1").update(e).update(n).digest()]);return r.slice(0,t)};function ig(e){var t=ng.allocUnsafe(4);return t.writeUInt32BE(e,0),t}var og=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e},sg={exports:{}};!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:ce.Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function a(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=a(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=l(e,c,c+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=l(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],f=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[d-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,l="le"===t,u=new e(o),c=this.clone();if(l){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),u[o-a-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function p(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var o=n.sqr();r<t.length;r++,o=o.sqr())0!==t[r]&&(n=n.mul(o));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<r;this.words[t]=l|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=r;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),o=e,s=0|o.words[o.length-1];0!=(n=26-this._countBits(s))&&(o=o.ushln(n),r.iushln(n),s=0|o.words[o.length-1]);var a,l=r.length-o.length;if("mod"!==t){(a=new i(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(o,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[o.length+h])+(0|r.words[o.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(o,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(o,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:o,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,s,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),l=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(c),s.isub(h)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),s.isub(l)):(r.isub(t),a.isub(o),l.isub(s))}return{a,b:l,gcd:r.iushln(u)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,s=new i(1),a=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(r.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(o=0===t.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(y,v),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(b,v),r(w,v),r(A,v),A.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);n(!o.isZero());var a=new i(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,o),d=this.pow(e,o.addn(1).iushrn(1)),f=this.pow(e,o),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new i(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var o=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;o!==n[0]&&(o=this.sqr(o)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(o=this.mul(o,n[s]),a=0,s=0)):a=0}l=26}return o},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new E(e)},r(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(sg,oe);var ag=sg.exports,lg=ag,ug=Fe.Buffer,cg=function(e,t){return ug.from(e.toRed(lg.mont(t.modulus)).redPow(new lg(t.publicExponent)).fromRed().toArray())},hg=zm,dg=He,fg=Fo,pg=rg,mg=og,gg=ag,vg=cg,yg=Cc,bg=Fe.Buffer,wg=function(e,t,n){var r;r=e.padding?e.padding:n?1:4;var i,o=hg(e);if(4===r)i=function(e,t){var n=e.modulus.byteLength(),r=t.length,i=fg("sha1").update(bg.alloc(0)).digest(),o=i.length,s=2*o;if(r>n-s-2)throw new Error("message too long");var a=bg.alloc(n-r-s-2),l=n-o-1,u=dg(o),c=mg(bg.concat([i,a,bg.alloc(1,1),t],l),pg(u,l)),h=mg(u,pg(c,o));return new gg(bg.concat([bg.alloc(1),h,c],n))}(o,t);else if(1===r)i=function(e,t,n){var r,i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");return r=n?bg.alloc(o-i-3,255):function(e){for(var t,n=bg.allocUnsafe(e),r=0,i=dg(2*e),o=0;r<e;)o===i.length&&(i=dg(2*e),o=0),(t=i[o++])&&(n[r++]=t);return n}(o-i-3),new gg(bg.concat([bg.from([0,n?1:2]),r,bg.alloc(1),t],o))}(o,t,n);else{if(3!==r)throw new Error("unknown padding");if((i=new gg(t)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return n?yg(i,o):vg(i,o)},Ag=zm,_g=rg,Eg=og,Mg=ag,kg=Cc,Sg=Fo,xg=cg,Cg=Fe.Buffer,Tg=function(e,t,n){var r;r=e.padding?e.padding:n?1:4;var i,o=Ag(e),s=o.modulus.byteLength();if(t.length>s||new Mg(t).cmp(o.modulus)>=0)throw new Error("decryption error");i=n?xg(new Mg(t),o):kg(t,o);var a=Cg.alloc(s-i.length);if(i=Cg.concat([a,i],s),4===r)return function(e,t){var n=e.modulus.byteLength(),r=Sg("sha1").update(Cg.alloc(0)).digest(),i=r.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,i+1),s=t.slice(i+1),a=Eg(o,_g(s,i)),l=Eg(s,_g(a,n-i-1));if(function(e,t){e=Cg.from(e),t=Cg.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));for(var i=-1;++i<r;)n+=e[i]^t[i];return n}(r,l.slice(0,i)))throw new Error("decryption error");for(var u=i;0===l[u];)u++;if(1!==l[u++])throw new Error("decryption error");return l.slice(u)}(o,i);if(1===r)return function(e,t,n){for(var r=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var s=t.slice(2,i-1);if(("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,i,n);if(3===r)return i;throw new Error("unknown padding")};!function(e){e.publicEncrypt=wg,e.privateDecrypt=Tg,e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}}(eg);var Og={};function Rg(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var Pg,Ng=Fe,Lg=Ng.Buffer,Ig=Ng.kMaxLength,Bg=oe.crypto||oe.msCrypto,Dg=Math.pow(2,32)-1;function jg(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>Dg||e<0)throw new TypeError("offset must be a uint32");if(e>Ig||e>t)throw new RangeError("offset out of range")}function Fg(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>Dg||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>Ig)throw new RangeError("buffer too small")}function Ug(e,t,n,r){var i=e.buffer,o=new Uint8Array(i,t,n);return Bg.getRandomValues(o),r?void Ee((function(){r(null,e)})):e}function qg(){if(Pg)return he;Pg=1,he.randomBytes=he.rng=he.pseudoRandomBytes=he.prng=He,he.createHash=he.Hash=Fo,he.createHmac=he.Hmac=rs;var e=os,t=Object.keys(e),n=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(t);he.getHashes=function(){return n};var r=ss;he.pbkdf2=r.pbkdf2,he.pbkdf2Sync=r.pbkdf2Sync;var i=Is;he.Cipher=i.Cipher,he.createCipher=i.createCipher,he.Cipheriv=i.Cipheriv,he.createCipheriv=i.createCipheriv,he.Decipher=i.Decipher,he.createDecipher=i.createDecipher,he.Decipheriv=i.Decipheriv,he.createDecipheriv=i.createDecipheriv,he.getCiphers=i.getCiphers,he.listCiphers=i.listCiphers;var o=function(){if(vu)return tu;vu=1;var e=pu(),t=wu,n=function(){if(gu)return mu;gu=1;var e=ru,t=new(fu()),n=new e(24),r=new e(11),i=new e(10),o=new e(3),s=new e(7),a=pu(),l=He;function u(t,n){return n=n||"utf8",ne(t)||(t=new b(t,n)),this._pub=new e(t),this}function c(t,n){return n=n||"utf8",ne(t)||(t=new b(t,n)),this._priv=new e(t),this}mu=d;var h={};function d(t,n,r){this.setGenerator(n),this.__prime=new e(t),this._prime=e.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=u,this.setPrivateKey=c):this._primeCode=8}function f(e,t){var n=new b(e.toArray());return t?n.toString(t):n}return Object.defineProperty(d.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,l){var u=l.toString("hex"),c=[u,e.toString(16)].join("_");if(c in h)return h[c];var d,f=0;if(e.isEven()||!a.simpleSieve||!a.fermatTest(e)||!t.test(e))return f+=1,f+="02"===u||"05"===u?8:4,h[c]=f,f;switch(t.test(e.shrn(1))||(f+=2),u){case"02":e.mod(n).cmp(r)&&(f+=8);break;case"05":(d=e.mod(i)).cmp(o)&&d.cmp(s)&&(f+=8);break;default:f+=4}return h[c]=f,f}(this.__prime,this.__gen)),this._primeCode}}),d.prototype.generateKeys=function(){return this._priv||(this._priv=new e(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},d.prototype.computeSecret=function(t){var n=new b((t=(t=new e(t)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),r=this.getPrime();if(n.length<r.length){var i=new b(r.length-n.length);i.fill(0),n=b.concat([i,n])}return n},d.prototype.getPublicKey=function(e){return f(this._pub,e)},d.prototype.getPrivateKey=function(e){return f(this._priv,e)},d.prototype.getPrime=function(e){return f(this.__prime,e)},d.prototype.getGenerator=function(e){return f(this._gen,e)},d.prototype.setGenerator=function(t,n){return n=n||"utf8",ne(t)||(t=new b(t,n)),this.__gen=t,this._gen=new e(t),this},mu}(),r={binary:!0,hex:!0,base64:!0};return tu.DiffieHellmanGroup=tu.createDiffieHellmanGroup=tu.getDiffieHellman=function(e){var r=new b(t[e].prime,"hex"),i=new b(t[e].gen,"hex");return new n(r,i)},tu.createDiffieHellman=tu.DiffieHellman=function t(i,o,s,a){return ne(o)||void 0===r[o]?t(i,"binary",o,s):(o=o||"binary",a=a||"binary",ne(s=s||new b([2]))||(s=new b(s,a)),"number"==typeof i?new n(e(i,s),s,!0):(ne(i)||(i=new b(i,o)),new n(i,s,!0)))},tu}();he.DiffieHellmanGroup=o.DiffieHellmanGroup,he.createDiffieHellmanGroup=o.createDiffieHellmanGroup,he.getDiffieHellman=o.getDiffieHellman,he.createDiffieHellman=o.createDiffieHellman,he.DiffieHellman=o.DiffieHellman;var s=function(){if(Ym)return $m;Ym=1;var e=Fe.Buffer,t=Fo,n=wc,r=Ve,i=function(){if(Km)return Ac.exports;Km=1;var e=Fe.Buffer,t=rs,n=Cc,r=tp().ec,i=Ec,o=zm,s=Gm;function a(n,r,i,o){if((n=e.from(n.toArray())).length<r.byteLength()){var s=e.alloc(r.byteLength()-n.length);n=e.concat([s,n])}var a=i.length,u=function(t,n){t=(t=l(t,n)).mod(n);var r=e.from(t.toArray());if(r.length<n.byteLength()){var i=e.alloc(n.byteLength()-r.length);r=e.concat([i,r])}return r}(i,r),c=e.alloc(a);c.fill(1);var h=e.alloc(a);return h=t(o,h).update(c).update(e.from([0])).update(n).update(u).digest(),c=t(o,h).update(c).digest(),{k:h=t(o,h).update(c).update(e.from([1])).update(n).update(u).digest(),v:c=t(o,h).update(c).digest()}}function l(e,t){var n=new i(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function u(n,r,i){var o,s;do{for(o=e.alloc(0);8*o.length<n.bitLength();)r.v=t(i,r.k).update(r.v).digest(),o=e.concat([o,r.v]);s=l(o,n),r.k=t(i,r.k).update(r.v).update(e.from([0])).digest(),r.v=t(i,r.k).update(r.v).digest()}while(-1!==s.cmp(n));return s}function c(e,t,n,r){return e.toRed(i.mont(n)).redPow(t).fromRed().mod(r)}return Ac.exports=function(t,h,d,f,p){var m=o(h);if(m.curve){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong private key type");return function(t,n){var i=s[n.curve.join(".")];if(!i)throw new Error("unknown curve "+n.curve.join("."));var o=new r(i).keyFromPrivate(n.privateKey).sign(t);return e.from(o.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==f)throw new Error("wrong private key type");return function(t,n,r){for(var o,s=n.params.priv_key,h=n.params.p,d=n.params.q,f=n.params.g,p=new i(0),m=l(t,d).mod(d),g=!1,v=a(s,d,t,r);!1===g;)p=c(f,o=u(d,v,r),h,d),0===(g=o.invm(d).imul(m.add(s.mul(p))).mod(d)).cmpn(0)&&(g=!1,p=new i(0));return function(t,n){t=t.toArray(),n=n.toArray(),128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n));var r=[48,t.length+n.length+4,2,t.length];return r=r.concat(t,[2,n.length],n),e.from(r)}(p,g)}(t,m,d)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong private key type");t=e.concat([p,t]);for(var g=m.modulus.byteLength(),v=[0,1];t.length+v.length+1<g;)v.push(255);v.push(0);for(var y=-1;++y<t.length;)v.push(t[y]);return n(v,m)},Ac.exports.getKey=a,Ac.exports.makeKey=u,Ac.exports}(),o=function(){if(Wm)return Vm;Wm=1;var e=Fe.Buffer,t=Ec,n=tp().ec,r=zm,i=Gm;function o(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}return Vm=function(s,a,l,u,c){var h=r(l);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var o=i[r.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var s=new n(o),a=r.data.subjectPrivateKey.data;return s.verify(t,e,a)}(s,a,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,n,i){var s=i.data.p,a=i.data.q,l=i.data.g,u=i.data.pub_key,c=r.signature.decode(e,"der"),h=c.s,d=c.r;o(h,a),o(d,a);var f=t.mont(s),p=h.invm(a);return 0===l.toRed(f).redPow(new t(n).mul(p).mod(a)).fromRed().mul(u.toRed(f).redPow(d.mul(p).mod(a)).fromRed()).mod(s).mod(a).cmp(d)}(s,a,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");a=e.concat([c,a]);for(var d=h.modulus.byteLength(),f=[1],p=0;a.length+f.length+2<d;)f.push(255),p++;f.push(0);for(var m=-1;++m<a.length;)f.push(a[m]);f=e.from(f);var g=t.mont(h.modulus);s=(s=new t(s).toRed(g)).redPow(new t(h.publicExponent)),s=e.from(s.fromRed().toArray());var v=p<8?1:0;for(d=Math.min(s.length,f.length),s.length!==f.length&&(v=1),m=-1;++m<d;)v|=s[m]^f[m];return 0===v},Vm}(),s=is;function a(e){n.Writable.call(this);var r=s[e];if(!r)throw new Error("Unknown message digest");this._hashType=r.hash,this._hash=t(r.hash),this._tag=r.id,this._signType=r.sign}function l(e){n.Writable.call(this);var r=s[e];if(!r)throw new Error("Unknown message digest");this._hash=t(r.hash),this._tag=r.id,this._signType=r.sign}function u(e){return new a(e)}function c(e){return new l(e)}return Object.keys(s).forEach((function(t){s[t].id=e.from(s[t].id,"hex"),s[t.toLowerCase()]=s[t]})),r(a,n.Writable),a.prototype._write=function(e,t,n){this._hash.update(e),n()},a.prototype.update=function(t,n){return"string"==typeof t&&(t=e.from(t,n)),this._hash.update(t),this},a.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=i(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},r(l,n.Writable),l.prototype._write=function(e,t,n){this._hash.update(e),n()},l.prototype.update=function(t,n){return"string"==typeof t&&(t=e.from(t,n)),this._hash.update(t),this},l.prototype.verify=function(t,n,r){"string"==typeof n&&(n=e.from(n,r)),this.end();var i=this._hash.digest();return o(n,i,t,this._signType,this._tag)},$m={Sign:u,Verify:c,createSign:u,createVerify:c}}();he.createSign=s.createSign,he.Sign=s.Sign,he.createVerify=s.createVerify,he.Verify=s.Verify,he.createECDH=function(){if(Jm)return Qm;Jm=1;var e=tp(),t=Xm;Qm=function(e){return new r(e)};var n={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function r(t){this.curveType=n[t],this.curveType||(this.curveType={name:t}),this.curve=new e.ec(this.curveType.name),this.keys=void 0}function i(e,t,n){Array.isArray(e)||(e=e.toArray());var r=new b(e);if(n&&r.length<n){var i=new b(n-r.length);i.fill(0),r=b.concat([i,r])}return t?r.toString(t):r}return n.p224=n.secp224r1,n.p256=n.secp256r1=n.prime256v1,n.p192=n.secp192r1=n.prime192v1,n.p384=n.secp384r1,n.p521=n.secp521r1,r.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},r.prototype.computeSecret=function(e,t,n){return t=t||"utf8",ne(e)||(e=new b(e,t)),i(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},r.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),i(n,e)},r.prototype.getPrivateKey=function(e){return i(this.keys.getPrivate(),e)},r.prototype.setPublicKey=function(e,t){return t=t||"utf8",ne(e)||(e=new b(e,t)),this.keys._importPublic(e),this},r.prototype.setPrivateKey=function(e,n){n=n||"utf8",ne(e)||(e=new b(e,n));var r=new t(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this},Qm}();var a=eg;he.publicEncrypt=a.publicEncrypt,he.privateEncrypt=a.privateEncrypt,he.publicDecrypt=a.publicDecrypt,he.privateDecrypt=a.privateDecrypt;var l=Og;return he.randomFill=l.randomFill,he.randomFillSync=l.randomFillSync,he.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},he.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},he}Bg&&Bg.getRandomValues?(Og.randomFill=function(e,t,n,r){if(!(Lg.isBuffer(e)||e instanceof oe.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)r=t,t=0,n=e.length;else if("function"==typeof n)r=n,n=e.length-t;else if("function"!=typeof r)throw new TypeError('"cb" argument must be a function');return jg(t,e.length),Fg(n,t,e.length),Ug(e,t,n,r)},Og.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(Lg.isBuffer(e)||e instanceof oe.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return jg(t,e.length),void 0===n&&(n=e.length-t),Fg(n,t,e.length),Ug(e,t,n)}):(Og.randomFill=Rg,Og.randomFillSync=Rg);const{Buffer:zg}=ce,{createHash:Hg,createHmac:Kg}=qg(),Vg={},Wg=e=>{switch(e){case"sha256":case"sha3-256":case"blake2s256":return 32;case"sha512":case"sha3-512":case"blake2b512":return 64;case"sha224":case"sha3-224":return 28;case"sha384":case"sha3-384":return 48;case"sha1":return 20;case"md5":return 16;default:{let t=Vg[e];return void 0===t&&(t=Hg(e).digest().length,Vg[e]=t),t}}},$g=(e,t,n,r)=>{const i=zg.isBuffer(n)?n:zg.from(n),o=r&&r.length?zg.from(r):zg.alloc(t,0);return Kg(e,o).update(i).digest()},Yg=(e,t,n,r,i)=>{const o=zg.isBuffer(i)?i:zg.from(i||""),s=o.length,a=Math.ceil(r/t);if(a>255)throw new Error(`OKM length ${r} is too long for ${e} hash`);const l=zg.alloc(t*a+s+1);for(let r=1,i=0,u=0;r<=a;++r)o.copy(l,u),l[u+s]=r,Kg(e,n).update(l.slice(i,u+s+1)).digest().copy(l,u),i=u,u+=t;return l.slice(0,r)};function Gg(e,t,{salt:n="",info:r="",hash:i="SHA-256"}={}){i=i.toLowerCase().replace("-","");const o=Wg(i),s=$g(i,o,e,n);return Yg(i,o,s,t,r)}Object.defineProperties(Gg,{hash_length:{configurable:!1,enumerable:!1,writable:!1,value:Wg},extract:{configurable:!1,enumerable:!1,writable:!1,value:$g},expand:{configurable:!1,enumerable:!1,writable:!1,value:Yg}});var Zg=Gg;const Qg="Impossible case. Please create issue.",Jg="The tweak was out of range or the resulted private key is invalid",Xg="The tweak was out of range or equal to zero",ev="Public Key could not be parsed",tv="Public Key serialization error",nv="Signature could not be parsed";function rv(e,t){if(!e)throw new Error(t)}function iv(e,t,n){if(rv(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;rv(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;rv(t.length===n,r)}}function ov(e){rv("Boolean"===av(e),"Expected compressed to be a Boolean")}function sv(e=(e=>new Uint8Array(e)),t){return"function"==typeof e&&(e=e(t)),iv("output",e,t),e}function av(e){return Object.prototype.toString.call(e).slice(8,-1)}const lv=new(tp().ec)("secp256k1"),uv=lv.curve,cv=uv.n.constructor;function hv(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){let n=new cv(t);if(n.cmp(uv.p)>=0)return null;n=n.toRed(uv.red);let r=n.redSqr().redIMul(n).redIAdd(uv.b).redSqrt();return 3===e!==r.isOdd()&&(r=r.redNeg()),lv.keyPair({pub:{x:n,y:r}})}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,n){let r=new cv(t),i=new cv(n);if(r.cmp(uv.p)>=0||i.cmp(uv.p)>=0)return null;if(r=r.toRed(uv.red),i=i.toRed(uv.red),(6===e||7===e)&&i.isOdd()!==(7===e))return null;const o=r.redSqr().redIMul(r);return i.redSqr().redISub(o.redIAdd(uv.b)).isZero()?lv.keyPair({pub:{x:r,y:i}}):null}(t,e.subarray(1,33),e.subarray(33,65));default:return null}}function dv(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}var fv={contextRandomize:()=>0,privateKeyVerify(e){const t=new cv(e);return t.cmp(uv.n)<0&&!t.isZero()?0:1},privateKeyNegate(e){const t=new cv(e),n=uv.n.sub(t).umod(uv.n).toArrayLike(Uint8Array,"be",32);return e.set(n),0},privateKeyTweakAdd(e,t){const n=new cv(t);if(n.cmp(uv.n)>=0)return 1;if(n.iadd(new cv(e)),n.cmp(uv.n)>=0&&n.isub(uv.n),n.isZero())return 1;const r=n.toArrayLike(Uint8Array,"be",32);return e.set(r),0},privateKeyTweakMul(e,t){let n=new cv(t);if(n.cmp(uv.n)>=0||n.isZero())return 1;n.imul(new cv(e)),n.cmp(uv.n)>=0&&(n=n.umod(uv.n));const r=n.toArrayLike(Uint8Array,"be",32);return e.set(r),0},publicKeyVerify:e=>null===hv(e)?1:0,publicKeyCreate(e,t){const n=new cv(t);return n.cmp(uv.n)>=0||n.isZero()?1:(dv(e,lv.keyFromPrivate(t).getPublic()),0)},publicKeyConvert(e,t){const n=hv(t);return null===n?1:(dv(e,n.getPublic()),0)},publicKeyNegate(e,t){const n=hv(t);if(null===n)return 1;const r=n.getPublic();return r.y=r.y.redNeg(),dv(e,r),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=hv(t[e]),null===n[e])return 1;let r=n[0].getPublic();for(let e=1;e<n.length;++e)r=r.add(n[e].pub);return r.isInfinity()?2:(dv(e,r),0)},publicKeyTweakAdd(e,t,n){const r=hv(t);if(null===r)return 1;if((n=new cv(n)).cmp(uv.n)>=0)return 2;const i=r.getPublic().add(uv.g.mul(n));return i.isInfinity()?2:(dv(e,i),0)},publicKeyTweakMul(e,t,n){const r=hv(t);return null===r?1:(n=new cv(n)).cmp(uv.n)>=0||n.isZero()?2:(dv(e,r.getPublic().mul(n)),0)},signatureNormalize(e){const t=new cv(e.subarray(0,32)),n=new cv(e.subarray(32,64));return t.cmp(uv.n)>=0||n.cmp(uv.n)>=0?1:(1===n.cmp(lv.nh)&&e.set(uv.n.sub(n).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,t){const n=t.subarray(0,32),r=t.subarray(32,64);if(new cv(n).cmp(uv.n)>=0)return 1;if(new cv(r).cmp(uv.n)>=0)return 1;const{output:i}=e;let o=i.subarray(4,37);o[0]=0,o.set(n,1);let s=33,a=0;for(;s>1&&0===o[a]&&!(128&o[a+1]);--s,++a);if(o=o.subarray(a),128&o[0])return 1;if(s>1&&0===o[0]&&!(128&o[1]))return 1;let l=i.subarray(39,72);l[0]=0,l.set(r,1);let u=33,c=0;for(;u>1&&0===l[c]&&!(128&l[c+1]);--u,++c);return l=l.subarray(c),128&l[0]||u>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+s+u,i[0]=48,i[1]=e.outputlen-2,i[2]=2,i[3]=o.length,i.set(o,4),i[4+s]=2,i[5+s]=l.length,i.set(l,6+s),0)},signatureImport(e,t){if(t.length<8)return 1;if(t.length>72)return 1;if(48!==t[0])return 1;if(t[1]!==t.length-2)return 1;if(2!==t[2])return 1;const n=t[3];if(0===n)return 1;if(5+n>=t.length)return 1;if(2!==t[4+n])return 1;const r=t[5+n];if(0===r)return 1;if(6+n+r!==t.length)return 1;if(128&t[4])return 1;if(n>1&&0===t[4]&&!(128&t[5]))return 1;if(128&t[n+6])return 1;if(r>1&&0===t[n+6]&&!(128&t[n+7]))return 1;let i=t.subarray(4,4+n);if(33===i.length&&0===i[0]&&(i=i.subarray(1)),i.length>32)return 1;let o=t.subarray(6+n);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let s=new cv(i);s.cmp(uv.n)>=0&&(s=new cv(0));let a=new cv(t.subarray(6+n));return a.cmp(uv.n)>=0&&(a=new cv(0)),e.set(s.toArrayLike(Uint8Array,"be",32),0),e.set(a.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(e,t,n,r,i){if(i){const e=i;i=i=>{const o=e(t,n,null,r,i);if(!(o instanceof Uint8Array&&32===o.length))throw new Error("This is the way");return new cv(o)}}const o=new cv(n);if(o.cmp(uv.n)>=0||o.isZero())return 1;let s;try{s=lv.sign(t,n,{canonical:!0,k:i,pers:r})}catch(e){return 1}return e.signature.set(s.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(s.s.toArrayLike(Uint8Array,"be",32),32),e.recid=s.recoveryParam,0},ecdsaVerify(e,t,n){const r={r:e.subarray(0,32),s:e.subarray(32,64)},i=new cv(r.r),o=new cv(r.s);if(i.cmp(uv.n)>=0||o.cmp(uv.n)>=0)return 1;if(1===o.cmp(lv.nh)||i.isZero()||o.isZero())return 3;const s=hv(n);if(null===s)return 2;const a=s.getPublic();return lv.verify(t,r,a)?0:3},ecdsaRecover(e,t,n,r){const i={r:t.slice(0,32),s:t.slice(32,64)},o=new cv(i.r),s=new cv(i.s);if(o.cmp(uv.n)>=0||s.cmp(uv.n)>=0)return 1;if(o.isZero()||s.isZero())return 2;let a;try{a=lv.recoverPubKey(r,i,n)}catch(e){return 2}return dv(e,a),0},ecdh(e,t,n,r,i,o,s){const a=hv(t);if(null===a)return 1;const l=new cv(n);if(l.cmp(uv.n)>=0||l.isZero())return 2;const u=a.getPublic().mul(l);if(void 0===i){const t=u.encode(null,!0),n=lv.hash().update(t).digest();for(let t=0;t<32;++t)e[t]=n[t]}else{o||(o=new Uint8Array(32));const t=u.getX().toArray("be",32);for(let e=0;e<32;++e)o[e]=t[e];s||(s=new Uint8Array(32));const n=u.getY().toArray("be",32);for(let e=0;e<32;++e)s[e]=n[e];const a=i(o,s,r);if(!(a instanceof Uint8Array&&a.length===e.length))return 2;e.set(a)}return 0}},pv=(e=>({contextRandomize(t){if(rv(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&iv("seed",t,32),1===e.contextRandomize(t))throw new Error("Unknow error on context randomization")},privateKeyVerify:t=>(iv("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(t){switch(iv("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(Qg)}},privateKeyTweakAdd(t,n){switch(iv("private key",t,32),iv("tweak",n,32),e.privateKeyTweakAdd(t,n)){case 0:return t;case 1:throw new Error(Jg)}},privateKeyTweakMul(t,n){switch(iv("private key",t,32),iv("tweak",n,32),e.privateKeyTweakMul(t,n)){case 0:return t;case 1:throw new Error(Xg)}},publicKeyVerify:t=>(iv("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t,n=!0,r){switch(iv("private key",t,32),ov(n),r=sv(r,n?33:65),e.publicKeyCreate(r,t)){case 0:return r;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(tv)}},publicKeyConvert(t,n=!0,r){switch(iv("public key",t,[33,65]),ov(n),r=sv(r,n?33:65),e.publicKeyConvert(r,t)){case 0:return r;case 1:throw new Error(ev);case 2:throw new Error(tv)}},publicKeyNegate(t,n=!0,r){switch(iv("public key",t,[33,65]),ov(n),r=sv(r,n?33:65),e.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(ev);case 2:throw new Error(Qg);case 3:throw new Error(tv)}},publicKeyCombine(t,n=!0,r){rv(Array.isArray(t),"Expected public keys to be an Array"),rv(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)iv("public key",e,[33,65]);switch(ov(n),r=sv(r,n?33:65),e.publicKeyCombine(r,t)){case 0:return r;case 1:throw new Error(ev);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(tv)}},publicKeyTweakAdd(t,n,r=!0,i){switch(iv("public key",t,[33,65]),iv("tweak",n,32),ov(r),i=sv(i,r?33:65),e.publicKeyTweakAdd(i,t,n)){case 0:return i;case 1:throw new Error(ev);case 2:throw new Error(Jg)}},publicKeyTweakMul(t,n,r=!0,i){switch(iv("public key",t,[33,65]),iv("tweak",n,32),ov(r),i=sv(i,r?33:65),e.publicKeyTweakMul(i,t,n)){case 0:return i;case 1:throw new Error(ev);case 2:throw new Error(Xg)}},signatureNormalize(t){switch(iv("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(nv)}},signatureExport(t,n){iv("signature",t,64);const r={output:n=sv(n,72),outputlen:72};switch(e.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(nv);case 2:throw new Error(Qg)}},signatureImport(t,n){switch(iv("signature",t),n=sv(n,64),e.signatureImport(n,t)){case 0:return n;case 1:throw new Error(nv);case 2:throw new Error(Qg)}},ecdsaSign(t,n,r={},i){iv("message",t,32),iv("private key",n,32),rv("Object"===av(r),"Expected options to be an Object"),void 0!==r.data&&iv("options.data",r.data),void 0!==r.noncefn&&rv("Function"===av(r.noncefn),"Expected options.noncefn to be a Function");const o={signature:i=sv(i,64),recid:null};switch(e.ecdsaSign(o,t,n,r.data,r.noncefn)){case 0:return o;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(Qg)}},ecdsaVerify(t,n,r){switch(iv("signature",t,64),iv("message",n,32),iv("public key",r,[33,65]),e.ecdsaVerify(t,n,r)){case 0:return!0;case 3:return!1;case 1:throw new Error(nv);case 2:throw new Error(ev)}},ecdsaRecover(t,n,r,i=!0,o){switch(iv("signature",t,64),rv("Number"===av(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),iv("message",r,32),ov(i),o=sv(o,i?33:65),e.ecdsaRecover(o,t,n,r)){case 0:return o;case 1:throw new Error(nv);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(Qg)}},ecdh(t,n,r={},i){switch(iv("public key",t,[33,65]),iv("private key",n,32),rv("Object"===av(r),"Expected options to be an Object"),void 0!==r.data&&iv("options.data",r.data),void 0!==r.hashfn?(rv("Function"===av(r.hashfn),"Expected options.hashfn to be a Function"),void 0!==r.xbuf&&iv("options.xbuf",r.xbuf,32),void 0!==r.ybuf&&iv("options.ybuf",r.ybuf,32),iv("output",i)):i=sv(i,32),e.ecdh(i,t,n,r.data,r.hashfn,r.xbuf,r.ybuf)){case 0:return i;case 1:throw new Error(ev);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}}))(fv),mv={},gv={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SECRET_KEY_LENGTH=e.AES_IV_PLUS_TAG_LENGTH=e.AES_TAG_LENGTH=e.AES_IV_LENGTH=e.UNCOMPRESSED_PUBLIC_KEY_SIZE=void 0,e.UNCOMPRESSED_PUBLIC_KEY_SIZE=65,e.AES_IV_LENGTH=16,e.AES_TAG_LENGTH=16,e.AES_IV_PLUS_TAG_LENGTH=e.AES_IV_LENGTH+e.AES_TAG_LENGTH,e.SECRET_KEY_LENGTH=32}(gv);var vv=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mv,"__esModule",{value:!0}),mv.aesDecrypt=mv.aesEncrypt=mv.getValidSecret=mv.decodeHex=mv.remove0x=void 0;var yv=qg(),bv=vv(pv),wv=gv;function Av(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}mv.remove0x=Av,mv.decodeHex=function(e){return b.from(Av(e),"hex")},mv.getValidSecret=function(){var e;do{e=(0,yv.randomBytes)(wv.SECRET_KEY_LENGTH)}while(!bv.default.privateKeyVerify(e));return e},mv.aesEncrypt=function(e,t){var n=(0,yv.randomBytes)(wv.AES_IV_LENGTH),r=(0,yv.createCipheriv)("aes-256-gcm",e,n),i=b.concat([r.update(t),r.final()]),o=r.getAuthTag();return b.concat([n,o,i])},mv.aesDecrypt=function(e,t){var n=t.slice(0,wv.AES_IV_LENGTH),r=t.slice(wv.AES_IV_LENGTH,wv.AES_IV_PLUS_TAG_LENGTH),i=t.slice(wv.AES_IV_PLUS_TAG_LENGTH),o=(0,yv.createDecipheriv)("aes-256-gcm",e,n);return o.setAuthTag(r),b.concat([o.update(i),o.final()])};var _v={},Ev=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_v,"__esModule",{value:!0});var Mv=Ev(Zg),kv=Ev(pv),Sv=mv,xv=gv,Cv=function(){function e(e){this.uncompressed=b.from(kv.default.publicKeyConvert(e,!1)),this.compressed=b.from(kv.default.publicKeyConvert(e,!0))}return e.fromHex=function(t){var n=(0,Sv.decodeHex)(t);if(n.length===xv.UNCOMPRESSED_PUBLIC_KEY_SIZE-1){var r=b.from([4]);return new e(b.concat([r,n]))}return new e(n)},e.prototype.toHex=function(e){return void 0===e&&(e=!0),e?this.compressed.toString("hex"):this.uncompressed.toString("hex")},e.prototype.decapsulate=function(e){var t=b.concat([this.uncompressed,e.multiply(this)]);return(0,Mv.default)(t,32,{hash:"SHA-256"})},e.prototype.equals=function(e){return this.uncompressed.equals(e.uncompressed)},e}();_v.default=Cv;var Tv=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});var Ov=Tv(Zg),Rv=Tv(pv),Pv=mv,Nv=Tv(_v),Lv=function(){function e(e){if(this.secret=e||(0,Pv.getValidSecret)(),!Rv.default.privateKeyVerify(this.secret))throw new Error("Invalid private key");this.publicKey=new Nv.default(b.from(Rv.default.publicKeyCreate(this.secret)))}return e.fromHex=function(t){return new e((0,Pv.decodeHex)(t))},e.prototype.toHex=function(){return"0x".concat(this.secret.toString("hex"))},e.prototype.encapsulate=function(e){var t=b.concat([this.publicKey.uncompressed,this.multiply(e)]);return(0,Ov.default)(t,32,{hash:"SHA-256"})},e.prototype.multiply=function(e){return b.from(Rv.default.publicKeyTweakMul(e.compressed,this.secret,!1))},e.prototype.equals=function(e){return this.secret.equals(e.secret)},e}();ue.default=Lv,function(e){var t=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKey=e.PrivateKey=void 0;var n=ue;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return t(n).default}});var r=_v;Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return t(r).default}})}(le),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.PublicKey=e.PrivateKey=e.decrypt=e.encrypt=void 0;var t=le,n=mv,r=gv;e.encrypt=function(e,r){var i=new t.PrivateKey,o=e instanceof b?new t.PublicKey(e):t.PublicKey.fromHex(e),s=i.encapsulate(o),a=(0,n.aesEncrypt)(s,r);return b.concat([i.publicKey.uncompressed,a])},e.decrypt=function(e,i){var o=e instanceof b?new t.PrivateKey(e):t.PrivateKey.fromHex(e),s=new t.PublicKey(i.slice(0,r.UNCOMPRESSED_PUBLIC_KEY_SIZE)),a=i.slice(r.UNCOMPRESSED_PUBLIC_KEY_SIZE),l=s.decapsulate(o);return(0,n.aesDecrypt)(l,a)};var i=le;Object.defineProperty(e,"PrivateKey",{enumerable:!0,get:function(){return i.PrivateKey}}),Object.defineProperty(e,"PublicKey",{enumerable:!0,get:function(){return i.PublicKey}}),e.utils={aesDecrypt:n.aesDecrypt,aesEncrypt:n.aesEncrypt,decodeHex:n.decodeHex,getValidSecret:n.getValidSecret,remove0x:n.remove0x}}(ae);class Iv{constructor(e){this.enabled=!0,this.debug=!1,(null==e?void 0:e.debug)&&(this.debug=e.debug),(null==e?void 0:e.pkey)?this.ecies=ae.PrivateKey.fromHex(e.pkey):this.ecies=new ae.PrivateKey,this.debug&&(console.info("[ECIES] initialized secret: ",this.ecies.toHex()),console.info("[ECIES] initialized public: ",this.ecies.publicKey.toHex()),console.info("[ECIES] init with",this))}generateECIES(){this.ecies=new ae.PrivateKey}getPublicKey(){return this.ecies.publicKey.toHex()}encrypt(e,t){let n=e;if(this.enabled)try{const r=b.from(e),i=ae.encrypt(t,r);n=b.from(i).toString("base64")}catch(n){throw this.debug&&(console.error("error encrypt:",n),console.error("private: ",this.ecies.toHex()),console.error("data: ",e),console.error("otherkey: ",t)),n}return n}decrypt(e){let t=e;if(this.enabled)try{const n=b.from(e.toString(),"base64");t=ae.decrypt(this.ecies.toHex(),n).toString()}catch(t){throw this.debug&&(console.error("error decrypt",t),console.error("private: ",this.ecies.toHex()),console.error("encryptedData: ",e)),t}return t}getKeyInfo(){return{private:this.ecies.toHex(),public:this.ecies.publicKey.toHex()}}toString(){console.debug("ECIES::toString()",this.getKeyInfo())}}function Bv(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))}var Dv={exports:{}};!function(e,t){!function(t){var n=Object.hasOwnProperty,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof Be&&!0,o="function"==typeof Symbol,s="object"==typeof Reflect,a="function"==typeof setImmediate?setImmediate:setTimeout,l=o?s&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function u(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==Be&&Be.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,Be.emitWarning(r)}else console.error(n),console.trace&&console.trace()}var d=function(e,t,n){var r=arguments.length;switch(r){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var i=new Array(r);r--;)i[r]=arguments[r];return i}};function f(e,n){for(var r={},i=e.length,o=n?n.length:0,s=0;s<i;s++)r[e[s]]=s<o?n[s]:t;return r}function p(e,t,n){var r,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(r=n.on,i=n.off),t.addEventListener?(r=t.addEventListener,i=t.removeEventListener):t.addListener?(r=t.addListener,i=t.removeListener):t.on&&(r=t.on,i=t.off),!r&&!i)throw Error("target does not implement any known event API");if("function"!=typeof r)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=r,this._off=i;var o=e._observers;o?o.push(this):e._observers=[this]}function m(e,r,i,o){var s=Object.assign({},r);if(!e)return s;if("object"!=typeof e)throw TypeError("options must be an object");var a,l,u,c=Object.keys(e),h=c.length;function d(e){throw Error('Invalid "'+a+'" option value'+(e?". Reason: "+e:""))}for(var f=0;f<h;f++){if(a=c[f],!o&&!n.call(r,a))throw Error('Unknown "'+a+'" option');(l=e[a])!==t&&(u=i[a],s[a]=u?u(l,d):l)}return s}function g(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function v(e){var t="value must be type of "+e.join("|"),n=e.length,r=e[0],i=e[1];return 1===n?function(e,n){if(typeof e===r)return e;n(t)}:2===n?function(e,n){var o=typeof e;if(o===r||o===i)return e;n(t)}:function(r,i){for(var o=typeof r,s=n;s-- >0;)if(o===e[s])return r;i(t)}}Object.assign(p.prototype,{subscribe:function(e,t,n){var r=this,i=this._target,o=this._emitter,s=this._listeners,a=function(){var r=d.apply(null,arguments),s={data:r,name:t,original:e};n?!1!==n.call(i,s)&&o.emit.apply(o,[s.name].concat(r)):o.emit.apply(o,[t].concat(r))};if(s[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!r._onNewListener?(this._onNewListener=function(n){n===t&&null===s[e]&&(s[e]=a,r._on.call(i,e,a))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!o.hasListeners(n)&&s[e]&&(s[e]=null,r._off.call(i,e,a))},s[e]=null,o.on("removeListener",this._onRemoveListener)):(s[e]=a,r._on.call(i,e,a))},unsubscribe:function(e){var t,n,r,i=this,o=this._listeners,s=this._emitter,a=this._off,u=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function c(){i._onNewListener&&(s.off("newListener",i._onNewListener),s.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=A.call(s,i);s._observers.splice(e,1)}if(e){if(!(t=o[e]))return;a.call(u,e,t),delete o[e],--this._listenersCount||c()}else{for(r=(n=l(o)).length;r-- >0;)e=n[r],a.call(u,e,o[e]);this._listeners={},this._listenersCount=0,c()}}});var y=v(["function"]),b=v(["object","function"]);function w(e,t,n){var r,i,o,s=0,a=new e((function(l,u,c){function h(){i&&(i=null),s&&(clearTimeout(s),s=0)}n=m(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),r=!n.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof c;var d=function(e){h(),l(e)},f=function(e){h(),u(e)};r?t(d,f,c):(i=[function(e){f(e||Error("canceled"))}],t(d,f,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),n.timeout>0&&(s=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",s=0,a.cancel(e),u(e)}),n.timeout))}));return r||(a.cancel=function(e){if(i){for(var t=i.length,n=1;n<t;n++)i[n](e);i[0](e),i=null}}),a}function A(e){var t=this._observers;if(!t)return-1;for(var n=t.length,r=0;r<n;r++)if(t[r]._target===e)return r;return-1}function _(e,t,n,r,i){if(!n)return null;if(0===r){var o=typeof t;if("string"===o){var s,a,u=0,c=0,h=this.delimiter,d=h.length;if(-1!==(a=t.indexOf(h))){s=new Array(5);do{s[u++]=t.slice(c,a),c=a+d}while(-1!==(a=t.indexOf(h,c)));s[u++]=t.slice(c),t=s,i=u}else t=[t],i=1}else"object"===o?i=t.length:(t=[t],i=1)}var f,p,m,g,v,y,b,w=null,A=t[r],E=t[r+1];if(r===i)n._listeners&&("function"==typeof n._listeners?(e&&e.push(n._listeners),w=[n]):(e&&e.push.apply(e,n._listeners),w=[n]));else{if("*"===A){for(a=(y=l(n)).length;a-- >0;)"_listeners"!==(f=y[a])&&(b=_(e,t,n[f],r+1,i))&&(w?w.push.apply(w,b):w=b);return w}if("**"===A){for((v=r+1===i||r+2===i&&"*"===E)&&n._listeners&&(w=_(e,t,n,i,i)),a=(y=l(n)).length;a-- >0;)"_listeners"!==(f=y[a])&&("*"===f||"**"===f?(n[f]._listeners&&!v&&(b=_(e,t,n[f],i,i))&&(w?w.push.apply(w,b):w=b),b=_(e,t,n[f],r,i)):b=_(e,t,n[f],f===E?r+2:r,i),b&&(w?w.push.apply(w,b):w=b));return w}n[A]&&(w=_(e,t,n[A],r+1,i))}if((p=n["*"])&&_(e,t,p,r+1,i),m=n["**"])if(r<i)for(m._listeners&&_(e,t,m,i,i),a=(y=l(m)).length;a-- >0;)"_listeners"!==(f=y[a])&&(f===E?_(e,t,m[f],r+2,i):f===A?_(e,t,m[f],r+1,i):((g={})[f]=m[f],_(e,t,{"**":g},r+1,i)));else m._listeners?_(e,t,m,i,i):m["*"]&&m["*"]._listeners&&_(e,t,m["*"],i,i);return w}function E(e,t,n){var r,i,o=0,s=0,a=this.delimiter,l=a.length;if("string"==typeof e)if(-1!==(r=e.indexOf(a))){i=new Array(5);do{i[o++]=e.slice(s,r),s=r+l}while(-1!==(r=e.indexOf(a,s)));i[o++]=e.slice(s)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(r=0;r+1<o;r++)if("**"===i[r]&&"**"===i[r+1])return;var u,c=this.listenerTree;for(r=0;r<o;r++)if(c=c[u=i[r]]||(c[u]={}),r===o-1)return c._listeners?("function"==typeof c._listeners&&(c._listeners=[c._listeners]),n?c._listeners.unshift(t):c._listeners.push(t),!c._listeners.warned&&this._maxListeners>0&&c._listeners.length>this._maxListeners&&(c._listeners.warned=!0,h.call(this,c._listeners.length,u))):c._listeners=t,!0;return!0}function M(e,t,n,r){for(var i,o,s,a,u=l(e),c=u.length,h=e._listeners;c-- >0;)i=e[o=u[c]],s="_listeners"===o?n:n?n.concat(o):[o],a=r||"symbol"==typeof o,h&&t.push(a?s:s.join(this.delimiter)),"object"==typeof i&&M.call(this,i,t,s,a);return t}function k(e){for(var t,n,r,i=l(e),o=i.length;o-- >0;)(t=e[n=i[o]])&&(r=!0,"_listeners"===n||k(t)||delete e[n]);return r}function S(e,t,n){this.emitter=e,this.event=t,this.listener=n}function x(e,n,r){if(!0===r)s=!0;else if(!1===r)o=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var o=r.async,s=r.promisify,l=r.nextTick,u=r.objectify}if(o||l||s){var c=n,h=n._origin||n;if(l&&!i)throw Error("process.nextTick is not supported");s===t&&(s="AsyncFunction"===n.constructor.name),n=function(){var e=arguments,t=this,n=this.event;return s?l?Promise.resolve():new Promise((function(e){a(e)})).then((function(){return t.event=n,c.apply(t,e)})):(l?Ee:a)((function(){t.event=n,c.apply(t,e)}))},n._async=!0,n._origin=h}return[n,u?new S(this,e,n):this]}function C(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}S.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},C.EventEmitter2=C,C.prototype.listenTo=function(e,n,i){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function s(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,r=i.reducers,s=A.call(o,e);n=-1===s?new p(o,e,i):o._observers[s];for(var a,u=l(t),c=u.length,h="function"==typeof r,d=0;d<c;d++)a=u[d],n.subscribe(a,t[a]||a,h?r:r&&r[a])}return i=m(i,{on:t,off:t,reducers:t},{on:y,off:y,reducers:b}),r(n)?s(f(n)):s("string"==typeof n?f(n.split(/\s+/)):n),this},C.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var r,i=n.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)r=n[i],e&&r._target!==e||(r.unsubscribe(t),o=!0);return o},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},C.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},C.prototype._once=function(e,t,n,r){return this._many(e,1,t,n,r)},C.prototype.many=function(e,t,n,r){return this._many(e,t,n,!1,r)},C.prototype.prependMany=function(e,t,n,r){return this._many(e,t,n,!0,r)},C.prototype._many=function(e,t,n,r,i){var o=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function s(){return 0==--t&&o.off(e,s),n.apply(this,arguments)}return s._origin=n,this._on(e,s,r,i)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,n,r,i,s,a=arguments[0],l=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return!1;if(l&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"==typeof a)){if(n=a.length,o)for(r=0;r<n;r++)if("symbol"==typeof a[r]){s=!0;break}s||(a=a.join(this.delimiter))}var c,h=arguments.length;if(this._all&&this._all.length)for(r=0,n=(c=this._all.slice()).length;r<n;r++)switch(this.event=a,h){case 1:c[r].call(this,a);break;case 2:c[r].call(this,a,arguments[1]);break;case 3:c[r].call(this,a,arguments[1],arguments[2]);break;default:c[r].apply(this,arguments)}if(l)c=[],_.call(this,c,e,this.listenerTree,0,n);else{if("function"==typeof(c=this._events[a])){switch(this.event=a,h){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(h-1),i=1;i<h;i++)t[i-1]=arguments[i];c.apply(this,t)}return!0}c&&(c=c.slice())}if(c&&c.length){if(h>3)for(t=new Array(h-1),i=1;i<h;i++)t[i-1]=arguments[i];for(r=0,n=c.length;r<n;r++)switch(this.event=a,h){case 1:c[r].call(this);break;case 2:c[r].call(this,arguments[1]);break;case 3:c[r].call(this,arguments[1],arguments[2]);break;default:c[r].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===a)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},C.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,n,r,i,s,a=arguments[0],l=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(l&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"==typeof a)){if(r=a.length,o)for(i=0;i<r;i++)if("symbol"==typeof a[i]){t=!0;break}t||(a=a.join(this.delimiter))}var c,h=[],d=arguments.length;if(this._all)for(i=0,r=this._all.length;i<r;i++)switch(this.event=a,d){case 1:h.push(this._all[i].call(this,a));break;case 2:h.push(this._all[i].call(this,a,arguments[1]));break;case 3:h.push(this._all[i].call(this,a,arguments[1],arguments[2]));break;default:h.push(this._all[i].apply(this,arguments))}if(l?(c=[],_.call(this,c,e,this.listenerTree,0)):c=this._events[a],"function"==typeof c)switch(this.event=a,d){case 1:h.push(c.call(this));break;case 2:h.push(c.call(this,arguments[1]));break;case 3:h.push(c.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(d-1),s=1;s<d;s++)n[s-1]=arguments[s];h.push(c.apply(this,n))}else if(c&&c.length){if(c=c.slice(),d>3)for(n=new Array(d-1),s=1;s<d;s++)n[s-1]=arguments[s];for(i=0,r=c.length;i<r;i++)switch(this.event=a,d){case 1:h.push(c[i].call(this));break;case 2:h.push(c[i].call(this,arguments[1]));break;case 3:h.push(c[i].call(this,arguments[1],arguments[2]));break;default:h.push(c[i].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===a)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(h)},C.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},C.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},C.prototype.onAny=function(e){return this._onAny(e,!1)},C.prototype.prependAny=function(e){return this._onAny(e,!0)},C.prototype.addListener=C.prototype.on,C.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},C.prototype._on=function(e,n,r,i){if("function"==typeof e)return this._onAny(e,n),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");this._events||u.call(this);var o,s=this;return i!==t&&(n=(o=x.call(this,e,n,i))[0],s=o[1]),this._newListener&&this.emit("newListener",e,n),this.wildcard?(E.call(this,e,n,r),s):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(n):this._events[e].push(n),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,h.call(this,this._events[e].length,e))):this._events[e]=n,s)},C.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=_.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var s=0;s<i.length;s++){var a=i[s];if(n=a._listeners,r(n)){for(var l=-1,u=0,c=n.length;u<c;u++)if(n[u]===t||n[u].listener&&n[u].listener===t||n[u]._origin&&n[u]._origin===t){l=u;break}if(l<0)continue;return this.wildcard?a._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete a._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete a._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&k(this.listenerTree),this},C.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(n=0,r=(t=this._all).length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},C.prototype.removeListener=C.prototype.off,C.prototype.removeAllListeners=function(e){if(e===t)return!this._events||u.call(this),this;if(this.wildcard){var n,r=_.call(this,null,e,this.listenerTree,0);if(!r)return this;for(n=0;n<r.length;n++)r[n]._listeners=null;this.listenerTree&&k(this.listenerTree)}else this._events&&(this._events[e]=null);return this},C.prototype.listeners=function(e){var n,r,i,o,s,a=this._events;if(e===t){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!a)return[];for(o=(n=l(a)).length,i=[];o-- >0;)"function"==typeof(r=a[n[o]])?i.push(r):i.push.apply(i,r);return i}if(this.wildcard){if(!(s=this.listenerTree))return[];var u=[],c="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,u,c,s,0),u}return a&&(r=a[e])?"function"==typeof r?[r]:r:[]},C.prototype.eventNames=function(e){var t=this._events;return this.wildcard?M.call(this,this.listenerTree,[],null,e):t?l(t):[]},C.prototype.listenerCount=function(e){return this.listeners(e).length},C.prototype.hasListeners=function(e){if(this.wildcard){var n=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,n,r,this.listenerTree,0),n.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(e===t?l(i).length:i[e]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(e,n){var r=this,i=typeof n;return"number"===i?n={timeout:n}:"function"===i&&(n={filter:n}),w((n=m(n,{timeout:0,filter:t,handleError:!1,Promise,overload:!1},{filter:y,Promise:g})).Promise,(function(t,i,o){function s(){var o=n.filter;if(!o||o.apply(r,arguments))if(r.off(e,s),n.handleError){var a=arguments[0];a?i(a):t(d.apply(null,arguments).slice(1))}else t(d.apply(null,arguments))}o((function(){r.off(e,s)})),r._on(e,s,!1)}),{timeout:n.timeout,overload:n.overload})};var T=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return T._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");T._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return w((n=m(n,{Promise,timeout:0,overload:!1},{Promise:g})).Promise,(function(n,r,i){var o;if("function"==typeof e.addEventListener)return o=function(){n(d.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var s,a=function(){s&&e.removeListener("error",s),n(d.apply(null,arguments))};"error"!==t&&(s=function(n){e.removeListener(t,a),r(n)},e.once("error",s)),i((function(){s&&e.removeListener("error",s),e.removeListener(t,a)})),e.once(t,a)}),{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(T,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof t&&t.amd?t((function(){return C})):e.exports=C}()}(Dv);var jv,Fv=Dv.exports,Uv=new Uint8Array(16);function qv(){if(!jv&&!(jv="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return jv(Uv)}var zv=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Hv(e){return"string"==typeof e&&zv.test(e)}for(var Kv=[],Vv=0;Vv<256;++Vv)Kv.push((Vv+256).toString(16).substr(1));function Wv(e,t,n){var r=(e=e||{}).random||(e.rng||qv)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Kv[e[t+0]]+Kv[e[t+1]]+Kv[e[t+2]]+Kv[e[t+3]]+"-"+Kv[e[t+4]]+Kv[e[t+5]]+"-"+Kv[e[t+6]]+Kv[e[t+7]]+"-"+Kv[e[t+8]]+Kv[e[t+9]]+"-"+Kv[e[t+10]]+Kv[e[t+11]]+Kv[e[t+12]]+Kv[e[t+13]]+Kv[e[t+14]]+Kv[e[t+15]]).toLowerCase();if(!Hv(n))throw TypeError("Stringified UUID is invalid");return n}(r)}var $v="0.3.2",Yv={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:oe,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=f(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=p(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=u(e),t=c(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},d.prototype.delete=function(e){delete this.map[u(e)]},d.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},d.prototype.set=function(e,t){this.map[u(e)]=c(t)},d.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),h(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),h(e)},r&&(d.prototype[Symbol.iterator]=d.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=function(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function A(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(A.prototype),A.prototype.clone=function(){return new A(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},A.error=function(){var e=new A(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];A.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new A(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function E(e,n){return new Promise((function(r,o){var s=new b(e,n);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new A(i,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",l)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}E.polyfill=!0,e.fetch||(e.fetch=E,e.Headers=d,e.Request=b,e.Response=A),t.Headers=d,t.Request=b,t.Response=A,t.fetch=E,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Yv,Yv.exports);var Gv=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Yv.exports);const Zv=(e,t)=>Bv(void 0,void 0,void 0,(function*(){const n=t.endsWith("/")?`${t}debug`:`${t}/debug`,r=JSON.stringify(e),i=yield Gv(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:r});return yield i.text()})),Qv="https://metamask-sdk-socket.metafi.codefi.network/",Jv=["polling","websocket"],Xv=6048e5,ey=Object.create(null);ey.open="0",ey.close="1",ey.ping="2",ey.pong="3",ey.message="4",ey.upgrade="5",ey.noop="6";const ty=Object.create(null);Object.keys(ey).forEach((e=>{ty[ey[e]]=e}));const ny={type:"error",data:"parser error"},ry="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),iy="function"==typeof ArrayBuffer,oy=({type:e,data:t},n,r)=>{return ry&&t instanceof Blob?n?r(t):sy(t,r):iy&&(t instanceof ArrayBuffer||(i=t,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer))?n?r(t):sy(new Blob([t]),r):r(ey[e]+(t||""));var i},sy=(e,t)=>{const n=new FileReader;return n.onload=function(){const e=n.result.split(",")[1];t("b"+(e||""))},n.readAsDataURL(e)},ay="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)ay["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;const ly="function"==typeof ArrayBuffer,uy=(e,t)=>{if("string"!=typeof e)return{type:"message",data:hy(e,t)};const n=e.charAt(0);return"b"===n?{type:"message",data:cy(e.substring(1),t)}:ty[n]?e.length>1?{type:ty[n],data:e.substring(1)}:{type:ty[n]}:ny},cy=(e,t)=>{if(ly){const n=(e=>{let t,n,r,i,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);const u=new ArrayBuffer(s),c=new Uint8Array(u);for(t=0;t<a;t+=4)n=ay[e.charCodeAt(t)],r=ay[e.charCodeAt(t+1)],i=ay[e.charCodeAt(t+2)],o=ay[e.charCodeAt(t+3)],c[l++]=n<<2|r>>4,c[l++]=(15&r)<<4|i>>2,c[l++]=(3&i)<<6|63&o;return u})(e);return hy(n,t)}return{base64:!0,data:e}},hy=(e,t)=>"blob"===t&&e instanceof ArrayBuffer?new Blob([e]):e,dy=String.fromCharCode(30);function fy(e){if(e)return function(e){for(var t in fy.prototype)e[t]=fy.prototype[t];return e}(e)}fy.prototype.on=fy.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},fy.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},fy.prototype.off=fy.prototype.removeListener=fy.prototype.removeAllListeners=fy.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},fy.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},fy.prototype.emitReserved=fy.prototype.emit,fy.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},fy.prototype.hasListeners=function(e){return!!this.listeners(e).length};const py="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function my(e,...t){return t.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}const gy=py.setTimeout,vy=py.clearTimeout;function yy(e,t){t.useNativeTimers?(e.setTimeoutFn=gy.bind(py),e.clearTimeoutFn=vy.bind(py)):(e.setTimeoutFn=py.setTimeout.bind(py),e.clearTimeoutFn=py.clearTimeout.bind(py))}class by extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class wy extends fy{constructor(e){super(),this.writable=!1,yy(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new by(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=uy(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}const Ay="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),_y=64,Ey={};let My,ky=0,Sy=0;function xy(e){let t="";do{t=Ay[e%_y]+t,e=Math.floor(e/_y)}while(e>0);return t}function Cy(){const e=xy(+new Date);return e!==My?(ky=0,My=e):e+"."+xy(ky++)}for(;Sy<_y;Sy++)Ey[Ay[Sy]]=Sy;function Ty(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}let Oy=!1;try{Oy="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(i){}const Ry=Oy;function Py(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||Ry))return new XMLHttpRequest}catch(e){}if(!t)try{return new(py[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}function Ny(){}const Ly=null!=new Py({xdomain:!1}).responseType;class Iy extends fy{constructor(e,t){super(),yy(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.create()}create(){const e=my(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const t=this.xhr=new Py(e);try{t.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let e in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(e)&&t.setRequestHeader(e,this.opts.extraHeaders[e])}}catch(e){}if("POST"===this.method)try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(t.timeout=this.opts.requestTimeout),t.onreadystatechange=()=>{4===t.readyState&&(200===t.status||1223===t.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof t.status?t.status:0)}),0))},t.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=Iy.requestsCount++,Iy.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=Ny,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Iy.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function By(){for(let e in Iy.requests)Iy.requests.hasOwnProperty(e)&&Iy.requests[e].abort()}Iy.requestsCount=0,Iy.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",By):"function"==typeof addEventListener&&addEventListener("onpagehide"in py?"pagehide":"unload",By,!1));const Dy="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),jy=py.WebSocket||py.MozWebSocket,Fy="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),Uy={websocket:class extends wy{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=Fy?{}:my(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=Fy?new jy(e,t,n):t?new jy(e,t):new jy(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType||"arraybuffer",this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],r=t===e.length-1;oy(n,this.supportsBinary,(e=>{try{this.ws.send(e)}catch(e){}r&&Dy((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const t=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===t&&443!==Number(this.opts.port)||"ws"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=Cy()),this.supportsBinary||(e.b64=1);const r=Ty(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!jy}},polling:class extends wy{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}const t=e&&e.forceBase64;this.supportsBinary=Ly&&!t}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const n=e.split(dy),r=[];for(let e=0;e<n.length;e++){const i=uy(n[e],t);if(r.push(i),"error"===i.type)break}return r})(e,this.socket.binaryType).forEach((e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach(((e,o)=>{oy(e,!1,(e=>{r[o]=e,++i===n&&t(r.join(dy))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let e=this.query||{};const t=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=Cy()),this.supportsBinary||e.sid||(e.b64=1),this.opts.port&&("https"===t&&443!==Number(this.opts.port)||"http"===t&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=Ty(e);return t+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new Iy(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},qy=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,zy=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Hy(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=qy.exec(e||""),o={},s=14;for(;s--;)o[zy[s]]=i[s]||"";return-1!=n&&-1!=r&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(e,t){const n=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.slice(0,1)&&0!==t.length||n.splice(0,1),"/"==t.slice(-1)&&n.splice(n.length-1,1),n}(0,o.path),o.queryKey=function(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,r){t&&(n[t]=r)})),n}(0,o.query),o}let Ky=class e extends fy{constructor(e,t={}){super(),this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=Hy(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Hy(t.host).host),yy(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Uy[e](n)}open(){let t;if(this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(e){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(t){let n=this.createTransport(t),r=!1;e.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",(t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;e.priorWebsocketSuccess="websocket"===n.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=n.name,this.emitReserved("upgradeError",e)}})))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=e=>{const t=new Error("probe error: "+e);t.transport=n.name,o(),this.emitReserved("upgradeError",t)};function a(){s("transport closed")}function l(){s("socket closed")}function u(e){n&&e.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",e.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let n=0;n<this.writeBuffer.length;n++){const r=this.writeBuffer[n].data;if(r&&(e+="string"==typeof(t=r)?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))),n>0&&e>this.maxPayload)return this.writeBuffer.slice(0,n);e+=2}var t;return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():e()})):this.upgrading?n():e()),this}onError(t){e.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const r=e.length;for(;n<r;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}};Ky.protocol=4;const Vy="function"==typeof ArrayBuffer,Wy=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,$y=Object.prototype.toString,Yy="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===$y.call(Blob),Gy="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===$y.call(File);function Zy(e){return Vy&&(e instanceof ArrayBuffer||Wy(e))||Yy&&e instanceof Blob||Gy&&e instanceof File}function Qy(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(Qy(e[t]))return!0;return!1}if(Zy(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return Qy(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Qy(e[t]))return!0;return!1}function Jy(e){const t=[],n=e.data,r=e;return r.data=Xy(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Xy(e,t){if(!e)return e;if(Zy(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Xy(e[r],t);return n}if("object"==typeof e&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Xy(e[r],t));return n}return e}function eb(e,t){return e.data=tb(e.data,t),delete e.attachments,e}function tb(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=tb(e[n],t);else if("object"==typeof e)for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=tb(e[n],t));return e}var nb;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(nb||(nb={}));class rb extends fy{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===nb.BINARY_EVENT;n||t.type===nb.BINARY_ACK?(t.type=n?nb.EVENT:nb.ACK,this.reconstructor=new ib(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!Zy(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(void 0===nb[n.type])throw new Error("unknown packet type "+n.type);if(n.type===nb.BINARY_EVENT||n.type===nb.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);n.nsp=e.substring(r,t)}else n.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!rb.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case nb.CONNECT:return"object"==typeof t;case nb.DISCONNECT:return void 0===t;case nb.CONNECT_ERROR:return"string"==typeof t||"object"==typeof t;case nb.EVENT:case nb.BINARY_EVENT:return Array.isArray(t)&&t.length>0;case nb.ACK:case nb.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ib{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=eb(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var ob=Object.freeze({__proto__:null,Decoder:rb,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==nb.EVENT&&e.type!==nb.ACK||!Qy(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===nb.EVENT?nb.BINARY_EVENT:nb.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==nb.BINARY_EVENT&&e.type!==nb.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Jy(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},get PacketType(){return nb},protocol:5});function sb(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const ab=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class lb extends fy{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[sb(e,"open",this.onopen.bind(this)),sb(e,"packet",this.onpacket.bind(this)),sb(e,"error",this.onerror.bind(this)),sb(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(ab.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:nb.EVENT,data:t,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const i=this.io.setTimeoutFn((()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))}),r);this.acks[e]=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,[null,...e])}}emitWithAck(e,...t){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,i)=>{t.push(((e,t)=>n?e?i(e):r(t):r(e))),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...r)=>{if(n===this._queue[0])return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:nb.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case nb.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nb.EVENT:case nb.BINARY_EVENT:this.onevent(e);break;case nb.ACK:case nb.BINARY_ACK:this.onack(e);break;case nb.DISCONNECT:this.ondisconnect();break;case nb.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...r){n||(n=!0,t.packet({type:nb.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(t.apply(this,e.data),delete this.acks[e.id])}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nb.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function ub(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ub.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},ub.prototype.reset=function(){this.attempts=0},ub.prototype.setMin=function(e){this.ms=e},ub.prototype.setMax=function(e){this.max=e},ub.prototype.setJitter=function(e){this.jitter=e};class cb extends fy{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,yy(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=t.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new ub({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||ob;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ky(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=sb(t,"open",(function(){n.onopen(),e&&e()})),i=sb(t,"error",(t=>{n.cleanup(),n._readyState="closed",this.emitReserved("error",t),e?e(t):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const e=this._timeout;0===e&&r();const n=this.setTimeoutFn((()=>{r(),t.close(),t.emit("error",new Error("timeout"))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(sb(e,"ping",this.onping.bind(this)),sb(e,"data",this.ondata.bind(this)),sb(e,"error",this.onerror.bind(this)),sb(e,"close",this.onclose.bind(this)),sb(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){Dy((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new lb(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const e of t)if(this.nsps[e].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach((e=>e())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const hb={};function db(e,t){"object"==typeof e&&(t=e,e=void 0);const n=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=Hy(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=hb[i]&&o in hb[i].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||s?a=new cb(r,t):(hb[i]||(hb[i]=new cb(r,t)),a=hb[i]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}var fb,pb;e.EventType=void 0,e.CommunicationLayerPreference=void 0,e.MessageType=void 0,Object.assign(db,{Manager:cb,Socket:lb,io:db,connect:db}),function(e){e.KEY_INFO="key_info",e.SERVICE_STATUS="service_status",e.KEYS_EXCHANGED="keys_exchanged",e.JOIN_CHANNEL="join_channel",e.CHANNEL_CREATED="channel_created",e.CLIENTS_CONNECTED="clients_connected",e.CLIENTS_DISCONNECTED="clients_disconnected",e.CLIENTS_WAITING="clients_waiting",e.CLIENTS_READY="clients_ready",e.SOCKET_DISCONNECTED="socket_disconnected",e.SOCKET_RECONNECT="socket_reconnect",e.OTP="otp",e.SDK_RPC_CALL="sdk_rpc_call",e.AUTHORIZED="authorized",e.CONNECTION_STATUS="connection_status",e.MESSAGE="message",e.TERMINATE="terminate"}(e.EventType||(e.EventType={})),function(e){e.KEY_EXCHANGE="key_exchange"}(fb||(fb={})),function(e){e.KEY_HANDSHAKE_START="key_handshake_start",e.KEY_HANDSHAKE_CHECK="key_handshake_check",e.KEY_HANDSHAKE_SYN="key_handshake_SYN",e.KEY_HANDSHAKE_SYNACK="key_handshake_SYNACK",e.KEY_HANDSHAKE_ACK="key_handshake_ACK",e.KEY_HANDSHAKE_NONE="none"}(pb||(pb={}));class mb extends Fv.EventEmitter2{constructor({communicationLayer:e,otherPublicKey:t,context:n,ecies:r,logging:i}){super(),this.keysExchanged=!1,this.step=pb.KEY_HANDSHAKE_NONE,this.debug=!1,this.context=n,this.myECIES=new Iv(r),this.communicationLayer=e,this.myPublicKey=this.myECIES.getPublicKey(),this.debug=!0===(null==i?void 0:i.keyExchangeLayer),t&&this.setOtherPublicKey(t),this.communicationLayer.on(fb.KEY_EXCHANGE,this.onKeyExchangeMessage.bind(this))}onKeyExchangeMessage(t){this.debug&&console.debug(`KeyExchange::${this.context}::onKeyExchangeMessage() keysExchanged=${this.keysExchanged}`,t);const{message:n}=t;this.keysExchanged&&this.debug&&console.log(`KeyExchange::${this.context}::onKeyExchangeMessage received handshake while already exchanged. step=${this.step} otherPubKey=${this.otherPublicKey}`),n.type===pb.KEY_HANDSHAKE_SYN?(this.checkStep([pb.KEY_HANDSHAKE_NONE,pb.KEY_HANDSHAKE_ACK]),this.debug&&console.debug("KeyExchange::KEY_HANDSHAKE_SYN",n),n.pubkey&&this.setOtherPublicKey(n.pubkey),this.communicationLayer.sendMessage({type:pb.KEY_HANDSHAKE_SYNACK,pubkey:this.myPublicKey}),this.step=pb.KEY_HANDSHAKE_ACK,this.emit(e.EventType.KEY_INFO,this.step)):n.type===pb.KEY_HANDSHAKE_SYNACK?(this.checkStep([pb.KEY_HANDSHAKE_SYNACK,pb.KEY_HANDSHAKE_NONE]),this.debug&&console.debug("KeyExchange::KEY_HANDSHAKE_SYNACK"),n.pubkey&&this.setOtherPublicKey(n.pubkey),this.communicationLayer.sendMessage({type:pb.KEY_HANDSHAKE_ACK}),this.keysExchanged=!0,this.step=pb.KEY_HANDSHAKE_NONE,this.emit(e.EventType.KEYS_EXCHANGED)):n.type===pb.KEY_HANDSHAKE_ACK&&(this.debug&&console.debug("KeyExchange::KEY_HANDSHAKE_ACK set keysExchanged to true!"),this.checkStep([pb.KEY_HANDSHAKE_ACK,pb.KEY_HANDSHAKE_NONE]),this.keysExchanged=!0,this.step=pb.KEY_HANDSHAKE_NONE,this.emit(e.EventType.KEYS_EXCHANGED))}resetKeys(e){this.clean(),this.myECIES=new Iv(e)}clean(){this.debug&&console.debug(`KeyExchange::${this.context}::clean reset handshake state`),this.step=pb.KEY_HANDSHAKE_NONE,this.emit(e.EventType.KEY_INFO,this.step),this.keysExchanged=!1}start({isOriginator:t,force:n}){this.debug&&console.debug(`KeyExchange::${this.context}::start isOriginator=${t} step=${this.step} keysExchanged=${this.keysExchanged}`),t?!this.keysExchanged&&this.step===pb.KEY_HANDSHAKE_NONE||n?(this.debug&&console.debug(`KeyExchange::${this.context}::start -- start key exchange (force=${n}) -- step=${this.step}`,this.step),this.clean(),this.step=pb.KEY_HANDSHAKE_SYNACK,this.emit(e.EventType.KEY_INFO,this.step),this.communicationLayer.sendMessage({type:pb.KEY_HANDSHAKE_SYN,pubkey:this.myPublicKey})):this.debug&&console.debug(`KeyExchange::${this.context}::start -- key exchange already ${this.keysExchanged?"done":"in progress"} -- aborted.`,this.step):this.keysExchanged&&!0!==n?this.debug&&console.debug("KeyExchange::start don't send KEY_HANDSHAKE_START -- exchange already done."):(this.communicationLayer.sendMessage({type:pb.KEY_HANDSHAKE_START}),this.clean())}checkStep(e){if(e.length>0&&-1===e.indexOf(this.step.toString()))throw new Error(`Wrong Step "${this.step}" not within ${e}`)}areKeysExchanged(){return this.keysExchanged}getMyPublicKey(){return this.myPublicKey}setOtherPublicKey(e){this.debug&&console.debug("KeyExchange::setOtherPubKey()",e),this.otherPublicKey=e}encryptMessage(e){if(!this.otherPublicKey)throw new Error("encryptMessage: Keys not exchanged - missing otherPubKey");return this.myECIES.encrypt(e,this.otherPublicKey)}decryptMessage(e){if(!this.otherPublicKey)throw new Error("decryptMessage: Keys not exchanged - missing otherPubKey");return this.myECIES.decrypt(e)}getKeyInfo(){return{ecies:Object.assign(Object.assign({},this.myECIES.getKeyInfo()),{otherPubKey:this.otherPublicKey}),step:this.step,keysExchanged:this.areKeysExchanged()}}toString(){const e={keyInfo:this.getKeyInfo(),keysExchanged:this.keysExchanged,step:this.step};return JSON.stringify(e)}}!function(e){e.WEBRTC="webrtc",e.SOCKET="socket",e.WALLETCONNECT="wc"}(e.CommunicationLayerPreference||(e.CommunicationLayerPreference={})),function(e){e.TERMINATE="terminate",e.ANSWER="answer",e.OFFER="offer",e.CANDIDATE="candidate",e.JSONRPC="jsonrpc",e.WALLET_INFO="wallet_info",e.ORIGINATOR_INFO="originator_info",e.PAUSE="pause",e.OTP="otp",e.AUTHORIZED="authorized",e.PING="ping",e.READY="ready"}(e.MessageType||(e.MessageType={}));const gb=e=>new Promise((t=>{setTimeout(t,e)}));class vb extends Fv.EventEmitter2{constructor({otherPublicKey:e,reconnect:t,communicationLayerPreference:n,transports:r,communicationServerUrl:i,context:o,ecies:s,logging:a}){super(),this.clientsConnected=!1,this.clientsPaused=!1,this.manualDisconnect=!1,this.rpcMethodTracker={},this.hasPlaintext=!1,this.resumed=t,this.context=o,this.communicationLayerPreference=n,this.debug=!0===(null==a?void 0:a.serviceLayer),this.communicationServerUrl=i,this.hasPlaintext=this.communicationServerUrl!==Qv&&!0===(null==a?void 0:a.plaintext);const l={autoConnect:!1,transports:Jv};r&&(l.transports=r),this.debug&&console.debug(`SocketService::constructor() Socket IO url: ${this.communicationServerUrl}`),this.socket=db(i,l);const u={communicationLayer:this,otherPublicKey:e,sendPublicKey:!1,context:this.context,ecies:s,logging:a};this.keyExchange=new mb(u)}resetKeys(){this.debug&&console.debug("SocketService::resetKeys()"),this.keyExchange.resetKeys()}checkSameId(e){if(e!==this.channelId)throw this.debug&&console.error(`Wrong id ${e} - should be ${this.channelId}`),new Error("Wrong id")}setupChannelListeners(t){this.debug&&console.debug(`SocketService::${this.context}::setupChannelListener setting socket listeners for channel ${t}...`);const n=()=>Bv(this,void 0,void 0,(function*(){this.debug&&console.debug(`SocketService::connectAgain this.socket.connected=${this.socket.connected} trying to reconnect after socketio disconnection`,this),yield gb(200),this.socket.connected||(this.resumed=!0,this.socket.connect(),this.emit(e.EventType.SOCKET_RECONNECT),this.socket.emit(e.EventType.JOIN_CHANNEL,this.channelId,`${this.context}connect_again`))})),r=()=>{"undefined"!=typeof window&&"undefined"!=typeof document&&(this.debug&&console.debug(`SocketService::checkFocus hasFocus=${document.hasFocus()}`,this),document.hasFocus()?n.call(this):window.addEventListener("focus",n.bind(this),{once:!0}))};this.socket.on("error",(e=>{this.debug&&console.debug("SocketService::on 'error' ",e),r()})),this.socket.on("ping",(()=>{this.debug&&console.debug("SocketService::on 'ping'")})),this.socket.on("reconnect",(e=>{this.debug&&console.debug(`SocketService::on 'reconnect' attempt=${e}`)})),this.socket.on("reconnect_error",(e=>{this.debug&&console.debug("SocketService::on 'reconnect_error'",e)})),this.socket.on("reconnect_failed",(()=>{this.debug&&console.debug("SocketService::on 'reconnect_failed'")})),this.socket.on("disconnect",(t=>{this.debug&&console.debug(`SocketService::on 'disconnect' manualDisconnect=${this.manualDisconnect}`,t),this.manualDisconnect||(this.emit(e.EventType.SOCKET_DISCONNECTED),r.call(this))})),this.socket.on(`clients_connected-${t}`,(n=>Bv(this,void 0,void 0,(function*(){var n,r;this.debug&&console.debug(`SocketService::${this.context}::setupChannelListener::on 'clients_connected-${t}' resumed=${this.resumed} clientsPaused=${this.clientsPaused} keysExchanged=${this.keyExchange.areKeysExchanged()} isOriginator=${this.isOriginator}`),this.emit(e.EventType.CLIENTS_CONNECTED,{isOriginator:this.isOriginator,keysExchanged:this.keyExchange.areKeysExchanged(),context:this.context}),this.resumed?(this.keyExchange.areKeysExchanged()?(this.debug&&console.debug(`SocketService::${this.context}::on 'clients_connected' reconnect=true keysExchanged=false`),this.communicationLayerPreference===e.CommunicationLayerPreference.WEBRTC&&this.emit(e.EventType.CLIENTS_READY,{isOriginator:this.isOriginator,keysExchanged:this.keyExchange.areKeysExchanged(),context:this.context})):this.isOriginator||(this.debug&&console.debug(`SocketService::${this.context}::on 'clients_connected' / keysExchanged=${this.keyExchange.areKeysExchanged()} -- backward compatibility`),this.keyExchange.start({isOriginator:null!==(n=this.isOriginator)&&void 0!==n&&n})),this.resumed=!1):this.clientsPaused?console.debug("SocketService::on 'clients_connected' skip sending originatorInfo on pause"):this.isOriginator?this.isOriginator&&(yield gb(3e3),this.keyExchange.start({isOriginator:this.isOriginator,force:!1})):(this.debug&&console.debug(`SocketService::${this.context}::on 'clients_connected' / keysExchanged=${this.keyExchange.areKeysExchanged()} -- backward compatibility`),this.keyExchange.start({isOriginator:null!==(r=this.isOriginator)&&void 0!==r&&r,force:!0})),this.clientsConnected=!0,this.clientsPaused=!1})))),this.socket.on(`channel_created-${t}`,(n=>{this.debug&&console.debug(`SocketService::${this.context}::setupChannelListener::on 'channel_created-${t}'`,n),this.emit(e.EventType.CHANNEL_CREATED,n)})),this.socket.on(`clients_disconnected-${t}`,(()=>{this.clientsConnected=!1,this.debug&&console.debug(`SocketService::${this.context}::setupChannelListener::on 'clients_disconnected-${t}'`),this.isOriginator&&this.keyExchange.clean(),this.emit(e.EventType.CLIENTS_DISCONNECTED,t)})),this.socket.on(`message-${t}`,(({id:n,message:r,error:i})=>{var o,s,a,l;if(this.debug&&console.debug(`SocketService::${this.context}::on 'message' ${t} keysExchanged=${this.keyExchange.areKeysExchanged()}`,r),i)throw this.debug&&console.debug(`\n SocketService::${this.context}::on 'message' error=${i}`),new Error(i);try{this.checkSameId(n)}catch(e){return void console.error("ignore message --- wrong id ",r)}if(this.isOriginator&&(null==r?void 0:r.type)===pb.KEY_HANDSHAKE_START)return this.debug&&console.debug(`SocketService::${this.context}::on 'message' received HANDSHAKE_START isOriginator=${this.isOriginator}`,r),void this.keyExchange.start({isOriginator:null!==(o=this.isOriginator)&&void 0!==o&&o,force:!0});if((null==r?void 0:r.type)===pb.KEY_HANDSHAKE_CHECK){const t=r.pubkey,n=this.getKeyInfo().ecies.otherPubKey,i=this.keyExchange.getMyPublicKey(),o=t===i;return console.log(`exchanged=${this.getKeyInfo().keysExchanged} keysVerifiedk=${o}\n${JSON.stringify({remote:t,local:i,mmpublic:n},null,4)}`),o||this.keyExchange.start({isOriginator:null!==(s=this.isOriginator)&&void 0!==s&&s}),void this.emit(e.EventType.MESSAGE,{message:{type:pb.KEY_HANDSHAKE_CHECK}})}if((null==r?void 0:r.type)===e.MessageType.PING)return this.debug&&console.debug(`SocketService::${this.context}::on 'message' ping `),void this.emit(e.EventType.MESSAGE,{message:{type:"ping"}});if(this.debug&&console.debug(`SocketService::${this.context}::on 'message' originator=${this.isOriginator}, type=${null==r?void 0:r.type}, keysExchanged=${this.keyExchange.areKeysExchanged()}`),null===(a=null==r?void 0:r.type)||void 0===a?void 0:a.startsWith("key_handshake"))return this.debug&&console.debug(`SocketService::${this.context}::on 'message' emit KEY_EXCHANGE`,r),void this.emit(fb.KEY_EXCHANGE,{message:r,context:this.context});if(!this.keyExchange.areKeysExchanged())return this.isOriginator?this.keyExchange.start({isOriginator:null!==(l=this.isOriginator)&&void 0!==l&&l}):this.sendMessage({type:pb.KEY_HANDSHAKE_START}),void console.warn("Message ignored because invalid key exchange status",r);if(-1!==r.toString().indexOf("type"))return console.warn("SocketService::on 'message' received non encrypted unkwown message"),void this.emit(e.EventType.MESSAGE,r);const u=this.keyExchange.decryptMessage(r),c=JSON.parse(u);if((null==c?void 0:c.type)===e.MessageType.PAUSE?this.clientsPaused=!0:this.clientsPaused=!1,this.isOriginator&&c.data){const e=c.data,t=this.rpcMethodTracker[e.id];if(t){const n=Date.now()-t.timestamp;this.debug&&console.debug(`received answer for id=${e.id} method=${t.method} responseTime=${n}`,c)}}this.emit(e.EventType.MESSAGE,{message:c})})),this.socket.on(`clients_waiting_to_join-${t}`,(n=>{this.debug&&console.debug(`SocketService::${this.context}::setupChannelListener::on 'clients_waiting_to_join-${t}'`,n),this.emit(e.EventType.CLIENTS_WAITING,n)})),this.keyExchange.on(e.EventType.KEY_INFO,(t=>{this.debug&&console.debug("SocketService::on 'KEY_INFO'",t),this.emit(e.EventType.KEY_INFO,t)})),this.keyExchange.on(e.EventType.KEYS_EXCHANGED,(()=>{this.debug&&console.debug(`SocketService::on 'keys_exchanged' keyschanged=${this.keyExchange.areKeysExchanged()}`),this.emit(e.EventType.KEYS_EXCHANGED,{keysExchanged:this.keyExchange.areKeysExchanged(),isOriginator:this.isOriginator});const t={keyInfo:this.getKeyInfo()};this.emit(e.EventType.SERVICE_STATUS,t)}))}createChannel(){this.debug&&console.debug(`SocketService::${this.context}::createChannel()`),this.socket.connected||this.socket.connect(),this.manualDisconnect=!1,this.isOriginator=!0;const t=Wv();return this.channelId=t,this.setupChannelListeners(t),this.socket.emit(e.EventType.JOIN_CHANNEL,t,`${this.context}createChannel`),{channelId:t,pubKey:this.keyExchange.getMyPublicKey()}}connectToChannel({channelId:t,isOriginator:n=!1,withKeyExchange:r=!1}){if(this.debug&&console.debug(`SocketService::${this.context}::connectToChannel() channelId=${t} isOriginator=${n}`,this.keyExchange.toString()),this.socket.connected)throw new Error("socket already connected");this.manualDisconnect=!1,this.socket.connect(),this.withKeyExchange=r,this.isOriginator=n,this.channelId=t,this.setupChannelListeners(t),this.socket.emit(e.EventType.JOIN_CHANNEL,t,`${this.context}_connectToChannel`)}getKeyInfo(){return this.keyExchange.getKeyInfo()}keyCheck(){this.socket.emit(e.EventType.MESSAGE,{id:this.channelId,context:this.context,message:{type:pb.KEY_HANDSHAKE_CHECK,pubkey:this.getKeyInfo().ecies.otherPubKey}})}sendMessage(t){var n,r;if(!this.channelId)throw new Error("Create a channel first");if(this.debug&&console.debug(`SocketService::${this.context}::sendMessage() areKeysExchanged=${this.keyExchange.areKeysExchanged()}`,t),null===(n=null==t?void 0:t.type)||void 0===n?void 0:n.startsWith("key_handshake"))return this.debug&&console.debug(`SocketService::${this.context}::sendMessage()`,t),void this.socket.emit(e.EventType.MESSAGE,{id:this.channelId,context:this.context,message:t});if(!this.keyExchange.areKeysExchanged())throw this.debug&&console.debug(`SocketService::${this.context}::sendMessage() ERROR keys not exchanged`,t),new Error("Keys not exchanged BBB");const i=null!==(r=null==t?void 0:t.method)&&void 0!==r?r:"",o=null==t?void 0:t.id;this.isOriginator&&o&&(this.rpcMethodTracker[o]={timestamp:Date.now(),method:i});const s=this.keyExchange.encryptMessage(JSON.stringify(t)),a={id:this.channelId,context:this.context,message:s,plaintext:this.hasPlaintext?JSON.stringify(t):void 0};this.debug&&console.debug(`SocketService::${this.context}::sendMessage()`,a),t.type===e.MessageType.TERMINATE&&(this.manualDisconnect=!0),this.socket.emit(e.EventType.MESSAGE,a)}ping(){var t;this.debug&&console.debug(`SocketService::${this.context}::ping() keysExchanged=${this.keyExchange.areKeysExchanged()}`),this.isOriginator||(this.keyExchange.areKeysExchanged()?this.sendMessage({type:e.MessageType.READY}):this.keyExchange.start({isOriginator:null!==(t=this.isOriginator)&&void 0!==t&&t})),this.socket.emit(e.EventType.MESSAGE,{id:this.channelId,context:this.context,message:{type:e.MessageType.PING}})}pause(){this.debug&&console.debug(`SocketService::${this.context}::pause()`),this.manualDisconnect=!0,this.keyExchange.areKeysExchanged()&&this.sendMessage({type:e.MessageType.PAUSE}),this.socket.disconnect()}isConnected(){return this.socket.connected}resume(){var t;this.debug&&console.debug(`SocketService::${this.context}::resume() connected=${this.socket.connected} manualDisconnect=${this.manualDisconnect} resumed=${this.resumed} keysExchanged=${this.keyExchange.areKeysExchanged()}`),this.socket.connected?this.debug&&console.debug("SocketService::resume() already connected."):(this.socket.connect(),this.debug&&console.debug(`SocketService::resume() after connecting socket --\x3e connected=${this.socket.connected}`),this.socket.emit(e.EventType.JOIN_CHANNEL,this.channelId,`${this.context}_resume`)),this.keyExchange.areKeysExchanged()?this.isOriginator||this.sendMessage({type:e.MessageType.READY}):this.isOriginator||this.keyExchange.start({isOriginator:null!==(t=this.isOriginator)&&void 0!==t&&t}),this.manualDisconnect=!1,this.resumed=!0}disconnect(e){this.debug&&console.debug(`SocketService::${this.context}::disconnect()`,e),(null==e?void 0:e.terminate)&&(this.channelId=e.channelId,this.keyExchange.clean()),this.manualDisconnect=!0,this.socket.disconnect()}}var yb;e.ConnectionStatus=void 0,e.AutoConnectType=void 0,function(e){e.DISCONNECTED="disconnected",e.WAITING="waiting",e.TIMEOUT="timeout",e.LINKED="linked",e.PAUSED="paused",e.TERMINATED="terminated"}(e.ConnectionStatus||(e.ConnectionStatus={})),function(e){e.REQUEST="sdk_connect_request_started",e.CONNECTED="sdk_connection_established",e.DISCONNECTED="sdk_disconnected"}(yb||(yb={}));class bb extends Fv.EventEmitter2{constructor({otherPublicKey:t,webRTCLib:n,communicationLayerPreference:r,reconnect:i,transports:o,context:s,ecies:a,communicationServerUrl:l,logging:u}){super(),this.handshakeDone=!1,this.isOriginator=!1,this.clientsConnected=!1,this.clientsReady=!1,this.reconnect=i,this.context=s,this.debug=!0===(null==u?void 0:u.serviceLayer),n?(this.RTCPeerConnection=n.RTCPeerConnection,this.RTCSessionDescription=n.RTCSessionDescription,this.RTCIceCandidate=n.RTCIceCandidate):(this.RTCPeerConnection=RTCPeerConnection,this.RTCSessionDescription=RTCSessionDescription,this.RTCIceCandidate=RTCIceCandidate),this.socketService=new vb({otherPublicKey:t,communicationLayerPreference:r,reconnect:i,transports:o,communicationServerUrl:l,ecies:a,context:s,logging:u});const c={communicationLayer:this,otherPublicKey:void 0,sendPublicKey:!0,context:this.context,logging:u};this.keyExchange=new mb(c),this.keyExchange.on(e.EventType.KEYS_EXCHANGED,(()=>{this.clientsReady=!0,this.emit(e.EventType.CLIENTS_READY,{isOriginator:this.isOriginator})})),this.socketService.on(e.EventType.CLIENTS_DISCONNECTED,(()=>this.clientsConnected?this.clientsConnected:(this.socketService.removeAllListeners(),this.emit(e.EventType.CLIENTS_DISCONNECTED)))),this.socketService.on(e.EventType.MESSAGE,(({message:t})=>Bv(this,void 0,void 0,(function*(){var n,r,i,o,s;const{offer:a,answer:l,candidate:u,type:c}=t;if(c===e.MessageType.OFFER){yield null===(n=this.webrtc)||void 0===n?void 0:n.setRemoteDescription(new this.RTCSessionDescription(a));const t=yield null===(r=this.webrtc)||void 0===r?void 0:r.createAnswer();yield null===(i=this.webrtc)||void 0===i?void 0:i.setLocalDescription(t),this.socketService.sendMessage({type:e.MessageType.ANSWER,answer:t})}else c===e.MessageType.ANSWER?(yield null===(o=this.webrtc)||void 0===o?void 0:o.setRemoteDescription(new this.RTCSessionDescription(l)),this.handshakeDone=!0):c===e.MessageType.CANDIDATE&&(null===(s=this.webrtc)||void 0===s||s.addIceCandidate(new this.RTCIceCandidate(u)))})))),this.socketService.on(e.EventType.CLIENTS_READY,(({isOriginator:t})=>Bv(this,void 0,void 0,(function*(){if(this.setupWebrtc(),!t)return;if(!this.webrtc)throw new Error("invalid webrtc configuration");const n=yield this.webrtc.createOffer();yield this.webrtc.setLocalDescription(n),this.isOriginator=t,this.socketService.sendMessage({type:e.MessageType.OFFER,offer:n})})))),this.socketService.on(e.EventType.CHANNEL_CREATED,(t=>{this.emit(e.EventType.CHANNEL_CREATED,t)})),this.socketService.on(e.EventType.CLIENTS_WAITING,(t=>{this.emit(e.EventType.CLIENTS_WAITING,t)}))}isConnected(){return this.socketService.isConnected()}setupWebrtc(){if(this.webrtc=new this.RTCPeerConnection({iceServers:[{urls:"stun:15.237.115.65"}]}),!this.webrtc)throw new Error("invalid webrtc configuration");this.webrtc.ondatachannel=t=>{console.log("Data channel is created!");const n=t.channel;n.onopen=()=>{var t,n;console.log("Data channel is open and ready to be used."),this.clientsConnected=!0,this.isOriginator&&(this.keyExchange.areKeysExchanged()||this.keyExchange.start({isOriginator:null!==(t=this.isOriginator)&&void 0!==t&&t})),this.reconnect&&(this.keyExchange.areKeysExchanged()?(this.sendMessage({type:e.MessageType.READY}),this.emit(e.EventType.CLIENTS_READY,{isOriginator:this.isOriginator})):this.isOriginator||this.keyExchange.start({isOriginator:null!==(n=this.isOriginator)&&void 0!==n&&n}),this.reconnect=!1)},this.onMessage=this.onMessage.bind(this),n.onmessage=this.onMessage},this.webrtc.onconnectionstatechange=()=>{var t,n;const r=null!==(n=null===(t=this.webrtc)||void 0===t?void 0:t.connectionState)&&void 0!==n?n:"closed";return console.log("connectionStatus",r),["disconnected","failed","closed"].includes(r)?this.emit(e.EventType.CLIENTS_DISCONNECTED):r},this.webrtc.onicecandidate=({candidate:t})=>{t&&this.socketService.sendMessage({type:e.MessageType.CANDIDATE,candidate:t})},this.webrtc.onicecandidateerror=e=>console.log("ICE ERROR",e),this.dataChannel=this.webrtc.createDataChannel("messenger"),this.dataChannel.onerror=t=>0===t.error.code?this.emit(e.EventType.CLIENTS_DISCONNECTED):(console.log("ERROR: datachannel",t),t)}connectToChannel({channelId:e}){this.socketService.connectToChannel({channelId:e})}resetKeys(){this.socketService.resetKeys()}keyCheck(){this.socketService.keyCheck()}onMessage(t){if(!this.keyExchange.areKeysExchanged()){const e=JSON.parse(t.data);if(null==e?void 0:e.type.startsWith("key_handshake"))return this.emit(fb.KEY_EXCHANGE,{message:e});throw new Error("Keys not exchanged")}const n=this.keyExchange.decryptMessage(t.data),r=JSON.parse(n);return this.emit(e.EventType.MESSAGE,{message:r})}sendMessage(e){var t;if(!this.clientsConnected)throw new Error("Clients not connected");if(!this.dataChannel)throw new Error("Invalid webrtc status - data channel is not defined");if(!this.keyExchange.areKeysExchanged()){if(null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.startsWith("key_handshake"))return this.dataChannel.send(JSON.stringify(e));throw new Error("Keys not exchanged")}const n=this.keyExchange.encryptMessage(JSON.stringify(e));return this.dataChannel.send(n)}createChannel(){return this.socketService.createChannel()}getKeyInfo(){return this.socketService.getKeyInfo()}ping(){this.socketService.ping()}pause(){var t;this.keyExchange.areKeysExchanged()&&this.sendMessage({type:e.MessageType.PAUSE}),null===(t=this.webrtc)||void 0===t||t.close(),this.socketService.pause()}resume(){this.reconnect=!0,this.socketService.resume()}disconnect(e){var t;this.socketService.disconnect(e),null===(t=this.webrtc)||void 0===t||t.close()}}class wb extends Fv.EventEmitter2{constructor({platform:t,communicationLayerPreference:n,otherPublicKey:r,webRTCLib:i,reconnect:o,walletInfo:s,dappMetadata:a,transports:l,context:u,ecies:c,analytics:h=!1,storage:d,sdkVersion:f,communicationServerUrl:p=Qv,logging:m,autoConnect:g={timeout:3e3}}){super(),this.ready=!1,this.isOriginator=!1,this.paused=!1,this.analytics=!1,this.originatorInfoSent=!1,this.clientsConnected=!1,this.sessionDuration=Xv,this.autoStarted=!1,this.debug=!1,this._connectionStatus=e.ConnectionStatus.DISCONNECTED,this.otherPublicKey=r,this.webRTCLib=i,this.dappMetadata=a,this.walletInfo=s,this.transports=l,this.platform=t,this.analytics=h,this.communicationServerUrl=p,this.context=u,this.sdkVersion=f,this.setConnectionStatus(e.ConnectionStatus.DISCONNECTED),(null==d?void 0:d.duration)&&(this.sessionDuration=Xv),this.storageOptions=d,this.autoConnectOptions=g,this.debug=!0===(null==m?void 0:m.remoteLayer),this.logging=m,(null==d?void 0:d.storageManager)&&(this.storageManager=d.storageManager),this.initCommunicationLayer({communicationLayerPreference:n,otherPublicKey:r,webRTCLib:i,reconnect:o,ecies:c,communicationServerUrl:p}),this.emitServiceStatusEvent()}initCommunicationLayer({communicationLayerPreference:t,otherPublicKey:n,webRTCLib:r,reconnect:i,ecies:o,communicationServerUrl:s=Qv}){var a,l,u,c,h,d,f,p,m,g,v;switch(t){case e.CommunicationLayerPreference.WEBRTC:this.communicationLayer=new bb({communicationLayerPreference:t,otherPublicKey:n,reconnect:i,transports:this.transports,webRTCLib:r,communicationServerUrl:s,ecies:o,context:this.context,logging:this.logging});break;case e.CommunicationLayerPreference.SOCKET:this.communicationLayer=new vb({communicationLayerPreference:t,otherPublicKey:n,reconnect:i,transports:this.transports,communicationServerUrl:s,context:this.context,ecies:o,logging:this.logging});break;default:throw new Error("Invalid communication protocol")}let y="undefined"!=typeof document&&document.URL||"",b="undefined"!=typeof document&&document.title||"";(null===(a=this.dappMetadata)||void 0===a?void 0:a.url)&&(y=this.dappMetadata.url),(null===(l=this.dappMetadata)||void 0===l?void 0:l.name)&&(b=this.dappMetadata.name);const w={url:y,title:b,icon:null===(u=this.dappMetadata)||void 0===u?void 0:u.base64Icon,platform:this.platform,apiVersion:$v};this.originatorInfo=w,null===(c=this.communicationLayer)||void 0===c||c.on(e.EventType.MESSAGE,(e=>{let t=e;e.message&&(t=t.message),this.onCommunicationLayerMessage(t)})),null===(h=this.communicationLayer)||void 0===h||h.on(e.EventType.CLIENTS_CONNECTED,(()=>{var n,r,i;this.debug&&console.debug(`RemoteCommunication::on 'clients_connected' channel=${this.channelId} keysExchanged=${null===(n=this.getKeyInfo())||void 0===n?void 0:n.keysExchanged}`),this.analytics&&Zv(Object.assign(Object.assign({id:null!==(r=this.channelId)&&void 0!==r?r:"",event:yb.REQUEST},w),{commLayer:t,sdkVersion:this.sdkVersion,walletVersion:null===(i=this.walletInfo)||void 0===i?void 0:i.version,commLayerVersion:$v}),this.communicationServerUrl),this.clientsConnected=!0,this.originatorInfoSent=!1,this.emit(e.EventType.CLIENTS_CONNECTED)})),null===(d=this.communicationLayer)||void 0===d||d.on(e.EventType.KEYS_EXCHANGED,(n=>{var r,i,o,s;this.debug&&console.debug(`RemoteCommunication::${this.context}::on commLayer.'keys_exchanged' channel=${this.channelId}`,n),(null===(r=this.getKeyInfo())||void 0===r?void 0:r.keysExchanged)&&this.setConnectionStatus(e.ConnectionStatus.LINKED),this.setLastActiveDate(new Date),this.analytics&&this.channelId&&Zv({id:this.channelId,event:yb.CONNECTED,sdkVersion:this.sdkVersion,commLayer:t,commLayerVersion:$v,walletVersion:null===(i=this.walletInfo)||void 0===i?void 0:i.version},this.communicationServerUrl),this.isOriginator=n.isOriginator,n.isOriginator||(null===(o=this.communicationLayer)||void 0===o||o.sendMessage({type:e.MessageType.READY}),this.ready=!0,this.paused=!1),n.isOriginator&&!this.originatorInfoSent&&(null===(s=this.communicationLayer)||void 0===s||s.sendMessage({type:e.MessageType.ORIGINATOR_INFO,originatorInfo:this.originatorInfo,originator:this.originatorInfo}),this.originatorInfoSent=!0)})),null===(f=this.communicationLayer)||void 0===f||f.on(e.EventType.SOCKET_DISCONNECTED,(()=>{this.debug&&console.debug("RemoteCommunication::on 'socket_Disconnected' set ready to false"),this.ready=!1})),null===(p=this.communicationLayer)||void 0===p||p.on(e.EventType.SOCKET_RECONNECT,(()=>{this.debug&&console.debug("RemoteCommunication::on 'socket_reconnect' -- reset key exchange status / set ready to false"),this.ready=!1,this.clean()})),null===(m=this.communicationLayer)||void 0===m||m.on(e.EventType.CLIENTS_DISCONNECTED,(n=>{var r;this.debug&&console.debug(`RemoteCommunication::${this.context}]::on 'clients_disconnected' channelId=${n}`),this.clientsConnected=!1,this.emit(e.EventType.CLIENTS_DISCONNECTED,this.channelId),this.setConnectionStatus(e.ConnectionStatus.DISCONNECTED),this.ready=!1,this.analytics&&this.channelId&&Zv({id:this.channelId,event:yb.DISCONNECTED,sdkVersion:this.sdkVersion,commLayer:t,commLayerVersion:$v,walletVersion:null===(r=this.walletInfo)||void 0===r?void 0:r.version},this.communicationServerUrl)})),null===(g=this.communicationLayer)||void 0===g||g.on(e.EventType.CHANNEL_CREATED,(t=>{this.debug&&console.debug(`RemoteCommunication::${this.context}::on 'channel_created' channelId=${t}`),this.emit(e.EventType.CHANNEL_CREATED,t)})),null===(v=this.communicationLayer)||void 0===v||v.on(e.EventType.CLIENTS_WAITING,(t=>{if(this.debug&&console.debug(`RemoteCommunication::${this.context}::on 'clients_waiting' numberUsers=${t} ready=${this.ready} autoStarted=${this.autoStarted}`),this.setConnectionStatus(e.ConnectionStatus.WAITING),this.emit(e.EventType.CLIENTS_WAITING,t),this.autoStarted){this.debug&&console.debug(`RemoteCommunication::on 'clients_waiting' watch autoStarted=${this.autoStarted} timeout`,this.autoConnectOptions);const t=this.autoConnectOptions.timeout||3e3,n=setTimeout((()=>{this.debug&&console.debug(`RemoteCommunication::on setTimeout(${t}) terminate channelConfig`,this.autoConnectOptions),this.autoStarted=!1,this.ready||this.setConnectionStatus(e.ConnectionStatus.TIMEOUT),clearTimeout(n)}),t)}}))}onCommunicationLayerMessage(t){var n,r;if(this.debug&&console.debug(`RemoteCommunication::${this.context}::on 'message' typeof=${typeof t}`,t),this.ready=!0,!this.isOriginator&&t.type===e.MessageType.ORIGINATOR_INFO)return null===(n=this.communicationLayer)||void 0===n||n.sendMessage({type:e.MessageType.WALLET_INFO,walletInfo:this.walletInfo}),this.originatorInfo=t.originatorInfo||t.originator,this.emit(e.EventType.CLIENTS_READY,{isOriginator:this.isOriginator,originatorInfo:this.originatorInfo}),void(this.paused=!1);if(this.isOriginator&&t.type===e.MessageType.WALLET_INFO)return this.walletInfo=t.walletInfo,void(this.paused=!1);if(t.type===e.MessageType.TERMINATE)this.isOriginator&&(this.disconnect({terminate:!0,sendMessage:!1}),console.debug(),this.emit(e.EventType.TERMINATE));else if(t.type===e.MessageType.PAUSE)this.paused=!0,this.setConnectionStatus(e.ConnectionStatus.PAUSED);else if(t.type===e.MessageType.READY&&this.isOriginator)this.setConnectionStatus(e.ConnectionStatus.LINKED),this.paused=!1,this.emit(e.EventType.CLIENTS_READY,{isOriginator:this.isOriginator,walletInfo:this.walletInfo});else{if(t.type===e.MessageType.OTP&&this.isOriginator)return this.emit(e.EventType.OTP,t.otpAnswer),void(1==="6.6".localeCompare((null===(r=this.walletInfo)||void 0===r?void 0:r.version)||"")&&this.emit(e.EventType.SDK_RPC_CALL,{method:"eth_requestAccounts",params:[]}));t.type===e.MessageType.AUTHORIZED&&this.isOriginator&&this.emit(e.EventType.AUTHORIZED)}this.emit(e.EventType.MESSAGE,t)}startAutoConnect(){var e,t,n;return Bv(this,void 0,void 0,(function*(){if(!this.storageManager)return void(this.debug&&console.debug("RemoteCommunication::startAutoConnect() no storage manager defined - skip"));const r=yield this.storageManager.getPersistedChannelConfig(null!==(e=this.channelId)&&void 0!==e?e:"");if(this.debug&&console.debug(`RemoteCommunication::startAutoConnect() autoStarted=${this.autoStarted} channelConfig`,r),null===(t=this.communicationLayer)||void 0===t?void 0:t.isConnected())return this.debug&&console.debug("RemoteCommunication::startAutoConnect() socket already connected - exit autoConnect()"),r;if(r){if(r.validUntil>Date.now())return this.channelConfig=r,this.autoStarted=!0,this.channelId=null==r?void 0:r.channelId,null===(n=this.communicationLayer)||void 0===n||n.connectToChannel({channelId:r.channelId,isOriginator:!0}),Promise.resolve(r);this.debug&&console.log("RemoteCommunication::autoConnect Session has expired")}else this.debug&&console.debug("RemoteCommunication::autoConnect not available");this.autoStarted=!1}))}generateChannelId(){var e,t,n;return Bv(this,void 0,void 0,(function*(){if(!this.communicationLayer)throw new Error("communication layer not initialized");if(this.ready)throw new Error("Channel already connected");if(this.channelId&&this.isConnected())return console.warn("Channel already exists -- interrupt generateChannelId",this.channelConfig),this.channelConfig={channelId:this.channelId,validUntil:Date.now()+this.sessionDuration},null===(e=this.storageManager)||void 0===e||e.persistChannelConfig(this.channelConfig),{channelId:this.channelId,pubKey:null===(t=this.getKeyInfo())||void 0===t?void 0:t.ecies.public};this.debug&&console.debug("RemoteCommunication::generateChannelId()"),this.clean();const r=this.communicationLayer.createChannel();this.debug&&console.debug("RemoteCommunication::generateChannelId() channel created",r);const i={channelId:r.channelId,validUntil:Date.now()+this.sessionDuration};return this.channelId=r.channelId,this.channelConfig=i,null===(n=this.storageManager)||void 0===n||n.persistChannelConfig(i),{channelId:this.channelId,pubKey:r.pubKey}}))}clean(){this.debug&&console.debug(`RemoteCommunication::${this.context}::clean()`),this.channelConfig=void 0,this.ready=!1,this.autoStarted=!1}connectToChannel(e,t){var n,r,i;if(!Hv(e))throw console.debug(`RemoteCommunication::${this.context}::connectToChannel() invalid channel channelId=${e}`),new Error(`Invalid channel ${e}`);if(this.debug&&console.debug(`RemoteCommunication::${this.context}::connectToChannel() channelId=${e}`),null===(n=this.communicationLayer)||void 0===n?void 0:n.isConnected())return void console.debug(`RemoteCommunication::${this.context}::connectToChannel() already connected - interrup connection.`);this.channelId=e,null===(r=this.communicationLayer)||void 0===r||r.connectToChannel({channelId:e,withKeyExchange:t});const o={channelId:e,validUntil:Date.now()+this.sessionDuration};this.channelConfig=o,null===(i=this.storageManager)||void 0===i||i.persistChannelConfig(o)}sendMessage(t){return new Promise((n=>{var r,i,o;this.debug&&console.log(`RemoteCommunication::${this.context}::sendMessage paused=${this.paused} ready=${this.ready} socker=${null===(r=this.communicationLayer)||void 0===r?void 0:r.isConnected()} clientsConnected=${this.clientsConnected} status=${this._connectionStatus}`,t),!this.paused&&this.ready&&(null===(i=this.communicationLayer)||void 0===i?void 0:i.isConnected())&&this.clientsConnected?(null===(o=this.communicationLayer)||void 0===o||o.sendMessage(t),n()):(this.debug&&console.log(`RemoteCommunication::${this.context}::sendMessage SKIP message waiting for MM mobile readiness.`),this.once(e.EventType.CLIENTS_READY,(()=>{var e;this.debug&&console.log(`RemoteCommunication::${this.context}::sendMessage AFTER SKIP / READY -- sending pending message`),null===(e=this.communicationLayer)||void 0===e||e.sendMessage(t),n()})))}))}testStorage(){var e,t;return Bv(this,void 0,void 0,(function*(){const n=yield null===(e=this.storageManager)||void 0===e?void 0:e.getPersistedChannelConfig(null!==(t=this.channelId)&&void 0!==t?t:"");console.debug("RemoteCommunication.testStorage() res",n)}))}setLastActiveDate(e){var t,n,r,i;this.debug&&console.debug(`RemoteCommunication::setLastActiveDate() channel=${this.channelId}`,e);const o={channelId:null!==(t=this.channelId)&&void 0!==t?t:"",validUntil:null!==(r=null===(n=this.channelConfig)||void 0===n?void 0:n.validUntil)&&void 0!==r?r:0,lastActive:e.getTime()};null===(i=this.storageManager)||void 0===i||i.persistChannelConfig(o)}getChannelConfig(){return this.channelConfig}isReady(){return this.ready}isConnected(){var e;return null===(e=this.communicationLayer)||void 0===e?void 0:e.isConnected()}isPaused(){return this.paused}getCommunicationLayer(){return this.communicationLayer}ping(){var e;this.debug&&console.debug(`RemoteCommunication::ping() channel=${this.channelId}`),null===(e=this.communicationLayer)||void 0===e||e.ping()}keyCheck(){var e;this.debug&&console.debug(`RemoteCommunication::keyCheck() channel=${this.channelId}`),null===(e=this.communicationLayer)||void 0===e||e.keyCheck()}setConnectionStatus(t){this._connectionStatus!==t&&(this._connectionStatus=t,this.emit(e.EventType.CONNECTION_STATUS,t),this.emitServiceStatusEvent())}emitServiceStatusEvent(){this.emit(e.EventType.SERVICE_STATUS,this.getServiceStatus())}getConnectionStatus(){return this._connectionStatus}getServiceStatus(){return{originatorInfo:this.originatorInfo,keyInfo:this.getKeyInfo(),connectionStatus:this._connectionStatus,channelConfig:this.channelConfig,channelId:this.channelId}}getKeyInfo(){var e;return null===(e=this.communicationLayer)||void 0===e?void 0:e.getKeyInfo()}resetKeys(){var e;null===(e=this.communicationLayer)||void 0===e||e.resetKeys()}pause(){var t;this.debug&&console.debug(`RemoteCommunication::pause() channel=${this.channelId}`),null===(t=this.communicationLayer)||void 0===t||t.pause(),this.setConnectionStatus(e.ConnectionStatus.PAUSED)}resume(){var t;this.debug&&console.debug(`RemoteCommunication::resume() channel=${this.channelId}`),null===(t=this.communicationLayer)||void 0===t||t.resume(),this.setConnectionStatus(e.ConnectionStatus.LINKED)}getChannelId(){return this.channelId}disconnect(t){var n,r,i,o,s,a;this.debug&&console.debug(`RemoteCommunication::disconnect() channel=${this.channelId}`,t),this.ready=!1,this.paused=!1,(null==t?void 0:t.terminate)?(null===(n=this.storageManager)||void 0===n||n.terminate(null!==(r=this.channelId)&&void 0!==r?r:""),(null===(i=this.communicationLayer)||void 0===i?void 0:i.getKeyInfo().keysExchanged)&&(null==t?void 0:t.sendMessage)&&(null===(o=this.communicationLayer)||void 0===o||o.sendMessage({type:e.MessageType.TERMINATE})),this.channelId=Wv(),t.channelId=this.channelId,this.channelConfig=void 0,this.autoStarted=!1,null===(s=this.communicationLayer)||void 0===s||s.disconnect(t),this.setConnectionStatus(e.ConnectionStatus.TERMINATED)):(null===(a=this.communicationLayer)||void 0===a||a.disconnect(t),this.setConnectionStatus(e.ConnectionStatus.DISCONNECTED))}}function Ab(){throw new Error("setTimeout has not been defined")}function _b(){throw new Error("clearTimeout has not been defined")}!function(e){e.RENEW="renew",e.LINK="link"}(e.AutoConnectType||(e.AutoConnectType={}));var Eb=Ab,Mb=_b;function kb(e){if(Eb===setTimeout)return setTimeout(e,0);if((Eb===Ab||!Eb)&&setTimeout)return Eb=setTimeout,setTimeout(e,0);try{return Eb(e,0)}catch(t){try{return Eb.call(null,e,0)}catch(t){return Eb.call(this,e,0)}}}"function"==typeof r.setTimeout&&(Eb=setTimeout),"function"==typeof r.clearTimeout&&(Mb=clearTimeout);var Sb,xb=[],Cb=!1,Tb=-1;function Ob(){Cb&&Sb&&(Cb=!1,Sb.length?xb=Sb.concat(xb):Tb=-1,xb.length&&Rb())}function Rb(){if(!Cb){var e=kb(Ob);Cb=!0;for(var t=xb.length;t;){for(Sb=xb,xb=[];++Tb<t;)Sb&&Sb[Tb].run();Tb=-1,t=xb.length}Sb=null,Cb=!1,function(e){if(Mb===clearTimeout)return clearTimeout(e);if((Mb===_b||!Mb)&&clearTimeout)return Mb=clearTimeout,clearTimeout(e);try{return Mb(e)}catch(t){try{return Mb.call(null,e)}catch(t){return Mb.call(this,e)}}}(e)}}function Pb(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];xb.push(new Nb(e,t)),1!==xb.length||Cb||kb(Rb)}function Nb(e,t){this.fun=e,this.array=t}function Lb(){}Nb.prototype.run=function(){this.fun.apply(null,this.array)};var Ib=Lb,Bb=Lb,Db=Lb,jb=Lb,Fb=Lb,Ub=Lb,qb=Lb,zb=r.performance||{},Hb=zb.now||zb.mozNow||zb.msNow||zb.oNow||zb.webkitNow||function(){return(new Date).getTime()},Kb=new Date,Vb={nextTick:Pb,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ib,addListener:Bb,once:Db,off:jb,removeListener:Fb,removeAllListeners:Ub,emit:qb,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Hb.call(zb),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Kb)/1e3}},Wb="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function $b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Yb(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Gb={exports:{}};!function(e,t){!function(t){var n=Object.hasOwnProperty,r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof Vb&&!0,o="function"==typeof Symbol,s="object"==typeof Reflect,a="function"==typeof setImmediate?setImmediate:setTimeout,l=o?s&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function u(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners!==t&&(this._maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),e.ignoreErrors&&(this.ignoreErrors=e.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),void 0!==Vb&&Vb.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,Vb.emitWarning(r)}else console.error(n),console.trace&&console.trace()}var d=function(e,t,n){var r=arguments.length;switch(r){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var i=new Array(r);r--;)i[r]=arguments[r];return i}};function f(e,n){for(var r={},i=e.length,o=n?n.length:0,s=0;s<i;s++)r[e[s]]=s<o?n[s]:t;return r}function p(e,t,n){var r,i;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(r=n.on,i=n.off),t.addEventListener?(r=t.addEventListener,i=t.removeEventListener):t.addListener?(r=t.addListener,i=t.removeListener):t.on&&(r=t.on,i=t.off),!r&&!i)throw Error("target does not implement any known event API");if("function"!=typeof r)throw TypeError("on method must be a function");if("function"!=typeof i)throw TypeError("off method must be a function");this._on=r,this._off=i;var o=e._observers;o?o.push(this):e._observers=[this]}function m(e,r,i,o){var s=Object.assign({},r);if(!e)return s;if("object"!=typeof e)throw TypeError("options must be an object");var a,l,u,c=Object.keys(e),h=c.length;function d(e){throw Error('Invalid "'+a+'" option value'+(e?". Reason: "+e:""))}for(var f=0;f<h;f++){if(a=c[f],!o&&!n.call(r,a))throw Error('Unknown "'+a+'" option');(l=e[a])!==t&&(u=i[a],s[a]=u?u(l,d):l)}return s}function g(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function v(e){var t="value must be type of "+e.join("|"),n=e.length,r=e[0],i=e[1];return 1===n?function(e,n){if(typeof e===r)return e;n(t)}:2===n?function(e,n){var o=typeof e;if(o===r||o===i)return e;n(t)}:function(r,i){for(var o=typeof r,s=n;s-- >0;)if(o===e[s])return r;i(t)}}Object.assign(p.prototype,{subscribe:function(e,t,n){var r=this,i=this._target,o=this._emitter,s=this._listeners,a=function(){var r=d.apply(null,arguments),s={data:r,name:t,original:e};n?!1!==n.call(i,s)&&o.emit.apply(o,[s.name].concat(r)):o.emit.apply(o,[t].concat(r))};if(s[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!r._onNewListener?(this._onNewListener=function(n){n===t&&null===s[e]&&(s[e]=a,r._on.call(i,e,a))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!o.hasListeners(n)&&s[e]&&(s[e]=null,r._off.call(i,e,a))},s[e]=null,o.on("removeListener",this._onRemoveListener)):(s[e]=a,r._on.call(i,e,a))},unsubscribe:function(e){var t,n,r,i=this,o=this._listeners,s=this._emitter,a=this._off,u=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function c(){i._onNewListener&&(s.off("newListener",i._onNewListener),s.off("removeListener",i._onRemoveListener),i._onNewListener=null,i._onRemoveListener=null);var e=A.call(s,i);s._observers.splice(e,1)}if(e){if(!(t=o[e]))return;a.call(u,e,t),delete o[e],--this._listenersCount||c()}else{for(r=(n=l(o)).length;r-- >0;)e=n[r],a.call(u,e,o[e]);this._listeners={},this._listenersCount=0,c()}}});var y=v(["function"]),b=v(["object","function"]);function w(e,t,n){var r,i,o,s=0,a=new e((function(l,u,c){function h(){i&&(i=null),s&&(clearTimeout(s),s=0)}n=m(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),r=!n.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof c;var d=function(e){h(),l(e)},f=function(e){h(),u(e)};r?t(d,f,c):(i=[function(e){f(e||Error("canceled"))}],t(d,f,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");i.push(e)})),o=!0),n.timeout>0&&(s=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",s=0,a.cancel(e),u(e)}),n.timeout))}));return r||(a.cancel=function(e){if(i){for(var t=i.length,n=1;n<t;n++)i[n](e);i[0](e),i=null}}),a}function A(e){var t=this._observers;if(!t)return-1;for(var n=t.length,r=0;r<n;r++)if(t[r]._target===e)return r;return-1}function _(e,t,n,r,i){if(!n)return null;if(0===r){var o=typeof t;if("string"===o){var s,a,u=0,c=0,h=this.delimiter,d=h.length;if(-1!==(a=t.indexOf(h))){s=new Array(5);do{s[u++]=t.slice(c,a),c=a+d}while(-1!==(a=t.indexOf(h,c)));s[u++]=t.slice(c),t=s,i=u}else t=[t],i=1}else"object"===o?i=t.length:(t=[t],i=1)}var f,p,m,g,v,y,b,w=null,A=t[r],E=t[r+1];if(r===i)n._listeners&&("function"==typeof n._listeners?(e&&e.push(n._listeners),w=[n]):(e&&e.push.apply(e,n._listeners),w=[n]));else{if("*"===A){for(a=(y=l(n)).length;a-- >0;)"_listeners"!==(f=y[a])&&(b=_(e,t,n[f],r+1,i))&&(w?w.push.apply(w,b):w=b);return w}if("**"===A){for((v=r+1===i||r+2===i&&"*"===E)&&n._listeners&&(w=_(e,t,n,i,i)),a=(y=l(n)).length;a-- >0;)"_listeners"!==(f=y[a])&&("*"===f||"**"===f?(n[f]._listeners&&!v&&(b=_(e,t,n[f],i,i))&&(w?w.push.apply(w,b):w=b),b=_(e,t,n[f],r,i)):b=_(e,t,n[f],f===E?r+2:r,i),b&&(w?w.push.apply(w,b):w=b));return w}n[A]&&(w=_(e,t,n[A],r+1,i))}if((p=n["*"])&&_(e,t,p,r+1,i),m=n["**"])if(r<i)for(m._listeners&&_(e,t,m,i,i),a=(y=l(m)).length;a-- >0;)"_listeners"!==(f=y[a])&&(f===E?_(e,t,m[f],r+2,i):f===A?_(e,t,m[f],r+1,i):((g={})[f]=m[f],_(e,t,{"**":g},r+1,i)));else m._listeners?_(e,t,m,i,i):m["*"]&&m["*"]._listeners&&_(e,t,m["*"],i,i);return w}function E(e,t,n){var r,i,o=0,s=0,a=this.delimiter,l=a.length;if("string"==typeof e)if(-1!==(r=e.indexOf(a))){i=new Array(5);do{i[o++]=e.slice(s,r),s=r+l}while(-1!==(r=e.indexOf(a,s)));i[o++]=e.slice(s)}else i=[e],o=1;else i=e,o=e.length;if(o>1)for(r=0;r+1<o;r++)if("**"===i[r]&&"**"===i[r+1])return;var u,c=this.listenerTree;for(r=0;r<o;r++)if(c=c[u=i[r]]||(c[u]={}),r===o-1)return c._listeners?("function"==typeof c._listeners&&(c._listeners=[c._listeners]),n?c._listeners.unshift(t):c._listeners.push(t),!c._listeners.warned&&this._maxListeners>0&&c._listeners.length>this._maxListeners&&(c._listeners.warned=!0,h.call(this,c._listeners.length,u))):c._listeners=t,!0;return!0}function M(e,t,n,r){for(var i,o,s,a,u=l(e),c=u.length,h=e._listeners;c-- >0;)i=e[o=u[c]],s="_listeners"===o?n:n?n.concat(o):[o],a=r||"symbol"==typeof o,h&&t.push(a?s:s.join(this.delimiter)),"object"==typeof i&&M.call(this,i,t,s,a);return t}function k(e){for(var t,n,r,i=l(e),o=i.length;o-- >0;)(t=e[n=i[o]])&&(r=!0,"_listeners"===n||k(t)||delete e[n]);return r}function S(e,t,n){this.emitter=e,this.event=t,this.listener=n}function x(e,n,r){if(!0===r)s=!0;else if(!1===r)o=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var o=r.async,s=r.promisify,l=r.nextTick,u=r.objectify}if(o||l||s){var c=n,h=n._origin||n;if(l&&!i)throw Error("process.nextTick is not supported");s===t&&(s="AsyncFunction"===n.constructor.name),n=function(){var e=arguments,t=this,n=this.event;return s?l?Promise.resolve():new Promise((function(e){a(e)})).then((function(){return t.event=n,c.apply(t,e)})):(l?Pb:a)((function(){t.event=n,c.apply(t,e)}))},n._async=!0,n._origin=h}return[n,u?new S(this,e,n):this]}function C(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}S.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},C.EventEmitter2=C,C.prototype.listenTo=function(e,n,i){if("object"!=typeof e)throw TypeError("target musts be an object");var o=this;function s(t){if("object"!=typeof t)throw TypeError("events must be an object");var n,r=i.reducers,s=A.call(o,e);n=-1===s?new p(o,e,i):o._observers[s];for(var a,u=l(t),c=u.length,h="function"==typeof r,d=0;d<c;d++)a=u[d],n.subscribe(a,t[a]||a,h?r:r&&r[a])}return i=m(i,{on:t,off:t,reducers:t},{on:y,off:y,reducers:b}),r(n)?s(f(n)):s("string"==typeof n?f(n.split(/\s+/)):n),this},C.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var r,i=n.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;i-- >0;)r=n[i],e&&r._target!==e||(r.unsubscribe(t),o=!0);return o},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(e){e!==t&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},C.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},C.prototype._once=function(e,t,n,r){return this._many(e,1,t,n,r)},C.prototype.many=function(e,t,n,r){return this._many(e,t,n,!1,r)},C.prototype.prependMany=function(e,t,n,r){return this._many(e,t,n,!0,r)},C.prototype._many=function(e,t,n,r,i){var o=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function s(){return 0==--t&&o.off(e,s),n.apply(this,arguments)}return s._origin=n,this._on(e,s,r,i)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,n,r,i,s,a=arguments[0],l=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return!1;if(l&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"==typeof a)){if(n=a.length,o)for(r=0;r<n;r++)if("symbol"==typeof a[r]){s=!0;break}s||(a=a.join(this.delimiter))}var c,h=arguments.length;if(this._all&&this._all.length)for(r=0,n=(c=this._all.slice()).length;r<n;r++)switch(this.event=a,h){case 1:c[r].call(this,a);break;case 2:c[r].call(this,a,arguments[1]);break;case 3:c[r].call(this,a,arguments[1],arguments[2]);break;default:c[r].apply(this,arguments)}if(l)c=[],_.call(this,c,e,this.listenerTree,0,n);else{if("function"==typeof(c=this._events[a])){switch(this.event=a,h){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(h-1),i=1;i<h;i++)t[i-1]=arguments[i];c.apply(this,t)}return!0}c&&(c=c.slice())}if(c&&c.length){if(h>3)for(t=new Array(h-1),i=1;i<h;i++)t[i-1]=arguments[i];for(r=0,n=c.length;r<n;r++)switch(this.event=a,h){case 1:c[r].call(this);break;case 2:c[r].call(this,arguments[1]);break;case 3:c[r].call(this,arguments[1],arguments[2]);break;default:c[r].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===a)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},C.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||u.call(this);var e,t,n,r,i,s,a=arguments[0],l=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(l&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"==typeof a)){if(r=a.length,o)for(i=0;i<r;i++)if("symbol"==typeof a[i]){t=!0;break}t||(a=a.join(this.delimiter))}var c,h=[],d=arguments.length;if(this._all)for(i=0,r=this._all.length;i<r;i++)switch(this.event=a,d){case 1:h.push(this._all[i].call(this,a));break;case 2:h.push(this._all[i].call(this,a,arguments[1]));break;case 3:h.push(this._all[i].call(this,a,arguments[1],arguments[2]));break;default:h.push(this._all[i].apply(this,arguments))}if(l?(c=[],_.call(this,c,e,this.listenerTree,0)):c=this._events[a],"function"==typeof c)switch(this.event=a,d){case 1:h.push(c.call(this));break;case 2:h.push(c.call(this,arguments[1]));break;case 3:h.push(c.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(d-1),s=1;s<d;s++)n[s-1]=arguments[s];h.push(c.apply(this,n))}else if(c&&c.length){if(c=c.slice(),d>3)for(n=new Array(d-1),s=1;s<d;s++)n[s-1]=arguments[s];for(i=0,r=c.length;i<r;i++)switch(this.event=a,d){case 1:h.push(c[i].call(this));break;case 2:h.push(c[i].call(this,arguments[1]));break;case 3:h.push(c[i].call(this,arguments[1],arguments[2]));break;default:h.push(c[i].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===a)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(h)},C.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},C.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},C.prototype.onAny=function(e){return this._onAny(e,!1)},C.prototype.prependAny=function(e){return this._onAny(e,!0)},C.prototype.addListener=C.prototype.on,C.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},C.prototype._on=function(e,n,r,i){if("function"==typeof e)return this._onAny(e,n),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");this._events||u.call(this);var o,s=this;return i!==t&&(n=(o=x.call(this,e,n,i))[0],s=o[1]),this._newListener&&this.emit("newListener",e,n),this.wildcard?(E.call(this,e,n,r),s):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),r?this._events[e].unshift(n):this._events[e].push(n),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,h.call(this,this._events[e].length,e))):this._events[e]=n,s)},C.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(i=_.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var s=0;s<i.length;s++){var a=i[s];if(n=a._listeners,r(n)){for(var l=-1,u=0,c=n.length;u<c;u++)if(n[u]===t||n[u].listener&&n[u].listener===t||n[u]._origin&&n[u]._origin===t){l=u;break}if(l<0)continue;return this.wildcard?a._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete a._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete a._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&k(this.listenerTree),this},C.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(n=0,r=(t=this._all).length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},C.prototype.removeListener=C.prototype.off,C.prototype.removeAllListeners=function(e){if(e===t)return!this._events||u.call(this),this;if(this.wildcard){var n,r=_.call(this,null,e,this.listenerTree,0);if(!r)return this;for(n=0;n<r.length;n++)r[n]._listeners=null;this.listenerTree&&k(this.listenerTree)}else this._events&&(this._events[e]=null);return this},C.prototype.listeners=function(e){var n,r,i,o,s,a=this._events;if(e===t){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!a)return[];for(o=(n=l(a)).length,i=[];o-- >0;)"function"==typeof(r=a[n[o]])?i.push(r):i.push.apply(i,r);return i}if(this.wildcard){if(!(s=this.listenerTree))return[];var u=[],c="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,u,c,s,0),u}return a&&(r=a[e])?"function"==typeof r?[r]:r:[]},C.prototype.eventNames=function(e){var t=this._events;return this.wildcard?M.call(this,this.listenerTree,[],null,e):t?l(t):[]},C.prototype.listenerCount=function(e){return this.listeners(e).length},C.prototype.hasListeners=function(e){if(this.wildcard){var n=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return _.call(this,n,r,this.listenerTree,0),n.length>0}var i=this._events,o=this._all;return!!(o&&o.length||i&&(e===t?l(i).length:i[e]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(e,n){var r=this,i=typeof n;return"number"===i?n={timeout:n}:"function"===i&&(n={filter:n}),w((n=m(n,{timeout:0,filter:t,handleError:!1,Promise,overload:!1},{filter:y,Promise:g})).Promise,(function(t,i,o){function s(){var o=n.filter;if(!o||o.apply(r,arguments))if(r.off(e,s),n.handleError){var a=arguments[0];a?i(a):t(d.apply(null,arguments).slice(1))}else t(d.apply(null,arguments))}o((function(){r.off(e,s)})),r._on(e,s,!1)}),{timeout:n.timeout,overload:n.overload})};var T=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return T._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");T._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return w((n=m(n,{Promise,timeout:0,overload:!1},{Promise:g})).Promise,(function(n,r,i){var o;if("function"==typeof e.addEventListener)return o=function(){n(d.apply(null,arguments))},i((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var s,a=function(){s&&e.removeListener("error",s),n(d.apply(null,arguments))};"error"!==t&&(s=function(n){e.removeListener(t,a),r(n)},e.once("error",s)),i((function(){s&&e.removeListener("error",s),e.removeListener(t,a)})),e.once(t,a)}),{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(T,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),"function"==typeof t&&t.amd?t((function(){return C})):e.exports=C}()}(Gb);var Zb=$b(Gb.exports),Qb={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,l=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]<l[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),n&&s(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=l(n(92)),i=l(n(93)),o=l(n(94)),s=l(n(95)),a=l(n(17));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),l=a.default.find(s,(function(e){return t.isOS(e)}));if(l){var u=this.satisfies(n[l]);if(void 0!==u)return u}var c=a.default.find(s,(function(e){return t.isPlatform(e)}));if(c){var h=this.satisfies(n[c]);if(void 0!==h)return h}}if(o>0){var d=Object.keys(i),f=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(Qb);var Jb=$b(Qb.exports);var Xb="INSTALLED",ew="NOT_INSTALLED",tw="REGISTERED",nw="REGISTERING",rw="RELOADING",iw={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},ow="REGISTRATION_IN_PROGRESS",sw="FORWARDER_ID",aw=function(){function e(t){var n=void 0===t?{}:t,r=n.forwarderOrigin,i=void 0===r?"https://fwd.metamask.io":r,o=n.forwarderMode,s=void 0===o?e.FORWARDER_MODE.INJECT:o;this.forwarderOrigin=i,this.forwarderMode=s,this.state=e.isMetaMaskInstalled()?Xb:ew;var a=e._detectBrowser();this.downloadUrl=a?iw[a]:iw.DEFAULT,this._onMessage=this._onMessage.bind(this),this._onMessageFromForwarder=this._onMessageFromForwarder.bind(this),this._openForwarder=this._openForwarder.bind(this),this._openDownloadPage=this._openDownloadPage.bind(this),this.startOnboarding=this.startOnboarding.bind(this),this.stopOnboarding=this.stopOnboarding.bind(this),window.addEventListener("message",this._onMessage),s===e.FORWARDER_MODE.INJECT&&"true"===sessionStorage.getItem(ow)&&e._injectForwarder(this.forwarderOrigin)}return e.prototype._onMessage=function(e){if(e.origin===this.forwarderOrigin)return"metamask:reload"===e.data.type?this._onMessageFromForwarder(e):void console.debug("Unknown message from '"+e.origin+"' with data "+JSON.stringify(e.data))},e.prototype._onMessageUnknownStateError=function(e){throw new Error("Unknown state: '"+e+"'")},e.prototype._onMessageFromForwarder=function(t){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){return function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(n){switch(n.label){case 0:switch(this.state){case rw:return[3,1];case ew:return[3,2];case Xb:return[3,3];case nw:return[3,5];case tw:return[3,6]}return[3,7];case 1:return console.debug("Ignoring message while reloading"),[3,8];case 2:return console.debug("Reloading now to register with MetaMask"),this.state=rw,location.reload(),[3,8];case 3:return console.debug("Registering with MetaMask"),this.state=nw,[4,e._register()];case 4:return n.sent(),this.state=tw,t.source.postMessage({type:"metamask:registrationCompleted"},t.origin),this.stopOnboarding(),[3,8];case 5:return console.debug("Already registering - ignoring reload message"),[3,8];case 6:return console.debug("Already registered - ignoring reload message"),[3,8];case 7:this._onMessageUnknownStateError(this.state),n.label=8;case 8:return[2]}}))}))},e.prototype.startOnboarding=function(){sessionStorage.setItem(ow,"true"),this._openDownloadPage(),this._openForwarder()},e.prototype.stopOnboarding=function(){"true"===sessionStorage.getItem(ow)&&(this.forwarderMode===e.FORWARDER_MODE.INJECT&&(console.debug("Removing forwarder"),e._removeForwarder()),sessionStorage.setItem(ow,"false"))},e.prototype._openForwarder=function(){this.forwarderMode===e.FORWARDER_MODE.OPEN_TAB?window.open(this.forwarderOrigin,"_blank"):e._injectForwarder(this.forwarderOrigin)},e.prototype._openDownloadPage=function(){window.open(this.downloadUrl,"_blank")},e.isMetaMaskInstalled=function(){return Boolean(window.ethereum&&window.ethereum.isMetaMask)},e._register=function(){return window.ethereum.request({method:"wallet_registerOnboarding"})},e._injectForwarder=function(e){var t=document.body,n=document.createElement("iframe");n.setAttribute("height","0"),n.setAttribute("width","0"),n.setAttribute("style","display: none;"),n.setAttribute("src",e),n.setAttribute("id",sw),t.insertBefore(n,t.children[0])},e._removeForwarder=function(){var e;null===(e=document.getElementById(sw))||void 0===e||e.remove()},e._detectBrowser=function(){var e=Jb.parse(window.navigator.userAgent);return"Firefox"===e.browser.name?"FIREFOX":["Chrome","Chromium"].includes(e.browser.name||"")?"CHROME":null},e.FORWARDER_MODE={INJECT:"INJECT",OPEN_TAB:"OPEN_TAB"},e}(),lw={},uw={},cw={};function hw(){}function dw(){dw.init.call(this)}function fw(e){return void 0===e._maxListeners?dw.defaultMaxListeners:e._maxListeners}function pw(e,t,n,r){var i,o,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]):(o=e._events=new hw,e._eventsCount=0),s){if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),!s.warned&&(i=fw(e))&&i>0&&s.length>i){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(a)}}else s=o[t]=n,++e._eventsCount;return e}function mw(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function gw(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function vw(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}hw.prototype=Object.create(null),dw.EventEmitter=dw,dw.usingDomains=!1,dw.prototype.domain=void 0,dw.prototype._events=void 0,dw.prototype._maxListeners=void 0,dw.defaultMaxListeners=10,dw.init=function(){this.domain=null,dw.usingDomains&&(void 0).active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new hw,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},dw.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},dw.prototype.getMaxListeners=function(){return fw(this)},dw.prototype.emit=function(e){var t,n,r,i,o,s,a,l="error"===e;if(s=this._events)l=l&&null==s.error;else if(!l)return!1;if(a=this.domain,l){if(t=arguments[1],!a){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(n=s[e]))return!1;var c="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=vw(e,r),o=0;o<r;++o)i[o].call(n)}(n,c,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=vw(e,i),s=0;s<i;++s)o[s].call(n,r)}(n,c,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,s=vw(e,o),a=0;a<o;++a)s[a].call(n,r,i)}(n,c,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var s=e.length,a=vw(e,s),l=0;l<s;++l)a[l].call(n,r,i,o)}(n,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=vw(e,i),s=0;s<i;++s)o[s].apply(n,r)}(n,c,this,i)}return!0},dw.prototype.addListener=function(e,t){return pw(this,e,t,!1)},dw.prototype.on=dw.prototype.addListener,dw.prototype.prependListener=function(e,t){return pw(this,e,t,!0)},dw.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,mw(this,e,t)),this},dw.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,mw(this,e,t)),this},dw.prototype.removeListener=function(e,t){var n,r,i,o,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new hw:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new hw,this;delete r[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(n,i);r.removeListener&&this.emit("removeListener",e,s||t)}return this},dw.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new hw,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new hw:delete n[e]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new hw,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},dw.prototype.listeners=function(e){var t,n,r=this._events;return n=r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[],n},dw.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):gw.call(e,t)},dw.prototype.listenerCount=gw,dw.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var yw=Yb(Object.freeze({__proto__:null,EventEmitter:dw,default:dw}));Object.defineProperty(cw,"__esModule",{value:!0});const bw=yw;function ww(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class Aw extends bw.EventEmitter{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const i=r[e];if(void 0===i)return!1;if("function"==typeof i)ww(i,this,t);else{const e=i.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}(i);for(let r=0;r<e;r+=1)ww(n[r],this,t)}return!0}}cw.default=Aw;var _w={},Ew={},Mw=Ow;Ow.default=Ow,Ow.stable=Lw,Ow.stableStringify=Lw;var kw="[...]",Sw="[Circular]",xw=[],Cw=[];function Tw(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ow(e,t,n,r){var i;void 0===r&&(r=Tw()),Pw(e,"",0,[],void 0,0,r);try{i=0===Cw.length?JSON.stringify(e,t,n):JSON.stringify(e,Bw(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==xw.length;){var o=xw.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Rw(e,t,n,r){var i=Object.getOwnPropertyDescriptor(r,n);void 0!==i.get?i.configurable?(Object.defineProperty(r,n,{value:e}),xw.push([r,n,t,i])):Cw.push([t,n,e]):(r[n]=e,xw.push([r,n,t]))}function Pw(e,t,n,r,i,o,s){var a;if(o+=1,"object"==typeof e&&null!==e){for(a=0;a<r.length;a++)if(r[a]===e)return void Rw(Sw,e,t,i);if(void 0!==s.depthLimit&&o>s.depthLimit)return void Rw(kw,e,t,i);if(void 0!==s.edgesLimit&&n+1>s.edgesLimit)return void Rw(kw,e,t,i);if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Pw(e[a],a,a,r,e,o,s);else{var l=Object.keys(e);for(a=0;a<l.length;a++){var u=l[a];Pw(e[u],u,a,r,e,o,s)}}r.pop()}}function Nw(e,t){return e<t?-1:e>t?1:0}function Lw(e,t,n,r){void 0===r&&(r=Tw());var i,o=Iw(e,"",0,[],void 0,0,r)||e;try{i=0===Cw.length?JSON.stringify(o,t,n):JSON.stringify(o,Bw(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==xw.length;){var s=xw.pop();4===s.length?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function Iw(e,t,n,r,i,o,s){var a;if(o+=1,"object"==typeof e&&null!==e){for(a=0;a<r.length;a++)if(r[a]===e)return void Rw(Sw,e,t,i);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==s.depthLimit&&o>s.depthLimit)return void Rw(kw,e,t,i);if(void 0!==s.edgesLimit&&n+1>s.edgesLimit)return void Rw(kw,e,t,i);if(r.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Iw(e[a],a,a,r,e,o,s);else{var l={},u=Object.keys(e).sort(Nw);for(a=0;a<u.length;a++){var c=u[a];Iw(e[c],c,a,r,e,o,s),l[c]=e[c]}if(void 0===i)return l;xw.push([i,t,e]),i[t]=l}r.pop()}}function Bw(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(Cw.length>0)for(var r=0;r<Cw.length;r++){var i=Cw[r];if(i[1]===t&&i[0]===n){n=i[2],Cw.splice(r,1);break}}return e.call(this,t,n)}}Object.defineProperty(Ew,"__esModule",{value:!0}),Ew.EthereumProviderError=Ew.EthereumRpcError=void 0;const Dw=Mw;class jw extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return Dw.default(this.serialize(),Fw,2)}}function Fw(e,t){if("[Circular]"!==t)return t}Ew.EthereumRpcError=jw,Ew.EthereumProviderError=class extends jw{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}};var Uw={},qw={};Object.defineProperty(qw,"__esModule",{value:!0}),qw.errorValues=qw.errorCodes=void 0,qw.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},qw.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=qw,n=Ew,r=t.errorCodes.rpc.internal,i={code:r,message:o(r)};function o(n,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(n)){const r=n.toString();if(u(t.errorValues,r))return t.errorValues[r].message;if(a(n))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function s(e){if(!Number.isInteger(e))return!1;const n=e.toString();return!!t.errorValues[n]||!!a(e)}function a(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=o,e.isValidCode=s,e.serializeError=function(e,{fallbackError:t=i,shouldIncludeStack:r=!1}={}){var a,c;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof n.EthereumRpcError)return e.serialize();const h={};if(e&&"object"==typeof e&&!Array.isArray(e)&&u(e,"code")&&s(e.code)){const t=e;h.code=t.code,t.message&&"string"==typeof t.message?(h.message=t.message,u(t,"data")&&(h.data=t.data)):(h.message=o(h.code),h.data={originalError:l(e)})}else{h.code=t.code;const n=null===(a=e)||void 0===a?void 0:a.message;h.message=n&&"string"==typeof n?n:t.message,h.data={originalError:l(e)}}const d=null===(c=e)||void 0===c?void 0:c.stack;return r&&e&&d&&"string"==typeof d&&(h.stack=d),h}}(Uw);var zw={};Object.defineProperty(zw,"__esModule",{value:!0}),zw.ethErrors=void 0;const Hw=Ew,Kw=Uw,Vw=qw;function Ww(e,t){const[n,r]=Yw(t);return new Hw.EthereumRpcError(e,n||Kw.getMessageFromCode(e),r)}function $w(e,t){const[n,r]=Yw(t);return new Hw.EthereumProviderError(e,n||Kw.getMessageFromCode(e),r)}function Yw(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||void 0,n]}}return[]}zw.ethErrors={rpc:{parse:e=>Ww(Vw.errorCodes.rpc.parse,e),invalidRequest:e=>Ww(Vw.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ww(Vw.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ww(Vw.errorCodes.rpc.methodNotFound,e),internal:e=>Ww(Vw.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ww(t,e)},invalidInput:e=>Ww(Vw.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ww(Vw.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ww(Vw.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ww(Vw.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ww(Vw.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ww(Vw.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>$w(Vw.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>$w(Vw.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>$w(Vw.errorCodes.provider.unsupportedMethod,e),disconnected:e=>$w(Vw.errorCodes.provider.disconnected,e),chainDisconnected:e=>$w(Vw.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new Hw.EthereumProviderError(t,n,r)}}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Ew;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Uw;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const r=zw;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});const i=qw;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return i.errorCodes}})}(_w);var Gw=Array.isArray,Zw=Object.keys,Qw=Object.prototype.hasOwnProperty,Jw={},Xw={},eA={};Object.defineProperty(eA,"__esModule",{value:!0}),eA.getUniqueId=void 0;const tA=4294967295;let nA=Math.floor(Math.random()*tA);eA.getUniqueId=function(){return nA=(nA+1)%tA,nA},Object.defineProperty(Xw,"__esModule",{value:!0}),Xw.createIdRemapMiddleware=void 0;const rA=eA;Xw.createIdRemapMiddleware=function(){return(e,t,n,r)=>{const i=e.id,o=rA.getUniqueId();e.id=o,t.id=o,n((n=>{e.id=i,t.id=i,n()}))}};var iA={};Object.defineProperty(iA,"__esModule",{value:!0}),iA.createAsyncMiddleware=void 0,iA.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,l=!1;const u=async()=>{l=!0,r((e=>{a=e,o()})),await s};try{await e(t,n,u),l?(await s,a(null)):i(null)}catch(e){a?a(e):i(e)}}};var oA={};Object.defineProperty(oA,"__esModule",{value:!0}),oA.createScaffoldMiddleware=void 0,oA.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const o=e[t.method];return void 0===o?r():"function"==typeof o?o(t,n,r,i):(n.result=o,i())}};var sA={},aA=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sA,"__esModule",{value:!0}),sA.JsonRpcEngine=void 0;const lA=aA(cw),uA=_w;class cA extends lA.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,n,r)=>{try{const[i,o,s]=await cA._runAllMiddleware(e,t,this._middleware);return o?(await cA._runReturnHandlers(s),r(i)):n((async e=>{try{await cA._runReturnHandlers(s)}catch(t){return e(t)}return e()}))}catch(e){return r(e)}}}async _handleBatch(e,t){try{const n=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,n):n}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,n)=>{t(n)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const n=new uA.EthereumRpcError(uA.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!=typeof e.method){const n=new uA.EthereumRpcError(uA.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(n,{id:e.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},e),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(e){i=e}return i&&(delete r.result,r.error||(r.error=uA.serializeError(i))),t(i,r)}async _processRequest(e,t){const[n,r,i]=await cA._runAllMiddleware(e,t,this._middleware);if(cA._checkForCompletion(e,t,r),await cA._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(e,t,n){const r=[];let i=null,o=!1;for(const s of n)if([i,o]=await cA._runMiddleware(e,t,s,r),o)break;return[i,o,r.reverse()]}static _runMiddleware(e,t,n,r){return new Promise((i=>{const o=e=>{const n=e||t.error;n&&(t.error=uA.serializeError(n)),i([n,!0])},s=n=>{t.error?o(t.error):(n&&("function"!=typeof n&&o(new uA.EthereumRpcError(uA.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${hA(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,s,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))}static _checkForCompletion(e,t,n){if(!("result"in t)&&!("error"in t))throw new uA.EthereumRpcError(uA.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${hA(e)}`,{request:e});if(!n)throw new uA.EthereumRpcError(uA.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${hA(e)}`,{request:e})}}function hA(e){return JSON.stringify(e,null,2)}sA.JsonRpcEngine=cA;var dA={};Object.defineProperty(dA,"__esModule",{value:!0}),dA.mergeMiddleware=void 0;const fA=sA;dA.mergeMiddleware=function(e){const t=new fA.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()},function(e){var t=Wb&&Wb.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Wb&&Wb.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Xw,e),n(iA,e),n(oA,e),n(eA,e),n(sA,e),n(dA,e)}(Jw);var pA={};Object.defineProperty(pA,"__esModule",{value:!0});pA.default={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};var mA={},gA={},vA=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gA,"__esModule",{value:!0}),gA.createRpcWarningMiddleware=void 0;const yA=vA(pA);gA.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1};return(n,r,i)=>{!1===t.ethDecryptDeprecation&&"eth_decrypt"===n.method?(e.warn(yA.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0):!1===t.ethGetEncryptionPublicKeyDeprecation&&"eth_getEncryptionPublicKey"===n.method&&(e.warn(yA.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0),i()}},Object.defineProperty(mA,"__esModule",{value:!0}),mA.NOOP=mA.isValidNetworkVersion=mA.isValidChainId=mA.getRpcPromiseCallback=mA.getDefaultExternalMiddleware=mA.EMITTED_NOTIFICATIONS=void 0;const bA=Jw,wA=_w,AA=gA;function _A(e){return(t,n,r)=>{"string"==typeof t.method&&t.method||(n.error=wA.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:t})),r((t=>{const{error:r}=n;return r?(e.error(`MetaMask - RPC Error: ${r.message}`,r),t()):t()}))}}mA.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]),mA.getDefaultExternalMiddleware=(e=console)=>[bA.createIdRemapMiddleware(),_A(e),AA.createRpcWarningMiddleware(e)],mA.getRpcPromiseCallback=(e,t,n=!0)=>(r,i)=>{r||i.error?t(r||i.error):!n||Array.isArray(i)?e(i):e(i.result)},mA.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x"),mA.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e,mA.NOOP=()=>{};var EA=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uw,"__esModule",{value:!0}),uw.BaseProvider=void 0;const MA=EA(cw),kA=_w,SA=EA((function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,s=Gw(t),a=Gw(n);if(s&&a){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(s!=a)return!1;var l=t instanceof Date,u=n instanceof Date;if(l!=u)return!1;if(l&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,h=n instanceof RegExp;if(c!=h)return!1;if(c&&h)return t.toString()==n.toString();var d=Zw(t);if((i=d.length)!==Zw(n).length)return!1;for(r=i;0!=r--;)if(!Qw.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[o=d[r]],n[o]))return!1;return!0}return t!=t&&n!=n})),xA=Jw,CA=EA(pA),TA=mA;class OA extends MA.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:n=[]}={}){super(),this._log=e,this.setMaxListeners(t),this._state=Object.assign({},OA._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const r=new xA.JsonRpcEngine;n.forEach((e=>r.push(e))),this._rpcEngine=r}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw kA.ethErrors.rpc.invalidRequest({message:CA.default.errors.invalidRequestArgs(),data:e});const{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw kA.ethErrors.rpc.invalidRequest({message:CA.default.errors.invalidRequestMethod(),data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw kA.ethErrors.rpc.invalidRequest({message:CA.default.errors.invalidRequestParams(),data:e});return new Promise(((e,r)=>{this._rpcRequest({method:t,params:n},TA.getRpcPromiseCallback(e,r))}))}_initializeState(e){if(!0===this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:n,isUnlocked:r,networkVersion:i}=e;this._handleConnect(n),this._handleChainChanged({chainId:n,networkVersion:i}),this._handleUnlockStateChanged({accounts:t,isUnlocked:r}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let n=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(n=(n,r)=>{this._handleAccountsChanged(r.result||[],"eth_accounts"===e.method),t(n,r)})),this._rpcEngine.handle(e,n)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(CA.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let n;this._state.isConnected=!1,e?(n=new kA.EthereumRpcError(1013,t||CA.default.errors.disconnected()),this._log.debug(n)):(n=new kA.EthereumRpcError(1011,t||CA.default.errors.permanentlyDisconnected()),this._log.error(n),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",n)}}_handleChainChanged({chainId:e}={}){TA.isValidChainId(e)?(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):this._log.error(CA.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let n=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),n=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),n=[];break}SA.default(this._state.accounts,n)||(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",n),this._state.accounts=n,this.selectedAddress!==n[0]&&(this.selectedAddress=n[0]||null),this._state.initialized&&this.emit("accountsChanged",n))}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e||[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}uw.BaseProvider=OA,OA._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1};var RA={},PA=[],NA=[],LA="undefined"!=typeof Uint8Array?Uint8Array:Array,IA=!1;function BA(){IA=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)PA[t]=e[t],NA[e.charCodeAt(t)]=t;NA["-".charCodeAt(0)]=62,NA["_".charCodeAt(0)]=63}function DA(e,t,n){for(var r,i,o=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(PA[(i=r)>>18&63]+PA[i>>12&63]+PA[i>>6&63]+PA[63&i]);return o.join("")}function jA(e){var t;IA||BA();for(var n=e.length,r=n%3,i="",o=[],s=16383,a=0,l=n-r;a<l;a+=s)o.push(DA(e,a,a+s>l?l:a+s));return 1===r?(t=e[n-1],i+=PA[t>>2],i+=PA[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=PA[t>>10],i+=PA[t>>4&63],i+=PA[t<<2&63],i+="="),o.push(i),o.join("")}function FA(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,u=l>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=a;c>0;o=256*o+e[t+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=u}return(f?-1:1)*s*Math.pow(2,o-r)}function UA(e,t,n,r,i,o){var s,a,l,u=8*o-i-1,c=(1<<u)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[n+f]=255&s,f+=p,s/=256,u-=8);e[n+f-p]|=128*m}var qA={}.toString,zA=Array.isArray||function(e){return"[object Array]"==qA.call(e)};WA.TYPED_ARRAY_SUPPORT=void 0===r.TYPED_ARRAY_SUPPORT||r.TYPED_ARRAY_SUPPORT;var HA=KA();function KA(){return WA.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function VA(e,t){if(KA()<t)throw new RangeError("Invalid typed array length");return WA.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=WA.prototype:(null===e&&(e=new WA(t)),e.length=t),e}function WA(e,t,n){if(!(WA.TYPED_ARRAY_SUPPORT||this instanceof WA))return new WA(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return GA(this,e)}return $A(this,e,t,n)}function $A(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),WA.TYPED_ARRAY_SUPPORT?(e=t).__proto__=WA.prototype:e=ZA(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!WA.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|XA(t,n),i=(e=VA(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(JA(t)){var n=0|QA(t.length);return 0===(e=VA(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?VA(e,0):ZA(e,t);if("Buffer"===t.type&&zA(t.data))return ZA(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function YA(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 GA(e,t){if(YA(t),e=VA(e,t<0?0:0|QA(t)),!WA.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function ZA(e,t){var n=t.length<0?0:0|QA(t.length);e=VA(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function QA(e){if(e>=KA())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+KA().toString(16)+" bytes");return 0|e}function JA(e){return!(null==e||!e._isBuffer)}function XA(e,t){if(JA(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 n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return S_(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return x_(e).length;default:if(r)return S_(e).length;t=(""+t).toLowerCase(),r=!0}}function e_(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return m_(this,t,n);case"utf8":case"utf-8":return h_(this,t,n);case"ascii":return f_(this,t,n);case"latin1":case"binary":return p_(this,t,n);case"base64":return c_(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g_(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function t_(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n_(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=WA.from(t,r)),JA(t))return 0===t.length?-1:r_(e,t,n,r,i);if("number"==typeof t)return t&=255,WA.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):r_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function r_(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+l>a&&(n=a-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(u(e,o+d)!==u(t,d)){h=!1;break}if(h)return o}return-1}function i_(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function o_(e,t,n,r){return C_(S_(t,e.length-n),e,n,r)}function s_(e,t,n,r){return C_(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function a_(e,t,n,r){return s_(e,t,n,r)}function l_(e,t,n,r){return C_(x_(t),e,n,r)}function u_(e,t,n,r){return C_(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function c_(e,t,n){return 0===t&&n===e.length?jA(e):jA(e.slice(t,n))}function h_(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=d_)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=d_));return n}(r)}WA.poolSize=8192,WA._augment=function(e){return e.__proto__=WA.prototype,e},WA.from=function(e,t,n){return $A(null,e,t,n)},WA.TYPED_ARRAY_SUPPORT&&(WA.prototype.__proto__=Uint8Array.prototype,WA.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&WA[Symbol.species]),WA.alloc=function(e,t,n){return function(e,t,n,r){return YA(t),t<=0?VA(e,t):void 0!==n?"string"==typeof r?VA(e,t).fill(n,r):VA(e,t).fill(n):VA(e,t)}(null,e,t,n)},WA.allocUnsafe=function(e){return GA(null,e)},WA.allocUnsafeSlow=function(e){return GA(null,e)},WA.isBuffer=T_,WA.compare=function(e,t){if(!JA(e)||!JA(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},WA.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}},WA.concat=function(e,t){if(!zA(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return WA.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=WA.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!JA(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},WA.byteLength=XA,WA.prototype._isBuffer=!0,WA.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)t_(this,t,t+1);return this},WA.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)t_(this,t,t+3),t_(this,t+1,t+2);return this},WA.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)t_(this,t,t+7),t_(this,t+1,t+6),t_(this,t+2,t+5),t_(this,t+3,t+4);return this},WA.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?h_(this,0,e):e_.apply(this,arguments)},WA.prototype.equals=function(e){if(!JA(e))throw new TypeError("Argument must be a Buffer");return this===e||0===WA.compare(this,e)},WA.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},WA.prototype.compare=function(e,t,n,r,i){if(!JA(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),l=this.slice(r,i),u=e.slice(t,n),c=0;c<a;++c)if(l[c]!==u[c]){o=l[c],s=u[c];break}return o<s?-1:s<o?1:0},WA.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},WA.prototype.indexOf=function(e,t,n){return n_(this,e,t,n,!0)},WA.prototype.lastIndexOf=function(e,t,n){return n_(this,e,t,n,!1)},WA.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return i_(this,e,t,n);case"utf8":case"utf-8":return o_(this,e,t,n);case"ascii":return s_(this,e,t,n);case"latin1":case"binary":return a_(this,e,t,n);case"base64":return l_(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u_(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},WA.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var d_=4096;function f_(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function p_(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function m_(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=k_(e[o]);return i}function g_(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function v_(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function y_(e,t,n,r,i,o){if(!JA(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function b_(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function w_(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function A_(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function __(e,t,n,r,i){return i||A_(e,0,n,4),UA(e,t,n,r,23,4),n+4}function E_(e,t,n,r,i){return i||A_(e,0,n,8),UA(e,t,n,r,52,8),n+8}WA.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),WA.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=WA.prototype;else{var i=t-e;n=new WA(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},WA.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||v_(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},WA.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||v_(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},WA.prototype.readUInt8=function(e,t){return t||v_(e,1,this.length),this[e]},WA.prototype.readUInt16LE=function(e,t){return t||v_(e,2,this.length),this[e]|this[e+1]<<8},WA.prototype.readUInt16BE=function(e,t){return t||v_(e,2,this.length),this[e]<<8|this[e+1]},WA.prototype.readUInt32LE=function(e,t){return t||v_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},WA.prototype.readUInt32BE=function(e,t){return t||v_(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},WA.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||v_(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},WA.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||v_(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},WA.prototype.readInt8=function(e,t){return t||v_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},WA.prototype.readInt16LE=function(e,t){t||v_(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},WA.prototype.readInt16BE=function(e,t){t||v_(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},WA.prototype.readInt32LE=function(e,t){return t||v_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},WA.prototype.readInt32BE=function(e,t){return t||v_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},WA.prototype.readFloatLE=function(e,t){return t||v_(e,4,this.length),FA(this,e,!0,23,4)},WA.prototype.readFloatBE=function(e,t){return t||v_(e,4,this.length),FA(this,e,!1,23,4)},WA.prototype.readDoubleLE=function(e,t){return t||v_(e,8,this.length),FA(this,e,!0,52,8)},WA.prototype.readDoubleBE=function(e,t){return t||v_(e,8,this.length),FA(this,e,!1,52,8)},WA.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||y_(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},WA.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||y_(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},WA.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,1,255,0),WA.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},WA.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,2,65535,0),WA.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):b_(this,e,t,!0),t+2},WA.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,2,65535,0),WA.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):b_(this,e,t,!1),t+2},WA.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,4,4294967295,0),WA.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):w_(this,e,t,!0),t+4},WA.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,4,4294967295,0),WA.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):w_(this,e,t,!1),t+4},WA.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);y_(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},WA.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);y_(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},WA.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,1,127,-128),WA.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},WA.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,2,32767,-32768),WA.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):b_(this,e,t,!0),t+2},WA.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,2,32767,-32768),WA.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):b_(this,e,t,!1),t+2},WA.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,4,2147483647,-2147483648),WA.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):w_(this,e,t,!0),t+4},WA.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||y_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),WA.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):w_(this,e,t,!1),t+4},WA.prototype.writeFloatLE=function(e,t,n){return __(this,e,t,!0,n)},WA.prototype.writeFloatBE=function(e,t,n){return __(this,e,t,!1,n)},WA.prototype.writeDoubleLE=function(e,t,n){return E_(this,e,t,!0,n)},WA.prototype.writeDoubleBE=function(e,t,n){return E_(this,e,t,!1,n)},WA.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!WA.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},WA.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!WA.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=JA(e)?e:S_(new WA(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var M_=/[^+\/0-9A-Za-z-_]/g;function k_(e){return e<16?"0"+e.toString(16):e.toString(16)}function S_(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function x_(e){return function(e){var t,n,r,i,o,s;IA||BA();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,s=new LA(3*a/4-o),r=o>0?a-4:a;var l=0;for(t=0,n=0;t<r;t+=4,n+=3)i=NA[e.charCodeAt(t)]<<18|NA[e.charCodeAt(t+1)]<<12|NA[e.charCodeAt(t+2)]<<6|NA[e.charCodeAt(t+3)],s[l++]=i>>16&255,s[l++]=i>>8&255,s[l++]=255&i;return 2===o?(i=NA[e.charCodeAt(t)]<<2|NA[e.charCodeAt(t+1)]>>4,s[l++]=255&i):1===o&&(i=NA[e.charCodeAt(t)]<<10|NA[e.charCodeAt(t+1)]<<4|NA[e.charCodeAt(t+2)]>>2,s[l++]=i>>8&255,s[l++]=255&i),s}(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 C_(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function T_(e){return null!=e&&(!!e._isBuffer||O_(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&O_(e.slice(0,0))}(e))}function O_(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var R_=Object.freeze({__proto__:null,Buffer:WA,INSPECT_MAX_BYTES:50,SlowBuffer:function(e){return+e!=e&&(e=0),WA.alloc(+e)},isBuffer:T_,kMaxLength:HA}),P_="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},N_=/%[sdj%]/g;function L_(e){if(!Z_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(F_(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(N_,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])$_(s)||!eE(s)?o+=" "+s:o+=" "+F_(s);return o}function I_(e,t){if(J_(r.process))return function(){return I_(e,t).apply(this,arguments)};if(!0===Vb.noDeprecation)return e;var n=!1;return function(){if(!n){if(Vb.throwDeprecation)throw new Error(t);Vb.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var B_,D_={};function j_(e){return J_(B_)&&(B_=Vb.env.NODE_DEBUG||""),e=e.toUpperCase(),D_[e]||(new RegExp("\\b"+e+"\\b","i").test(B_)?D_[e]=function(){var t=L_.apply(null,arguments);console.error("%s %d: %s",e,0,t)}:D_[e]=function(){}),D_[e]}function F_(e,t){var n={seen:[],stylize:q_};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),W_(t)?n.showHidden=t:t&&cE(n,t),J_(n.showHidden)&&(n.showHidden=!1),J_(n.depth)&&(n.depth=2),J_(n.colors)&&(n.colors=!1),J_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=U_),z_(n,e,n.depth)}function U_(e,t){var n=F_.styles[t];return n?"["+F_.colors[n][0]+"m"+e+"["+F_.colors[n][1]+"m":e}function q_(e,t){return e}function z_(e,t,n){if(e.customInspect&&t&&rE(t.inspect)&&t.inspect!==F_&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Z_(r)||(r=z_(e,r,n)),r}var i=function(e,t){if(J_(t))return e.stylize("undefined","undefined");if(Z_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return G_(t)?e.stylize(""+t,"number"):W_(t)?e.stylize(""+t,"boolean"):$_(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),nE(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return H_(t);if(0===o.length){if(rE(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(X_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(tE(t))return e.stylize(Date.prototype.toString.call(t),"date");if(nE(t))return H_(t)}var l,u="",c=!1,h=["{","}"];return V_(t)&&(c=!0,h=["[","]"]),rE(t)&&(u=" [Function"+(t.name?": "+t.name:"")+"]"),X_(t)&&(u=" "+RegExp.prototype.toString.call(t)),tE(t)&&(u=" "+Date.prototype.toUTCString.call(t)),nE(t)&&(u=" "+H_(t)),0!==o.length||c&&0!=t.length?n<0?X_(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=c?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)hE(t,String(s))?o.push(K_(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(K_(e,t,n,r,i,!0))})),o}(e,t,n,s,o):o.map((function(r){return K_(e,t,n,s,r,c)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,u,h)):h[0]+u+h[1]}function H_(e){return"["+Error.prototype.toString.call(e)+"]"}function K_(e,t,n,r,i,o){var s,a,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(a=e.stylize("[Setter]","special")),hE(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(l.value)<0?(a=$_(n)?z_(e,l.value,null):z_(e,l.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),J_(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function V_(e){return Array.isArray(e)}function W_(e){return"boolean"==typeof e}function $_(e){return null===e}function Y_(e){return null==e}function G_(e){return"number"==typeof e}function Z_(e){return"string"==typeof e}function Q_(e){return"symbol"==typeof e}function J_(e){return void 0===e}function X_(e){return eE(e)&&"[object RegExp]"===sE(e)}function eE(e){return"object"==typeof e&&null!==e}function tE(e){return eE(e)&&"[object Date]"===sE(e)}function nE(e){return eE(e)&&("[object Error]"===sE(e)||e instanceof Error)}function rE(e){return"function"==typeof e}function iE(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function oE(e){return T_(e)}function sE(e){return Object.prototype.toString.call(e)}function aE(e){return e<10?"0"+e.toString(10):e.toString(10)}F_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},F_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var lE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function uE(){console.log("%s - %s",function(){var e=new Date,t=[aE(e.getHours()),aE(e.getMinutes()),aE(e.getSeconds())].join(":");return[e.getDate(),lE[e.getMonth()],t].join(" ")}(),L_.apply(null,arguments))}function cE(e,t){if(!t||!eE(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function hE(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var dE={inherits:P_,_extend:cE,log:uE,isBuffer:oE,isPrimitive:iE,isFunction:rE,isError:nE,isDate:tE,isObject:eE,isRegExp:X_,isUndefined:J_,isSymbol:Q_,isString:Z_,isNumber:G_,isNullOrUndefined:Y_,isNull:$_,isBoolean:W_,isArray:V_,inspect:F_,deprecate:I_,format:L_,debuglog:j_},fE=Object.freeze({__proto__:null,_extend:cE,debuglog:j_,default:dE,deprecate:I_,format:L_,inherits:P_,inspect:F_,isArray:V_,isBoolean:W_,isBuffer:oE,isDate:tE,isError:nE,isFunction:rE,isNull:$_,isNullOrUndefined:Y_,isNumber:G_,isObject:eE,isPrimitive:iE,isRegExp:X_,isString:Z_,isSymbol:Q_,isUndefined:J_,log:uE});function pE(){this.head=null,this.tail=null,this.length=0}pE.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},pE.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},pE.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},pE.prototype.clear=function(){this.head=this.tail=null,this.length=0},pE.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},pE.prototype.concat=function(e){if(0===this.length)return WA.alloc(0);if(1===this.length)return this.head.data;for(var t=WA.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var mE=WA.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function gE(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!mE(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=yE;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=bE;break;default:return void(this.write=vE)}this.charBuffer=new WA(6),this.charReceived=0,this.charLength=0}function vE(e){return e.toString(this.encoding)}function yE(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function bE(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}gE.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},gE.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},gE.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t},_E.ReadableState=AE;var wE=j_("stream");function AE(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof ZE&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new pE,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new gE(e.encoding),this.encoding=e.encoding)}function _E(e){if(!(this instanceof _E))return new _E(e);this._readableState=new AE(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),dw.call(this)}function EE(e,t,n,r,i){var o=function(e,t){var n=null;return T_(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,SE(e)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var l;!t.decoder||i||r||(n=t.decoder.write(n),l=!t.objectMode&&0===n.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&SE(e))),function(e,t){t.readingMore||(t.readingMore=!0,Pb(CE,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}P_(_E,dw),_E.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=WA.from(e,t),t=""),EE(this,n,e,t,!1)},_E.prototype.unshift=function(e){return EE(this,this._readableState,e,"",!0)},_E.prototype.isPaused=function(){return!1===this._readableState.flowing},_E.prototype.setEncoding=function(e){return this._readableState.decoder=new gE(e),this._readableState.encoding=e,this};var ME=8388608;function kE(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=ME?e=ME:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function SE(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(wE("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Pb(xE,e):xE(e))}function xE(e){wE("emit readable"),e.emit("readable"),RE(e)}function CE(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(wE("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function TE(e){wE("readable nexttick read 0"),e.read(0)}function OE(e,t){t.reading||(wE("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),RE(e),t.flowing&&!t.reading&&e.read(0)}function RE(e){var t=e._readableState;for(wE("flow",t.flowing);t.flowing&&null!==e.read(););}function PE(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=WA.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0==(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function NE(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Pb(LE,t,e))}function LE(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function IE(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function BE(){}function DE(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function jE(e,t){Object.defineProperty(this,"buffer",{get:I_((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof ZE&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?Pb(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=HE(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||zE(e,n),r?Pb(qE,e,n,o,i):qE(e,n,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new WE(this)}function FE(e){if(!(this instanceof FE||this instanceof ZE))return new FE(e);this._writableState=new jE(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),dw.call(this)}function UE(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function qE(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),VE(e,t)}function zE(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;UE(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new WE(t)}else{for(;n;){var a=n.chunk,l=n.encoding,u=n.callback;if(UE(e,t,!1,t.objectMode?1:a.length,a,l,u),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function HE(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function KE(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function VE(e,t){var n=HE(t);return n&&(0===t.pendingcb?(KE(e,t),t.finished=!0,e.emit("finish")):KE(e,t)),n}function WE(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}_E.prototype.read=function(e){wE("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return wE("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?NE(this):SE(this),null;if(0===(e=kE(e,t))&&t.ended)return 0===t.length&&NE(this),null;var r,i=t.needReadable;return wE("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&wE("length less than watermark",i=!0),t.ended||t.reading?wE("reading or ended",i=!1):i&&(wE("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=kE(n,t))),null===(r=e>0?PE(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&NE(this)),null!==r&&this.emit("data",r),r},_E.prototype._read=function(e){this.emit("error",new Error("not implemented"))},_E.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,wE("pipe count=%d opts=%j",r.pipesCount,t);var i=t&&!1===t.end?u:s;function o(e){wE("onunpipe"),e===n&&u()}function s(){wE("onend"),e.end()}r.endEmitted?Pb(i):n.once("end",i),e.on("unpipe",o);var a=function(e){return function(){var t=e._readableState;wE("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,RE(e))}}(n);e.on("drain",a);var l=!1;function u(){wE("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",a),e.removeListener("error",d),e.removeListener("unpipe",o),n.removeListener("end",s),n.removeListener("end",u),n.removeListener("data",h),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var c=!1;function h(t){wE("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==IE(r.pipes,e))&&!l&&(wE("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function d(t){wE("onerror",t),m(),e.removeListener("error",d),0===("error",e.listeners("error").length)&&e.emit("error",t)}function f(){e.removeListener("finish",p),m()}function p(){wE("onfinish"),e.removeListener("close",f),m()}function m(){wE("unpipe"),n.unpipe(e)}return n.on("data",h),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",n),r.flowing||(wE("pipe resume"),n.resume()),e},_E.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=IE(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},_E.prototype.on=function(e,t){var n=dw.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&SE(this):Pb(TE,this))}return n},_E.prototype.addListener=_E.prototype.on,_E.prototype.resume=function(){var e=this._readableState;return e.flowing||(wE("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Pb(OE,e,t))}(this,e)),this},_E.prototype.pause=function(){return wE("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(wE("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_E.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(wE("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){wE("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n])}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){wE("wrapped _read",t),n&&(n=!1,e.resume())},r},_E._fromList=PE,FE.WritableState=jE,P_(FE,dw),jE.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},FE.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},FE.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),WA.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=BE),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),Pb(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):WA.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Pb(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=WA.from(t,n)),t}(t,n,r),WA.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;if(s||(t.needDrain=!0),t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new DE(n,r,i),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else UE(e,t,!1,o,n,r,i);return s}(this,r,e,t,n)),i},FE.prototype.cork=function(){this._writableState.corked++},FE.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||zE(this,e))},FE.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},FE.prototype._write=function(e,t,n){n(new Error("not implemented"))},FE.prototype._writev=null,FE.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,VE(e,t),n&&(t.finished?Pb(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},P_(ZE,_E);for(var $E=Object.keys(FE.prototype),YE=0;YE<$E.length;YE++){var GE=$E[YE];ZE.prototype[GE]||(ZE.prototype[GE]=FE.prototype[GE])}function ZE(e){if(!(this instanceof ZE))return new ZE(e);_E.call(this,e),FE.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",QE)}function QE(){this.allowHalfOpen||this._writableState.ended||Pb(JE,this)}function JE(e){e.end()}function XE(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&e.push(n),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function eM(e){if(!(this instanceof eM))return new eM(e);ZE.call(this,e),this._transformState=new XE(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){tM(t,e)})):tM(t)}))}function tM(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function nM(e){if(!(this instanceof nM))return new nM(e);eM.call(this,e)}function rM(){dw.call(this)}P_(eM,ZE),eM.prototype.push=function(e,t){return this._transformState.needTransform=!1,ZE.prototype.push.call(this,e,t)},eM.prototype._transform=function(e,t,n){throw new Error("Not implemented")},eM.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},eM.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},P_(nM,eM),nM.prototype._transform=function(e,t,n){n(null,e)},P_(rM,dw),rM.Readable=_E,rM.Writable=FE,rM.Duplex=ZE,rM.Transform=eM,rM.PassThrough=nM,rM.Stream=rM,rM.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",a));var o=!1;function s(){o||(o=!0,e.end())}function a(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(u(),0===dw.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",l),e.on("error",l),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e};const iM=Yb(Object.freeze({__proto__:null,Duplex:ZE,PassThrough:nM,Readable:_E,Stream:rM,Transform:eM,Writable:FE,default:rM}));var oM=class extends iM.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect()))}_onMessage(e){if(T_(e)){const t=WA.from(e);this.push(t)}else this.push(e)}_onDisconnect(){this.destroy()}_read(){}_write(e,t,n){try{if(T_(e)){const t=e.toJSON();t._isBuffer=!0,this._port.postMessage(t)}else this._port.postMessage(e)}catch(e){return n(new Error("PortDuplexStream - disconnected"))}return n()}},sM=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},aM=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},lM=function(e){this.version=e,this.type="node",this.name="node",this.os=Vb.platform},uM=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},cM=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},hM=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},dM=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,fM=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],pM=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function mM(e){return""!==e&&fM.reduce((function(t,n){var r=n[0],i=n[1];if(t)return t;var o=i.exec(e);return!!o&&[r,o]}),!1)}function gM(e){var t=mM(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new cM;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<3&&(i=sM(sM([],i,!0),function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-i.length),!0)):i=[];var o=i.join("."),s=vM(e),a=dM.exec(e);return a&&a[1]?new uM(n,o,s,a[1]):new aM(n,o,s)}function vM(e){for(var t=0,n=pM.length;t<n;t++){var r=pM[t],i=r[0];if(r[1].exec(e))return i}return null}function yM(){return void 0!==Vb&&Vb.version?new lM(Vb.version.slice(1)):null}var bM=Object.freeze({__proto__:null,BotInfo:cM,BrowserInfo:aM,NodeInfo:lM,ReactNativeInfo:hM,SearchBotDeviceInfo:uM,browserName:function(e){var t=mM(e);return t?t[0]:null},detect:function(e){return e?gM(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new hM:"undefined"!=typeof navigator?gM(navigator.userAgent):yM()},detectOS:vM,getNodeVersion:yM,parseUserAgent:gM}),wM=Yb(bM),AM={},_M={},EM=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_M,"__esModule",{value:!0}),_M.sendSiteMetadata=void 0;const MM=EM(pA),kM=mA;function SM(e){const{document:t}=e,n=t.querySelector('head > meta[property="og:site_name"]');if(n)return n.content;const r=t.querySelector('head > meta[name="title"]');return r?r.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function xM(e){const{document:t}=e,n=t.querySelectorAll('head > link[rel~="icon"]');for(const e of n)if(e&&await CM(e.href))return e.href;return null}function CM(e){return new Promise(((t,n)=>{try{const n=document.createElement("img");n.onload=()=>t(!0),n.onerror=()=>t(!1),n.src=e}catch(e){n(e)}}))}_M.sendSiteMetadata=async function(e,t){try{const t=await async function(){return{name:SM(window),icon:await xM(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},kM.NOOP)}catch(e){t.error({message:MM.default.errors.sendSiteMetadata(),originalError:e})}};var TM={},OM={},RM={exports:{}},PM={exports:{}};void 0===Vb||!Vb.version||0===Vb.version.indexOf("v0.")||0===Vb.version.indexOf("v1.")&&0!==Vb.version.indexOf("v1.8.")?PM.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,s=arguments.length;switch(s){case 0:case 1:return Pb(e);case 2:return Pb((function(){e.call(null,t)}));case 3:return Pb((function(){e.call(null,t,n)}));case 4:return Pb((function(){e.call(null,t,n,r)}));default:for(i=new Array(s-1),o=0;o<i.length;)i[o++]=arguments[o];return Pb((function(){e.apply(null,i)}))}}}:PM.exports=Vb;var NM=PM.exports,LM={}.toString,IM=Array.isArray||function(e){return"[object Array]"==LM.call(e)},BM=yw.EventEmitter,DM={exports:{}},jM=Yb(R_);!function(e,t){var n=jM,r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o),i(r,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(DM,DM.exports);var FM=DM.exports,UM={};function qM(e){return Object.prototype.toString.call(e)}UM.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===qM(e)},UM.isBoolean=function(e){return"boolean"==typeof e},UM.isNull=function(e){return null===e},UM.isNullOrUndefined=function(e){return null==e},UM.isNumber=function(e){return"number"==typeof e},UM.isString=function(e){return"string"==typeof e},UM.isSymbol=function(e){return"symbol"==typeof e},UM.isUndefined=function(e){return void 0===e},UM.isRegExp=function(e){return"[object RegExp]"===qM(e)},UM.isObject=function(e){return"object"==typeof e&&null!==e},UM.isDate=function(e){return"[object Date]"===qM(e)},UM.isError=function(e){return"[object Error]"===qM(e)||e instanceof Error},UM.isFunction=function(e){return"function"==typeof e},UM.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},UM.isBuffer=jM.Buffer.isBuffer;var zM={exports:{}};"function"==typeof Object.create?zM.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:zM.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var HM,KM=zM.exports,VM=Yb(fE),WM={exports:{}};var $M=NM;function YM(e,t){e.emit("error",t)}var GM,ZM,QM,JM,XM={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,$M.nextTick(YM,this,e)):$M.nextTick(YM,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,$M.nextTick(YM,n,e)):$M.nextTick(YM,n,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}},ek=function(e,t){if(tk("noDeprecation"))return e;var n=!1;return function(){if(!n){if(tk("throwDeprecation"))throw new Error(t);tk("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}};function tk(e){try{if(!Wb.localStorage)return!1}catch(e){return!1}var t=Wb.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}function nk(){if(ZM)return GM;ZM=1;var e=NM;function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}GM=f;var n,r=e.nextTick;f.WritableState=d;var i=Object.create(UM);i.inherits=KM;var o,s=ek,a=BM,l=FM.Buffer,u=(void 0!==Wb?Wb:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=XM;function h(){}function d(i,o){n=n||rk(),i=i||{};var s=o instanceof n;this.objectMode=!!i.objectMode,s&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var a=i.highWaterMark,l=i.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:s&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===i.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,n){var i=t._writableState,o=i.sync,s=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),n)!function(t,n,r,i,o){--n.pendingcb,r?(e.nextTick(o,i),e.nextTick(b,t,n),t._writableState.errorEmitted=!0,t.emit("error",i)):(o(i),t._writableState.errorEmitted=!0,t.emit("error",i),b(t,n))}(t,i,o,n,s);else{var a=v(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||g(t,i),o?r(m,t,i,a,s):m(t,i,a,s)}}(o,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function f(e){if(n=n||rk(),!(o.call(f,this)||this instanceof n))return new f(e);this._writableState=new d(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function p(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function m(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),b(e,t)}function g(e,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(e._writev&&r&&r.next){var i=n.bufferedRequestCount,o=new Array(i),s=n.corkedRequestsFree;s.entry=r;for(var a=0,l=!0;r;)o[a]=r,r.isBuf||(l=!1),r=r.next,a+=1;o.allBuffers=l,p(e,n,!0,n.length,o,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new t(n),n.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(p(e,n,!1,n.objectMode?1:u.length,u,c,h),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function y(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),b(e,t)}))}function b(t,n){var r=v(n);return r&&(function(t,n){n.prefinished||n.finalCalled||("function"==typeof t._final?(n.pendingcb++,n.finalCalled=!0,e.nextTick(y,t,n)):(n.prefinished=!0,t.emit("prefinish")))}(t,n),0===n.pendingcb&&(n.finished=!0,t.emit("finish"))),r}return i.inherits(f,a),d.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(d.prototype,"buffer",{get:s((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===f&&e&&e._writableState instanceof d}})):o=function(e){return e instanceof this},f.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},f.prototype.write=function(t,n,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,l.isBuffer(i)||i instanceof u);return a&&!l.isBuffer(t)&&(t=function(e){return l.from(e)}(t)),"function"==typeof n&&(r=n,n=null),a?n="buffer":n||(n=o.defaultEncoding),"function"!=typeof r&&(r=h),o.ended?function(t,n){var r=new Error("write after end");t.emit("error",r),e.nextTick(n,r)}(this,r):(a||function(t,n,r,i){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||n.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),e.nextTick(i,s),o=!1),o}(this,o,t,r))&&(o.pendingcb++,s=function(e,t,n,r,i,o){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else p(e,t,!1,a,r,i,o);return u}(this,o,a,t,n,r)),s},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||g(this,e))},f.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),f.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},f.prototype._writev=null,f.prototype.end=function(t,n,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,n,r){n.ending=!0,b(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),f.prototype.destroy=c.destroy,f.prototype._undestroy=c.undestroy,f.prototype._destroy=function(e,t){this.end(),t(e)},GM}function rk(){if(JM)return QM;JM=1;var e=NM,t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};QM=l;var n=Object.create(UM);n.inherits=KM;var r=uk(),i=nk();n.inherits(l,r);for(var o=t(i.prototype),s=0;s<o.length;s++){var a=o[s];l.prototype[a]||(l.prototype[a]=i.prototype[a])}function l(e){if(!(this instanceof l))return new l(e);r.call(this,e),i.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||e.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(t,n){this.push(null),this.end(),e.nextTick(n,t)},QM}var ik,ok,sk,ak={};function lk(){if(ik)return ak;ik=1;var e=FM.Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var r;switch(this.encoding=function(n){var r=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof r&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return r||n}(n),this.encoding){case"utf16le":this.text=o,this.end=s,r=4;break;case"utf8":this.fillLast=i,r=4;break;case"base64":this.text=a,this.end=l,r=3;break;default:return this.write=u,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(r)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function i(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function c(e){return e&&e.length?this.write(e):""}return ak.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},n.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var o=r(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},ak}function uk(){if(sk)return ok;sk=1;var e=NM;ok=m;var t,n=IM;m.ReadableState=p,yw.EventEmitter;var r=function(e,t){return e.listeners(t).length},i=BM,o=FM.Buffer,s=(void 0!==Wb?Wb:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},a=Object.create(UM);a.inherits=KM;var l=VM,u=void 0;u=l&&l.debuglog?l.debuglog("stream"):function(){};var c,h=(HM||(HM=1,function(e){var t=FM.Buffer,n=VM;e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var n,r,i=t.allocUnsafe(e>>>0),o=this.head,s=0;o;)n=i,r=s,o.data.copy(n,r),s+=o.data.length,o=o.next;return i},e}(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})}(WM)),WM.exports),d=XM;a.inherits(m,i);var f=["error","close","destroy","pause","resume"];function p(e,n){e=e||{};var r=n instanceof(t=t||rk());this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=lk().StringDecoder),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function m(e){if(t=t||rk(),!(this instanceof m))return new m(e);this._readableState=new p(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),i.call(this)}function g(e,t,n,r,i){var a,l=e._readableState;return null===t?(l.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,w(e)}}(e,l)):(i||(a=function(e,t){var n,r;return r=t,o.isBuffer(r)||r instanceof s||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(l,t)),a?e.emit("error",a):l.objectMode||t&&t.length>0?("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),r?l.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,l,t,!0):l.ended?e.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?v(e,l,t,!1):_(e,l)):v(e,l,t,!1))):r||(l.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(l)}function v(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&w(e)),_(e,t)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),m.prototype.destroy=d.destroy,m.prototype._undestroy=d.undestroy,m.prototype._destroy=function(e,t){this.push(null),t(e)},m.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=o.from(e,t),t=""),n=!0),g(this,e,t,!1,n)},m.prototype.unshift=function(e){return g(this,e,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(e){return c||(c=lk().StringDecoder),this._readableState.decoder=new c(e),this._readableState.encoding=e,this};var y=8388608;function b(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=y?e=y:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function w(t){var n=t._readableState;n.needReadable=!1,n.emittedReadable||(u("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?e.nextTick(A,t):A(t))}function A(e){u("emit readable"),e.emit("readable"),S(e)}function _(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(E,t,n))}function E(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(u("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function M(e){u("readable nexttick read 0"),e.read(0)}function k(e,t){t.reading||(u("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),S(e),t.flowing&&!t.reading&&e.read(0)}function S(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function x(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=o.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(s.copy(n,n.length-e,0,a),0==(e-=a)){a===s.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function C(t){var n=t._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,e.nextTick(T,n,t))}function T(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}return m.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):w(this),null;if(0===(e=b(e,t))&&t.ended)return 0===t.length&&C(this),null;var r,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=b(n,t))),null===(r=e>0?x(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(t,i){var o=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,u("pipe count=%d opts=%j",s.pipesCount,i);var a=i&&!1===i.end||t===Vb.stdout||t===Vb.stderr?v:l;function l(){u("onend"),t.end()}s.endEmitted?e.nextTick(a):o.once("end",a),t.on("unpipe",(function e(n,r){u("onunpipe"),n===o&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),t.removeListener("close",m),t.removeListener("finish",g),t.removeListener("drain",c),t.removeListener("error",p),t.removeListener("unpipe",e),o.removeListener("end",l),o.removeListener("end",v),o.removeListener("data",f),h=!0,!s.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&r(e,"data")&&(t.flowing=!0,S(e))}}(o);t.on("drain",c);var h=!1,d=!1;function f(e){u("ondata"),d=!1,!1!==t.write(e)||d||((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==O(s.pipes,t))&&!h&&(u("false write response, pause",s.awaitDrain),s.awaitDrain++,d=!0),o.pause())}function p(e){u("onerror",e),v(),t.removeListener("error",p),0===r(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",g),v()}function g(){u("onfinish"),t.removeListener("close",m),v()}function v(){u("unpipe"),o.unpipe(t)}return o.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(t,"error",p),t.once("close",m),t.once("finish",g),t.emit("pipe",o),s.flowing||(u("pipe resume"),o.resume()),t},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=O(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},m.prototype.on=function(t,n){var r=i.prototype.on.call(this,t,n);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var o=this._readableState;o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.emittedReadable=!1,o.reading?o.length&&w(this):e.nextTick(M,this))}return r},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!0,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(k,t,n))}(this,t)),this},m.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){u("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<f.length;o++)e.on(f[o],this.emit.bind(this,f[o]));return this._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=x,ok}var ck=pk,hk=rk(),dk=Object.create(UM);function fk(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function pk(e){if(!(this instanceof pk))return new pk(e);hk.call(this,e),this._transformState={afterTransform:fk.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",mk)}function mk(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){gk(e,t,n)})):gk(this,null,null)}function gk(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}dk.inherits=KM,dk.inherits(pk,hk),pk.prototype.push=function(e,t){return this._transformState.needTransform=!1,hk.prototype.push.call(this,e,t)},pk.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},pk.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},pk.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},pk.prototype._destroy=function(e,t){var n=this;hk.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))};var vk=wk,yk=ck,bk=Object.create(UM);function wk(e){if(!(this instanceof wk))return new wk(e);yk.call(this,e)}bk.inherits=KM,bk.inherits(wk,yk),wk.prototype._transform=function(e,t,n){n(null,e)},function(e,t){(t=e.exports=uk()).Stream=t,t.Readable=t,t.Writable=nk(),t.Duplex=rk(),t.Transform=ck,t.PassThrough=vk}(RM,RM.exports);var Ak=RM.exports,_k={exports:{}},Ek=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}};function Mk(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function kk(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}_k.exports=Ek(Mk),_k.exports.strict=Ek(kk),Mk.proto=Mk((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Mk(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return kk(this)},configurable:!0})}));var Sk=_k.exports,xk=Sk,Ck=function(){},Tk=function(e,t,n){if("function"==typeof t)return Tk(e,null,t);t||(t={}),n=xk(n||Ck);var r=e._writableState,i=e._readableState,o=t.readable||!1!==t.readable&&e.readable,s=t.writable||!1!==t.writable&&e.writable,a=!1,l=function(){e.writable||u()},u=function(){s=!1,o||n.call(e)},c=function(){o=!1,s||n.call(e)},h=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},d=function(t){n.call(e,t)},f=function(){Pb(p)},p=function(){if(!a)return(!o||i&&i.ended&&!i.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},m=function(){e.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",u),e.on("abort",f),e.req?m():e.on("request",m)):s&&!r&&(e.on("end",l),e.on("close",l)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",h),e.on("end",c),e.on("finish",u),!1!==t.error&&e.on("error",d),e.on("close",f),function(){a=!0,e.removeListener("complete",u),e.removeListener("abort",f),e.removeListener("request",m),e.req&&e.req.removeListener("finish",u),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",u),e.removeListener("exit",h),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",f)}},Ok=Tk,Rk={};Object.defineProperty(Rk,"__esModule",{value:!0}),Rk.Substream=void 0;const Pk=Ak;class Nk extends Pk.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}Rk.Substream=Nk;var Lk=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(OM,"__esModule",{value:!0}),OM.ObjectMultiplex=void 0;const Ik=Ak,Bk=Lk(Ok),Dk=Lk(Sk),jk=Rk,Fk=Symbol("IGNORE_SUBSTREAM");class Uk extends Ik.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new jk.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const n=Dk.default(t);Bk.default(e,{readable:!1},n),Bk.default(e,{writable:!1},n)}(this,(e=>t.destroy(e||void 0))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=Fk}_read(){}_write(e,t,n){const{name:r,data:i}=e;if(!r)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const o=this._substreams[r];return o?(o!==Fk&&o.push(i),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${r}"`),n())}}OM.ObjectMultiplex=Uk;var qk=OM.ObjectMultiplex;const zk=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;zk.writable=e=>zk(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,zk.readable=e=>zk(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,zk.duplex=e=>zk.writable(e)&&zk.readable(e),zk.transform=e=>zk.duplex(e)&&"function"==typeof e._transform;var Hk=zk,Kk={},Vk={};Object.defineProperty(Vk,"__esModule",{value:!0});const Wk=Ak;Vk.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,n=new Wk.Duplex({objectMode:!0,read:()=>{},write:function(e,r,i){t.handle(e,((e,t)=>{n.push(t)})),i()}});return t.on&&t.on("notification",(e=>{n.push(e)})),n};var $k={},Yk=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($k,"__esModule",{value:!0});const Gk=Yk(cw),Zk=Ak;$k.default=function(e={}){const t={},n=new Zk.Duplex({objectMode:!0,read:()=>{},write:function(n,o,s){let a=null;try{n.id?function(e){const n=t[e.id];n?(delete t[e.id],Object.assign(n.res,e),setTimeout(n.end)):console.warn(`StreamMiddleware - Unknown response id "${e.id}"`)}(n):function(n){(null==e?void 0:e.retryOnMessage)&&n.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:n=0})=>{if(e.id){if(n>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=n+1,i(e)}})),r.emit("notification",n)}(n)}catch(e){a=e}s(a)}}),r=new Gk.default;return{events:r,middleware:(e,n,r,o)=>{i(e),t[e.id]={req:e,res:n,next:r,end:o}},stream:n};function i(e){n.push(e)}};var Qk=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kk,"__esModule",{value:!0}),Kk.createStreamMiddleware=Kk.createEngineStream=void 0;const Jk=Qk(Vk);Kk.createEngineStream=Jk.default;const Xk=Qk($k);Kk.createStreamMiddleware=Xk.default;var eS=Sk,tS=Ok,nS=Yb(Object.freeze({__proto__:null,default:{}})),rS=function(){},iS=/^v?\.0/.test(Vb.version),oS=function(e){return"function"==typeof e},sS=function(e){e()},aS=function(e,t){return e.pipe(t)},lS=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(TM,"__esModule",{value:!0}),TM.StreamProvider=TM.AbstractStreamProvider=void 0;const uS=lS(qk),cS=Hk,hS=Kk,dS=lS((function(){var e,t=Array.prototype.slice.call(arguments),n=oS(t[t.length-1]||rS)&&t.pop()||rS;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,o){var s=o<t.length-1;return function(e,t,n,r){r=eS(r);var i=!1;e.on("close",(function(){i=!0})),tS(e,{readable:t,writable:n},(function(e){if(e)return r(e);i=!0,r()}));var o=!1;return function(t){if(!i&&!o)return o=!0,function(e){return!!iS&&!!nS&&(e instanceof(nS.ReadStream||rS)||e instanceof(nS.WriteStream||rS))&&oS(e.close)}(e)?e.close(rS):function(e){return e.setHeader&&oS(e.abort)}(e)?e.abort():oS(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}}(i,s,o>0,(function(t){e||(e=t),t&&r.forEach(sS),s||(r.forEach(sS),n(e))}))}));return t.reduce(aS)})),fS=lS(pA),pS=mA,mS=uw;class gS extends mS.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:n,maxEventListeners:r,rpcMiddleware:i}){if(super({logger:n,maxEventListeners:r,rpcMiddleware:i}),!cS.duplex(e))throw new Error(fS.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const o=new uS.default;dS.default(e,o,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=hS.createStreamMiddleware({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),dS.default(this._jsonRpcConnection.stream,o.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:n,params:r}=t;"metamask_accountsChanged"===n?this._handleAccountsChanged(r):"metamask_unlockStateChanged"===n?this._handleUnlockStateChanged(r):"metamask_chainChanged"===n?this._handleChainChanged(r):pS.EMITTED_NOTIFICATIONS.includes(n)?this.emit("message",{type:n,data:r}):"METAMASK_STREAM_FAILURE"===n&&e.destroy(new Error(fS.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let n=`MetaMask: Lost connection to "${e}".`;(null==t?void 0:t.stack)&&(n+=`\n${t.stack}`),this._log.warn(n),this.listenerCount("error")>0&&this.emit("error",n),this._handleDisconnect(!1,t?t.message:void 0)}_handleChainChanged({chainId:e,networkVersion:t}={}){pS.isValidChainId(e)&&pS.isValidNetworkVersion(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(fS.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}TM.AbstractStreamProvider=gS,TM.StreamProvider=class extends gS{async initialize(){return this._initializeStateAsync()}},function(e){var t=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.MetaMaskInpageProvider=e.MetaMaskInpageProviderStreamName=void 0;const n=_w,r=_M,i=t(pA),o=mA,s=TM;e.MetaMaskInpageProviderStreamName="metamask-provider";class a extends s.AbstractStreamProvider{constructor(t,{jsonRpcStreamName:n=e.MetaMaskInpageProviderStreamName,logger:i=console,maxEventListeners:s,shouldSendMetadata:a}={}){if(super(t,{jsonRpcStreamName:n,logger:i,maxEventListeners:s,rpcMiddleware:o.getDefaultExternalMiddleware(i)}),this._sentWarnings={enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},this._initializeStateAsync(),this.networkVersion=null,this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;o.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),a)if("complete"===document.readyState)r.sendSiteMetadata(this._rpcEngine,this._log);else{const e=()=>{r.sendSiteMetadata(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),this.networkVersion&&!e&&(this.networkVersion=null)}_warnOfDeprecation(e){var t;!1===(null===(t=this._sentWarnings)||void 0===t?void 0:t.events[e])&&(this._log.warn(i.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}enable(){return this._sentWarnings.enable||(this._log.warn(i.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},o.getRpcPromiseCallback(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(i.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((n,r)=>{try{this._rpcRequest({method:e,params:t},o.getRpcPromiseCallback(n,r,!1))}catch(e){r(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(e,o.NOOP),t=!0;break;case"net_version":t=this.networkVersion||null;break;default:throw new Error(i.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw n.ethErrors.rpc.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,n)=>{this._rpcRequest(e,o.getRpcPromiseCallback(t,n))}))}},{get:(e,t,...n)=>(this._sentWarnings.experimentalMethods||(this._log.warn(i.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...n))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==this.networkVersion&&(this.networkVersion=t,this._state.initialized&&this.emit("networkChanged",this.networkVersion))}}e.MetaMaskInpageProvider=a}(AM);var vS=Wb&&Wb.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(RA,"__esModule",{value:!0}),RA.createExternalExtensionProvider=void 0;const yS=vS(oM),bS=wM,wS=AM,AS=TM,_S=mA,ES=vS({CHROME_ID:"nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX_ID:"webextension@metamask.io"}),MS=bS.detect();RA.createExternalExtensionProvider=function(){let e;try{const t=function(){switch(null==MS?void 0:MS.name){case"chrome":default:return ES.default.CHROME_ID;case"firefox":return ES.default.FIREFOX_ID}}(),n=chrome.runtime.connect(t),r=new yS.default(n);e=new AS.StreamProvider(r,{jsonRpcStreamName:wS.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:_S.getDefaultExternalMiddleware(console)}),e.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return e};var kS={},SS={};Object.defineProperty(SS,"__esModule",{value:!0}),SS.shimWeb3=void 0,SS.shimWeb3=function(e,t=console){let n=!1,r=!1;if(!window.web3){const i="__isMetaMaskShim__";let o={currentProvider:e};Object.defineProperty(o,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),o=new Proxy(o,{get:(o,s,...a)=>("currentProvider"!==s||n?"currentProvider"===s||s===i||r||(r=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(n=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(o,s,...a)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:o,enumerable:!1,configurable:!0,writable:!0})}},Object.defineProperty(kS,"__esModule",{value:!0}),kS.setGlobalProvider=kS.initializeProvider=void 0;const xS=AM,CS=SS;function TS(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}kS.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:n=console,maxEventListeners:r=100,shouldSendMetadata:i=!0,shouldSetOnWindow:o=!0,shouldShimWeb3:s=!1}){const a=new xS.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:n,maxEventListeners:r,shouldSendMetadata:i}),l=new Proxy(a,{deleteProperty:()=>!0});return o&&TS(l),s&&CS.shimWeb3(l,n),l},kS.setGlobalProvider=TS,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StreamProvider=e.shimWeb3=e.setGlobalProvider=e.MetaMaskInpageProvider=e.MetaMaskInpageProviderStreamName=e.initializeProvider=e.createExternalExtensionProvider=e.BaseProvider=void 0;const t=uw;Object.defineProperty(e,"BaseProvider",{enumerable:!0,get:function(){return t.BaseProvider}});const n=RA;Object.defineProperty(e,"createExternalExtensionProvider",{enumerable:!0,get:function(){return n.createExternalExtensionProvider}});const r=kS;Object.defineProperty(e,"initializeProvider",{enumerable:!0,get:function(){return r.initializeProvider}}),Object.defineProperty(e,"setGlobalProvider",{enumerable:!0,get:function(){return r.setGlobalProvider}});const i=AM;Object.defineProperty(e,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return i.MetaMaskInpageProvider}}),Object.defineProperty(e,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return i.MetaMaskInpageProviderStreamName}});const o=SS;Object.defineProperty(e,"shimWeb3",{enumerable:!0,get:function(){return o.shimWeb3}});const s=TM;Object.defineProperty(e,"StreamProvider",{enumerable:!0,get:function(){return s.StreamProvider}})}(lw);class OS extends lw.MetaMaskInpageProvider{constructor({connectionStream:e,shouldSendMetadata:t,debug:n=!1,autoRequestAccounts:r=!1}){super(e,{logger:console,maxEventListeners:100,shouldSendMetadata:t}),this.debug=!1,this.autoRequestAccounts=!1,this.providerStateRequested=!1,n&&console.debug(`SDKProvider::constructor debug=${n} autoRequestAccounts=${r}`),this.autoRequestAccounts=r,this.debug=n}forceInitializeState(){return t(this,void 0,void 0,(function*(){return this.debug&&console.debug(`SDKProvider::forceInitializeState() autoRequestAccounts=${this.autoRequestAccounts}`),this._initializeStateAsync()}))}getState(){return this._state}handleDisconnect({terminate:e=!1}){this.debug&&console.debug(`SDKProvider::handleDisconnect() cleaning up provider state terminate=${e}`,this),e&&(this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0,this._state.initialized=!1),this._handleAccountsChanged([]),this._state.isConnected=!1,this.emit("disconnect",_w.ethErrors.provider.disconnected()),this.providerStateRequested=!1}_initializeStateAsync(){var e;return t(this,void 0,void 0,(function*(){if(this.debug&&console.debug("SDKProvider::_initializeStateAsync()"),this.providerStateRequested)this.debug&&console.debug("SDKProvider::_initializeStateAsync() initialization already in progress");else{let t;this.providerStateRequested=!0;try{t=yield this.request({method:"metamask_getProviderState"})}catch(e){return this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e),void(this.providerStateRequested=!1)}if(this.debug&&console.debug(`SDKProvider::_initializeStateAsync state selectedAddress=${this.selectedAddress} `,t),0===(null===(e=null==t?void 0:t.accounts)||void 0===e?void 0:e.length))if(this.debug&&console.debug("SDKProvider::_initializeStateAsync initial state doesn't contain accounts"),this.selectedAddress)this.debug&&console.debug("SDKProvider::_initializeStateAsync using this.selectedAddress instead"),t.accounts=[this.selectedAddress];else{this.debug&&console.debug("SDKProvider::_initializeStateAsync Fetch accounts remotely.");const e=yield this.request({method:"eth_requestAccounts",params:[]});t.accounts=e}this._initializeState(t),this.providerStateRequested=!1}}))}_initializeState(e){return this.debug&&console.debug("SDKProvider::_initializeState() set state._initialized to false"),this._state.initialized=!1,super._initializeState(e)}_handleChainChanged({chainId:e,networkVersion:t}={}){this.debug&&console.debug(`SDKProvider::_handleChainChanged chainId=${e} networkVersion=${t}`);let n=t;t||(console.info("forced network version to prevent provider error"),n="1"),this._state.isConnected=!0,this.emit("connect",{chainId:e}),super._handleChainChanged({chainId:e,networkVersion:n})}}class RS{constructor({shouldSetOnWindow:e,connectionStream:t,shouldSendMetadata:n=!1,shouldShimWeb3:r,debug:i=!1}){this.debug=!1,this.debug=i;const o=new OS({connectionStream:t,shouldSendMetadata:n,shouldSetOnWindow:e,shouldShimWeb3:r,autoRequestAccounts:!1,debug:i});this.debug=i;const s=new Proxy(o,{deleteProperty:()=>!0});this.provider=s,e&&"undefined"!=typeof window&&lw.setGlobalProvider(this.provider),r&&"undefined"!=typeof window&&lw.shimWeb3(this.provider),this.provider.on("_initialized",(()=>{const e={chainId:this.provider.chainId,isConnected:this.provider.isConnected(),isMetaNask:this.provider.isMetaMask,selectedAddress:this.provider.selectedAddress,networkVersion:this.provider.networkVersion};this.debug&&console.info("Ethereum provider initialized",e)}))}static init(e){var t;return e.debug&&console.debug("Ethereum::init()"),this.instance=new RS(e),null===(t=this.instance)||void 0===t?void 0:t.provider}static destroy(){RS.instance=void 0}static getInstance(){var e;if(!(null===(e=this.instance)||void 0===e?void 0:e.provider))throw new Error("Ethereum instance not intiialized - call Ethereum.factory first.");return this.instance}static getProvider(){var e;if(!(null===(e=this.instance)||void 0===e?void 0:e.provider))throw new Error("Ethereum instance not intiialized - call Ethereum.factory first.");return this.instance.provider}}var PS,NS;!function(e){e.NonBrowser="nodejs",e.MetaMaskMobileWebview="in-app-browser",e.DesktopWeb="web-desktop",e.MobileWeb="web-modbile",e.ReactNative="react-native"}(PS||(PS={})),function(e){e.Disabled="Disabled",e.Temporary="Temporary",e.UntilResponse="UntilResponse"}(NS||(NS={}));const LS=()=>"wakeLock"in navigator,IS=()=>"undefined"!=typeof navigator&&parseFloat(`${(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]}`.replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream;class BS{constructor(){this.enabled=!1,this._eventsAdded=!1}start(){if(this.enabled=!1,console.debug(`WakeLockManager::start() hasNativeWakeLock=${LS()}`),LS()&&!this._eventsAdded){this._eventsAdded=!0,this._wakeLock=void 0;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else IS()?this.noSleepTimer=void 0:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","MetaMask SDK - Listening for responses"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK"),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo&&(this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo&&this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})))})))}_addSourceToVideo(e,t,n){const r=document.createElement("source");r.src=n,r.type=`video/${t}`,e.appendChild(r)}isEnabled(){return this.enabled}enable(){var e;if(this.enabled&&this.disable(),this.start(),LS())return navigator.wakeLock.request("screen").then((e=>{this._wakeLock=e,this.enabled=!0})).catch((()=>(this.enabled=!1,!1)));if(IS())return this.disable(),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();if(this.noSleepVideo){const t=null===(e=this.noSleepVideo)||void 0===e?void 0:e.play();return this.enabled=!0,t.then((()=>!0)).catch((()=>!1))}return this.enabled=!0,Promise.resolve()}disable(){if(this.enabled){if(LS())this._wakeLock&&this._wakeLock.release(),this._wakeLock=void 0;else if(IS())this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=void 0);else try{if(!this.noSleepVideo)return;this.noSleepVideo.firstChild&&(this.noSleepVideo.removeChild(this.noSleepVideo.firstChild),this.noSleepVideo.load()),this.noSleepVideo.pause(),this.noSleepVideo.src="",this.noSleepVideo.remove()}catch(e){console.log(e)}this.enabled=!1}}}class DS{constructor({useDeepLink:e,preferredOpenLink:t,wakeLockStatus:n=NS.Temporary,debug:r=!1}){this.wakeLock=new BS,this.wakeLockStatus=NS.Temporary,this.wakeLockFeatureActive=!1,this.useDeeplink=!1,this.debug=!1,this.platformType=this.getPlatformType(),this.useDeeplink=e,this.preferredOpenLink=t,this.wakeLockStatus=n,this.debug=r}static init(e){return DS.instance=new DS(e),DS.instance}static getInstance(){if(!DS.instance)throw new Error("Platform not initialied - call Platform.init() first.");return DS.instance}enableWakeLock(){if(this.wakeLockStatus===NS.Disabled)return;this.wakeLock.enable();const e=this.wakeLockStatus===NS.Temporary?2e3:2e4;this.wakeLockTimer=setTimeout((()=>{this.disableWakeLock()}),e),this.wakeLockFeatureActive||this.wakeLockStatus!==NS.UntilResponse||(this.wakeLockFeatureActive=!0,window.addEventListener("focus",(()=>this.disableWakeLock())))}disableWakeLock(){this.wakeLockStatus!==NS.Disabled&&(this.wakeLockTimer&&clearTimeout(this.wakeLockTimer),this.wakeLock.disable())}openDeeplink(e,t,n){this.debug&&(console.debug(`Platform::openDeepLink universalLink --\x3e ${e}`),console.debug(`Platform::openDeepLink deepLink --\x3e ${t}`)),this.isBrowser()&&this.enableWakeLock();try{if(this.preferredOpenLink)return void this.preferredOpenLink(e,n);if("undefined"!=typeof window){let n;n=this.useDeeplink?window.open(t,"_blank"):window.open(e,"_blank"),setTimeout((()=>{var e;return null===(e=null==n?void 0:n.close)||void 0===e?void 0:e.call(n)}),500)}}catch(e){console.log("Platform::openDeepLink() can't open link",e)}}isReactNative(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product}isMetaMaskInstalled(){const e=RS.getProvider()||(null===window||void 0===window?void 0:window.ethereum);return this.debug&&console.debug(`Platform::isMetaMaskInstalled isMetaMask=${null==e?void 0:e.isMetaMask} isConnected=${null==e?void 0:e.isConnected()}`),(null==e?void 0:e.isMetaMask)&&(null==e?void 0:e.isConnected())}isMobile(){var e,t;const n=Jb.parse(window.navigator.userAgent);return"mobile"===(null===(e=null==n?void 0:n.platform)||void 0===e?void 0:e.type)||"tablet"===(null===(t=null==n?void 0:n.platform)||void 0===t?void 0:t.type)}isSecure(){return this.isReactNative()||this.isMobileWeb()}isMetaMaskMobileWebView(){return"undefined"!=typeof window&&Boolean(window.ReactNativeWebView)&&Boolean(navigator.userAgent.endsWith("MetaMaskMobile"))}isMobileWeb(){return this.platformType===PS.MobileWeb}isNotBrowser(){var e;return"undefined"==typeof window||!(null===window||void 0===window?void 0:window.navigator)||void 0!==n.g&&"ReactNative"===(null===(e=null===n.g||void 0===n.g?void 0:n.g.navigator)||void 0===e?void 0:e.product)||"ReactNative"===(null===navigator||void 0===navigator?void 0:navigator.product)}isBrowser(){return!this.isNotBrowser()}isUseDeepLink(){return this.useDeeplink}getPlatformType(){return this.platformType?this.platformType:this.isNotBrowser()?PS.NonBrowser:this.isMetaMaskMobileWebView()?PS.MetaMaskMobileWebview:this.isMobile()?PS.MobileWeb:PS.DesktopWeb}}class jS{constructor({preferDesktop:e,remote:t,debug:n=!1}){this.isInstalling=!1,this.hasInstalled=!1,this.resendRequest=null,this.preferDesktop=!1,this.debug=!1,this.preferDesktop=e,this.remote=t,this.debug=n}static init(e){return jS.instance=new jS(e),jS.instance}static getInstance(){if(!jS.instance)throw new Error("MetaMask installer not initialized - call MetaMaskInstaller.init() first.");return jS.instance}startDesktopOnboarding(){this.debug&&console.debug("MetamaskInstaller::startDesktopOnboarding()"),RS.destroy(),delete window.ethereum,(new aw).startOnboarding()}redirectToProperInstall(){return t(this,void 0,void 0,(function*(){const e=DS.getInstance().getPlatformType();if(this.debug&&console.debug(`MetamaskInstaller::redirectToProperInstall() platform=${e} this.preferDesktop=${this.preferDesktop}`),e===PS.MetaMaskMobileWebview)return alert("Please save your seedphrase and try to reinstall MetaMask Mobile"),!1;if(e===PS.DesktopWeb&&(this.isInstalling=!0,this.preferDesktop))return this.startDesktopOnboarding(),!1;this.isInstalling=!0;try{const e=yield this.remote.startConnection();return e&&(this.isInstalling=!1,this.hasInstalled=!0),e}catch(e){console.error("An error occured",e)}return!1}))}checkInstallation(){return t(this,void 0,void 0,(function*(){const e=DS.getInstance().isMetaMaskInstalled();return this.debug&&console.log(`MetamaskInstaller::checkInstallation() isInstalled=${e}`),!!e||(yield this.redirectToProperInstall())}))}start({wait:e=!1}){return t(this,void 0,void 0,(function*(){return this.debug&&console.debug(`MetamaskInstaller::start() wait=${e}`),e&&(yield(1e3,new Promise((e=>{setTimeout((()=>{e(!0)}),1e3)})))),yield this.checkInstallation()}))}}const FS={eth_requestAccounts:!0,eth_sendTransaction:!0,eth_signTransaction:!0,eth_sign:!0,personal_sign:!0,eth_signTypedData:!0,eth_signTypedData_v3:!0,eth_signTypedData_v4:!0,wallet_watchAsset:!0,wallet_addEthereumChain:!0,wallet_switchEthereumChain:!0},US=".sdk-comm";var qS;!function(e){e.INPAGE="metamask-inpage",e.CONTENT_SCRIPT="metamask-contentscript",e.PROVIDER="metamask-provider"}(qS||(qS={}));class zS extends ZE{constructor({name:t,remote:n,debug:r}){super({objectMode:!0}),this._name=t,this.remote=n,this.debug=r,this._onMessage=this._onMessage.bind(this),this.remote.on(e.EventType.MESSAGE,this._onMessage)}_write(e,n,r){var i,o,s;return t(this,void 0,void 0,(function*(){const t=DS.getInstance(),n=this.remote.isReady(),a=this.remote.isConnected(),l=this.remote.isPaused(),u=this.remote.isReady(),c=RS.getProvider(),h=this.remote.getChannelId();if(this.debug&&console.debug(`RPCMS::_write isRemoteReady=${n}\n } channelId=${h} isSocketConnected=${a} isRemotePaused=${l} providerConnected=${c.isConnected()}`),!h)return this.debug&&console.warn("Invalid channel id -- undefined"),r();this.debug&&console.debug(`RPCMS::_write remote.isPaused()=${this.remote.isPaused()} ready=${u} socketConnected=${a}`,e);try{let n;WA.isBuffer(e)?(n=e.toJSON(),n._isBuffer=!0):n=e;const l=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.method;if(this.remote.sendMessage(null==n?void 0:n.data).catch((e=>{console.warn("RCPMS::_write cannot send message",e)})),!t.isSecure())return this.debug&&console.log(`RCPMS::_write unsecure platform for method ${l} -- return callback`),r();if(this.debug&&console.log(`RCPMS::_write sending delayed method ${l}`),!a&&!u)return this.debug&&console.debug(`RCPMS::_write invalid connection status targetMethod=${l} socketConnected=${a} ready=${u} providerConnected=${c.isConnected()}\n\n`),r();if(!a&&u)return console.warn("RCPMS::_write invalid socket status -- shouln't happen"),r();const d=null!==(s=null===(o=this.remote.getKeyInfo())||void 0===o?void 0:o.ecies.public)&&void 0!==s?s:"",f=encodeURI(`channelId=${h}&pubkey=${d}&comm=socket`);FS[l]?(this.debug&&console.debug(`RCPMS::_write redirect link for '${l}' socketConnected=${a}`,`connect?${f}`),t.openDeeplink(`https://metamask.app.link/connect?${f}`,`metamask://connect?${f}`,"_self")):this.remote.isPaused()?(this.debug&&console.debug(`RCPMS::_write MM is PAUSED! deeplink with connect! targetMethod=${l}`),t.openDeeplink(`https://metamask.app.link/connect?redirect=true&${f}`,`metamask://connect?redirect=true&${f}`,"_self")):console.debug(`RCPMS::_write method ${l} doesn't need redirect.`)}catch(e){return this.debug&&console.error("RCPMS::_write error",e),r(new Error("RemoteCommunicationPostMessageStream - disconnected"))}return r()}))}_read(){}_onMessage(e){try{if(this.debug&&console.debug("[RCPMS] _onMessage ",e),!e||"object"!=typeof e)return;if("object"!=typeof(null==e?void 0:e.data))return;if(!(null==e?void 0:e.name))return;if((null==e?void 0:e.name)!==qS.PROVIDER)return;if(WA.isBuffer(e)){const t=WA.from(e);this.push(t)}else this.push(e)}catch(e){this.debug&&console.debug("RCPMS ignore message error",e)}}start(){}}class HS extends ZE{constructor({name:e,wcConnector:t}){super({objectMode:!0}),this._alreadySubscribed=!1,this._name=e,this.wcConnector=t}_write(e,t,n){var r;if(!this.wcConnector.isConnected())return n();try{let t;WA.isBuffer(e)?(t=e.toJSON(),t._isBuffer=!0):t=e,this.wcConnector.sendCustomRequest(null==t?void 0:t.data).then((e=>{const n={data:{name:qS.PROVIDER,data:{id:t.data.id,jsonrpc:"2.0",result:e}},target:qS.INPAGE};this._onMessage(n)})).catch((e=>{const n={data:{name:qS.PROVIDER,data:{id:t.data.id,jsonrpc:"2.0",error:e.toString()}},target:qS.INPAGE};this._onMessage(n)}));const n=DS.getInstance(),i=n.getPlatformType()===PS.DesktopWeb,o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.method;FS[o]&&!i&&n.openDeeplink("https://metamask.app.link/","metamask://","_self")}catch(e){return n(new Error("RemoteCommunicationPostMessageStream - disconnected"))}return n()}_read(){}_onMessage(e){const t=e.data;if(t&&"object"==typeof t&&t.data&&"object"==typeof t.data&&(!e.target||e.target===this._name))if(WA.isBuffer(t)){delete t._isBuffer;const e=WA.from(t);this.push(e)}else this.push(t)}setProviderState({chainId:e,accounts:t}){const n={data:{name:qS.PROVIDER,data:{method:"metamask_chainChanged",params:{chainId:`0x${parseInt(e,10).toString(16)}`,networkVersion:e.toString()}}},target:qS.INPAGE},r={data:{name:qS.PROVIDER,data:{method:"metamask_accountsChanged",params:[t[0]]}},target:qS.INPAGE};this._onMessage(n),this._onMessage(r)}subscribeToConnectionEvents(){this.wcConnector.forceRestart&&(this.wcConnector.killSession(),this.wcConnector.forceRestart=!1),this.wcConnector.isConnected()&&(provider._state.initialized=!0,provider._initializeState()),this._alreadySubscribed||(this.wcConnector.on("connect",((e,t)=>{if(e)throw e;const{accounts:n,chainId:r}=t.params[0];this.setProviderState({chainId:r,accounts:n})})),this.wcConnector.on("session_update",((e,t)=>{if(e)throw e;const{accounts:n,chainId:r}=t.params[0];this.setProviderState({accounts:n,chainId:r})})),this.wcConnector.on("disconnect",(e=>{if(e)throw e;location.reload()})),this._alreadySubscribed=!0)}start(){this.subscribeToConnectionEvents()}}const KS=({checkInstallationOnAllCalls:n=!1,communicationLayerPreference:r,platformType:i,injectProvider:o,shouldShimWeb3:s,installer:a,remoteConnection:l,walletConnect:u,debug:c})=>{const h=(({name:t,communicationLayerPreference:n,remoteConnection:r,walletConnect:i,debug:o})=>{if(n===e.CommunicationLayerPreference.WALLETCONNECT&&i)return new HS({name:t,wcConnector:i.getConnector()});if(!r||!(null==r?void 0:r.getConnector()))throw new Error("Missing remote conenction parameter");return new zS({name:t,remote:null==r?void 0:r.getConnector(),debug:o})})({name:qS.INPAGE,target:qS.CONTENT_SCRIPT,communicationLayerPreference:r,remoteConnection:l,walletConnect:u,debug:c}),d=!(!o||i===PS.NonBrowser);h.start();const f=RS.init({shouldSetOnWindow:d,connectionStream:h,shouldShimWeb3:s,debug:c}),p=(e,r,i,o)=>t(void 0,void 0,void 0,(function*(){const t=DS.getInstance().isMetaMaskInstalled(),s=null==l?void 0:l.isConnected(),{selectedAddress:u}=RS.getProvider();o&&console.debug(`initializeProvider::sendRequest() method=${e} selectedAddress=${u} isInstalled=${t} checkInstallationOnAllCalls=${n} socketConnected=${s}`);const c=DS.getInstance();if((!t||t&&!s)&&"metamask_getProviderState"!==e){if("eth_requestAccounts"===e||n){if(yield a.start({wait:!1}))return i(...r)}else if(c.isSecure())return i(...r);throw new Error("MetaMask is not connected/installed, please call eth_requestAccounts to connect first.")}return yield i(...r)})),{request:m}=f;f.request=(...e)=>t(void 0,void 0,void 0,(function*(){return p(null==e?void 0:e[0].method,e,m,c)}));const{send:g}=f;return f.send=(...e)=>t(void 0,void 0,void 0,(function*(){return p(null==e?void 0:e[0],e,g,c)})),f};var VS,WS={},$S={exports:{}};function YS(){return VS||(VS=1,function(e,t){self,e.exports=(()=>{var e={192:(e,t)=>{var n,r,i=function(){var e=function(e,t){var n=e,r=s[t],i=null,o=0,l=null,g=[],v={},b=function(e,t){i=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(o=4*n+17),w(0,0),w(o-7,0),w(0,o-7),_(),A(),M(e,t),n>=7&&E(e),null==l&&(l=S(n,r,g)),k(l,t)},w=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||o<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||o<=t+r||(i[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},A=function(){for(var e=8;e<o-8;e+=1)null==i[e][6]&&(i[e][6]=e%2==0);for(var t=8;t<o-8;t+=1)null==i[6][t]&&(i[6][t]=t%2==0)},_=function(){for(var e=a.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var o=e[t],s=e[r];if(null==i[o][s])for(var l=-2;l<=2;l+=1)for(var u=-2;u<=2;u+=1)i[o+l][s+u]=-2==l||2==l||-2==u||2==u||0==l&&0==u}},E=function(e){for(var t=a.getBCHTypeNumber(n),r=0;r<18;r+=1){var s=!e&&1==(t>>r&1);i[Math.floor(r/3)][r%3+o-8-3]=s}for(r=0;r<18;r+=1)s=!e&&1==(t>>r&1),i[r%3+o-8-3][Math.floor(r/3)]=s},M=function(e,t){for(var n=r<<3|t,s=a.getBCHTypeInfo(n),l=0;l<15;l+=1){var u=!e&&1==(s>>l&1);l<6?i[l][8]=u:l<8?i[l+1][8]=u:i[o-15+l][8]=u}for(l=0;l<15;l+=1)u=!e&&1==(s>>l&1),l<8?i[8][o-l-1]=u:l<9?i[8][15-l-1+1]=u:i[8][15-l-1]=u;i[o-8][8]=!e},k=function(e,t){for(var n=-1,r=o-1,s=7,l=0,u=a.getMaskFunction(t),c=o-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var h=0;h<2;h+=1)if(null==i[r][c-h]){var d=!1;l<e.length&&(d=1==(e[l]>>>s&1)),u(r,c-h)&&(d=!d),i[r][c-h]=d,-1==(s-=1)&&(l+=1,s=7)}if((r+=n)<0||o<=r){r-=n,n=-n;break}}},S=function(e,t,n){for(var r=c.getRSBlocks(e,t),i=h(),o=0;o<n.length;o+=1){var s=n[o];i.put(s.getMode(),4),i.put(s.getLength(),a.getLengthInBits(s.getMode(),e)),s.write(i)}var l=0;for(o=0;o<r.length;o+=1)l+=r[o].dataCount;if(i.getLengthInBits()>8*l)throw"code length overflow. ("+i.getLengthInBits()+">"+8*l+")";for(i.getLengthInBits()+4<=8*l&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*l||(i.put(236,8),i.getLengthInBits()>=8*l));)i.put(17,8);return function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),s=new Array(t.length),l=0;l<t.length;l+=1){var c=t[l].dataCount,h=t[l].totalCount-c;r=Math.max(r,c),i=Math.max(i,h),o[l]=new Array(c);for(var d=0;d<o[l].length;d+=1)o[l][d]=255&e.getBuffer()[d+n];n+=c;var f=a.getErrorCorrectPolynomial(h),p=u(o[l],f.getLength()-1).mod(f);for(s[l]=new Array(f.getLength()-1),d=0;d<s[l].length;d+=1){var m=d+p.getLength()-s[l].length;s[l][d]=m>=0?p.getAt(m):0}}var g=0;for(d=0;d<t.length;d+=1)g+=t[d].totalCount;var v=new Array(g),y=0;for(d=0;d<r;d+=1)for(l=0;l<t.length;l+=1)d<o[l].length&&(v[y]=o[l][d],y+=1);for(d=0;d<i;d+=1)for(l=0;l<t.length;l+=1)d<s[l].length&&(v[y]=s[l][d],y+=1);return v}(i,r)};v.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=d(e);break;case"Alphanumeric":n=f(e);break;case"Byte":n=p(e);break;case"Kanji":n=m(e);break;default:throw"mode:"+t}g.push(n),l=null},v.isDark=function(e,t){if(e<0||o<=e||t<0||o<=t)throw e+","+t;return i[e][t]},v.getModuleCount=function(){return o},v.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=c.getRSBlocks(e,r),i=h(),o=0;o<g.length;o++){var s=g[o];i.put(s.getMode(),4),i.put(s.getLength(),a.getLengthInBits(s.getMode(),e)),s.write(i)}var l=0;for(o=0;o<t.length;o++)l+=t[o].dataCount;if(i.getLengthInBits()<=8*l)break}n=e}b(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){b(!0,n);var r=a.getLostPoint(v);(0==n||e>r)&&(e=r,t=n)}return t}())},v.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<v.getModuleCount();r+=1){n+="<tr>";for(var i=0;i<v.getModuleCount();i+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=v.isDark(r,i)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},v.createSvgTag=function(e,t,n,r){var i={};"object"==typeof arguments[0]&&(e=(i=arguments[0]).cellSize,t=i.margin,n=i.alt,r=i.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var o,s,a,l,u=v.getModuleCount()*e+2*t,c="";for(l="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',c+=i.scalable?"":' width="'+u+'px" height="'+u+'px"',c+=' viewBox="0 0 '+u+" "+u+'" ',c+=' preserveAspectRatio="xMinYMin meet"',c+=r.text||n.text?' role="img" aria-labelledby="'+x([r.id,n.id].join(" ").trim())+'"':"",c+=">",c+=r.text?'<title id="'+x(r.id)+'">'+x(r.text)+"</title>":"",c+=n.text?'<description id="'+x(n.id)+'">'+x(n.text)+"</description>":"",c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',c+='<path d="',s=0;s<v.getModuleCount();s+=1)for(a=s*e+t,o=0;o<v.getModuleCount();o+=1)v.isDark(s,o)&&(c+="M"+(o*e+t)+","+a+l);return(c+='" stroke="transparent" fill="black"/>')+"</svg>"},v.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=v.getModuleCount()*e+2*t,r=t,i=n-t;return y(n,n,(function(t,n){if(r<=t&&t<i&&r<=n&&n<i){var o=Math.floor((t-r)/e),s=Math.floor((n-r)/e);return v.isDark(s,o)?0:1}return 1}))},v.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=v.getModuleCount()*e+2*t,i="";return i+="<img",i+=' src="',i+=v.createDataURL(e,t),i+='"',i+=' width="',i+=r,i+='"',i+=' height="',i+=r,i+='"',n&&(i+=' alt="',i+=x(n),i+='"'),i+"/>"};var x=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="<";break;case">":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=r}}return t};return v.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,i,o,s=1*v.getModuleCount()+2*e,a=e,l=s-e,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},c={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(t=0;t<s;t+=2){for(r=Math.floor((t-a)/1),i=Math.floor((t+1-a)/1),n=0;n<s;n+=1)o="█",a<=n&&n<l&&a<=t&&t<l&&v.isDark(r,Math.floor((n-a)/1))&&(o=" "),a<=n&&n<l&&a<=t+1&&t+1<l&&v.isDark(i,Math.floor((n-a)/1))?o+=" ":o+="█",h+=e<1&&t+1>=l?c[o]:u[o];h+="\n"}return s%2&&e>0?h.substring(0,h.length-s-1)+Array(s+1).join("▀"):h.substring(0,h.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,i,o,s=v.getModuleCount()*e+2*t,a=t,l=s-t,u=Array(e+1).join("██"),c=Array(e+1).join(" "),h="",d="";for(n=0;n<s;n+=1){for(i=Math.floor((n-a)/e),d="",r=0;r<s;r+=1)o=1,a<=r&&r<l&&a<=n&&n<l&&v.isDark(i,Math.floor((r-a)/e))&&(o=0),d+=o?u:c;for(i=0;i<e;i+=1)h+=d+"\n"}return h.substring(0,h.length-1)},v.renderTo2dContext=function(e,t){t=t||2;for(var n=v.getModuleCount(),r=0;r<n;r++)for(var i=0;i<n;i++)e.fillStyle=v.isDark(r,i)?"black":"white",e.fillRect(r*t,i*t,t,t)},v};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=v(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},i=0,o={};;){var s=n.read();if(-1==s)break;var a=r(),l=r()<<8|r();o[String.fromCharCode(s<<8|a)]=l,i+=1}if(i!=t)throw i+" != "+t;return o}(),r="?".charCodeAt(0);return function(e){for(var t=[],i=0;i<e.length;i+=1){var o=e.charCodeAt(i);if(o<128)t.push(o);else{var s=n[e.charAt(i)];"number"==typeof s?(255&s)==s?t.push(s):(t.push(s>>>8),t.push(255&s)):t.push(r)}}return t}};var t,n,r,i,o,s={L:1,M:0,Q:3,H:2},a=(t=[[],[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]],n=1335,r=7973,o=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(i={}).getBCHTypeInfo=function(e){for(var t=e<<10;o(t)-o(n)>=0;)t^=n<<o(t)-o(n);return 21522^(e<<10|t)},i.getBCHTypeNumber=function(e){for(var t=e<<12;o(t)-o(r)>=0;)t^=r<<o(t)-o(r);return e<<12|t},i.getPatternPosition=function(e){return t[e-1]},i.getMaskFunction=function(e){switch(e){case 0:return function(e,t){return(e+t)%2==0};case 1:return function(e,t){return e%2==0};case 2:return function(e,t){return t%3==0};case 3:return function(e,t){return(e+t)%3==0};case 4:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case 5:return function(e,t){return e*t%2+e*t%3==0};case 6:return function(e,t){return(e*t%2+e*t%3)%2==0};case 7:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},i.getErrorCorrectPolynomial=function(e){for(var t=u([1],0),n=0;n<e;n+=1)t=t.multiply(u([1,l.gexp(n)],0));return t},i.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+e}}},i.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var i=0;i<t;i+=1){for(var o=0,s=e.isDark(r,i),a=-1;a<=1;a+=1)if(!(r+a<0||t<=r+a))for(var l=-1;l<=1;l+=1)i+l<0||t<=i+l||0==a&&0==l||s==e.isDark(r+a,i+l)&&(o+=1);o>5&&(n+=3+o-5)}for(r=0;r<t-1;r+=1)for(i=0;i<t-1;i+=1){var u=0;e.isDark(r,i)&&(u+=1),e.isDark(r+1,i)&&(u+=1),e.isDark(r,i+1)&&(u+=1),e.isDark(r+1,i+1)&&(u+=1),0!=u&&4!=u||(n+=3)}for(r=0;r<t;r+=1)for(i=0;i<t-6;i+=1)e.isDark(r,i)&&!e.isDark(r,i+1)&&e.isDark(r,i+2)&&e.isDark(r,i+3)&&e.isDark(r,i+4)&&!e.isDark(r,i+5)&&e.isDark(r,i+6)&&(n+=40);for(i=0;i<t;i+=1)for(r=0;r<t-6;r+=1)e.isDark(r,i)&&!e.isDark(r+1,i)&&e.isDark(r+2,i)&&e.isDark(r+3,i)&&e.isDark(r+4,i)&&!e.isDark(r+5,i)&&e.isDark(r+6,i)&&(n+=40);var c=0;for(i=0;i<t;i+=1)for(r=0;r<t;r+=1)e.isDark(r,i)&&(c+=1);return n+Math.abs(100*c/t/t-50)/5*10},i),l=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;return{glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}}}();function u(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),i=0;i<e.length-n;i+=1)r[i]=e[i+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var i=0;i<e.getLength();i+=1)t[n+i]^=l.gexp(l.glog(r.getAt(n))+l.glog(e.getAt(i)));return u(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=l.glog(r.getAt(0))-l.glog(e.getAt(0)),n=new Array(r.getLength()),i=0;i<r.getLength();i+=1)n[i]=r.getAt(i);for(i=0;i<e.getLength();i+=1)n[i]^=l.gexp(l.glog(e.getAt(i))+t);return u(n,0).mod(e)}};return r}var c=function(){var e=[[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,7,37,13],[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=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={getRSBlocks:function(n,r){var i=function(t,n){switch(n){case s.L:return e[4*(t-1)+0];case s.M:return e[4*(t-1)+1];case s.Q:return e[4*(t-1)+2];case s.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===i)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r;for(var o=i.length/3,a=[],l=0;l<o;l+=1)for(var u=i[3*l+0],c=i[3*l+1],h=i[3*l+2],d=0;d<u;d+=1)a.push(t(c,h));return a}};return n}(),h=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},d=function(e){var t=e,n={getMode:function(){return 1},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+2<n.length;)e.put(r(n.substring(i,i+3)),10),i+=3;i<n.length&&(n.length-i==1?e.put(r(n.substring(i,i+1)),4):n.length-i==2&&e.put(r(n.substring(i,i+2)),7))}},r=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return n},f=function(e){var t=e,n={getMode:function(){return 2},getLength:function(e){return t.length},write:function(e){for(var n=t,i=0;i+1<n.length;)e.put(45*r(n.charAt(i))+r(n.charAt(i+1)),11),i+=2;i<n.length&&e.put(r(n.charAt(i)),6)}},r=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return n},p=function(t){var n=e.stringToBytes(t);return{getMode:function(){return 4},getLength:function(e){return n.length},write:function(e){for(var t=0;t<n.length;t+=1)e.put(n[t],8)}}},m=function(t){var n=e.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(e,t){var r=n("友");if(2!=r.length||38726!=(r[0]<<8|r[1]))throw"sjis not supported."}();var r=n(t);return{getMode:function(){return 8},getLength:function(e){return~~(r.length/2)},write:function(e){for(var t=r,n=0;n+1<t.length;){var i=(255&t[n])<<8|255&t[n+1];if(33088<=i&&i<=40956)i-=33088;else{if(!(57408<=i&&i<=60351))throw"illegal char at "+(n+1)+"/"+i;i-=49472}i=192*(i>>>8&255)+(255&i),e.put(i,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}}},g=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var i=0;i<r;i+=1)t.writeByte(e[i+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+"]"}};return t},v=function(e){var t=e,n=0,r=0,i=0,o={read:function(){for(;i<8;){if(n>=t.length){if(0==i)return-1;throw"unexpected end of file./"+i}var e=t.charAt(n);if(n+=1,"="==e)return i=0,-1;e.match(/^\s$/)||(r=r<<6|s(e.charCodeAt(0)),i+=6)}var o=r>>>i-8&255;return i-=8,o}},s=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return o},y=function(e,t,n){for(var r=function(e,t){var n=e,r=t,i=new Array(e*t),o={setPixel:function(e,t,r){i[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=s(2);e.writeByte(2);for(var i=0;t.length-i>255;)e.writeByte(255),e.writeBytes(t,i,255),i+=255;e.writeByte(t.length-i),e.writeBytes(t,i,t.length-i),e.writeByte(0),e.writeString(";")}},s=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,o=a(),s=0;s<t;s+=1)o.add(String.fromCharCode(s));o.add(String.fromCharCode(t)),o.add(String.fromCharCode(n));var l,u,c,h=g(),d=(l=h,u=0,c=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;u+t>=8;)l.writeByte(255&(e<<u|c)),t-=8-u,e>>>=8-u,c=0,u=0;c|=e<<u,u+=t},flush:function(){u>0&&l.writeByte(c)}});d.write(t,r);var f=0,p=String.fromCharCode(i[f]);for(f+=1;f<i.length;){var m=String.fromCharCode(i[f]);f+=1,o.contains(p+m)?p+=m:(d.write(o.indexOf(p),r),o.size()<4095&&(o.size()==1<<r&&(r+=1),o.add(p+m)),p=m)}return d.write(o.indexOf(p),r),d.write(n,r),d.flush(),h.toByteArray()},a=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return o}(e,t),i=0;i<t;i+=1)for(var o=0;o<e;o+=1)r.setPixel(o,i,n(o,i));var s=g();r.write(s);for(var a=function(){var e=0,t=0,n=0,r="",i={},o=function(e){r+=String.fromCharCode(s(63&e))},s=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return i.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)o(e>>>t-6),t-=6},i.flush=function(){if(t>0&&(o(e<<6-t),e=0,t=0),n%3!=0)for(var i=3-n%3,s=0;s<i;s+=1)r+="="},i.toString=function(){return r},i}(),l=s.toByteArray(),u=0;u<l.length;u+=1)a.writeByte(l[u]);return a.flush(),"data:image/gif;base64,"+a};return e}();i.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},void 0===(r="function"==typeof(n=function(){return i})?n.apply(t,[]):n)||(e.exports=r)},676:(e,t,n)=>{n.d(t,{default:()=>P});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)};function o(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!t.length)return e;var s=t.shift();return void 0!==s&&i(e)&&i(s)?(e=r({},e),Object.keys(s).forEach((function(t){var n=e[t],r=s[t];Array.isArray(n)&&Array.isArray(r)?e[t]=r:i(n)&&i(r)?e[t]=o(Object.assign({},n),r):e[t]=r})),o.apply(void 0,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}([e],t))):e}function s(e,t){var n=document.createElement("a");n.download=t,n.href=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function a(e){return t=this,void 0,r=function(){return function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(t){return[2,new Promise((function(t){var n=new XMLHttpRequest;n.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(n.response)},n.open("GET",e),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(e,i){function o(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(o,s)}a((r=r.apply(t,[])).next())}));var t,n,r}const l={L:.07,M:.15,Q:.25,H:.3};var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const c=function(){function e(e){var t=e.svg,n=e.type;this._svg=t,this._type=n}return e.prototype.draw=function(e,t,n,r){var i;switch(this._type){case"dots":i=this._drawDot;break;case"classy":i=this._drawClassy;break;case"classy-rounded":i=this._drawClassyRounded;break;case"rounded":i=this._drawRounded;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawSquare}i.call(this,{x:e,y:t,size:n,getNeighbor:r})},e.prototype._rotateFigure=function(e){var t,n=e.x,r=e.y,i=e.size,o=e.rotation,s=void 0===o?0:o,a=n+i/2,l=r+i/2;(0,e.draw)(),null===(t=this._element)||void 0===t||t.setAttribute("transform","rotate("+180*s/Math.PI+","+a+","+l+")")},e.prototype._basicDot=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(u(u({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(r+n/2)),t._element.setAttribute("cy",String(i+n/2)),t._element.setAttribute("r",String(n/2))}}))},e.prototype._basicSquare=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(u(u({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(r)),t._element.setAttribute("y",String(i)),t._element.setAttribute("width",String(n)),t._element.setAttribute("height",String(n))}}))},e.prototype._basicSideRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(u(u({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},e.prototype._basicCornerRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(u(u({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},e.prototype._basicCornerExtraRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(u(u({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},e.prototype._basicCornersRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(u(u({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+r+" "+i+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},e.prototype._drawDot=function(e){var t=e.x,n=e.y,r=e.size;this._basicDot({x:t,y:n,size:r,rotation:0})},e.prototype._drawSquare=function(e){var t=e.x,n=e.y,r=e.size;this._basicSquare({x:t,y:n,size:r,rotation:0})},e.prototype._drawRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,a=i?+i(0,-1):0,l=i?+i(0,1):0,u=o+s+a+l;if(0!==u)if(u>2||o&&s||a&&l)this._basicSquare({x:t,y:n,size:r,rotation:0});else{if(2===u){var c=0;return o&&a?c=Math.PI/2:a&&s?c=Math.PI:s&&l&&(c=-Math.PI/2),void this._basicCornerRounded({x:t,y:n,size:r,rotation:c})}if(1===u)return c=0,a?c=Math.PI/2:s?c=Math.PI:l&&(c=-Math.PI/2),void this._basicSideRounded({x:t,y:n,size:r,rotation:c})}else this._basicDot({x:t,y:n,size:r,rotation:0})},e.prototype._drawExtraRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,a=i?+i(0,-1):0,l=i?+i(0,1):0,u=o+s+a+l;if(0!==u)if(u>2||o&&s||a&&l)this._basicSquare({x:t,y:n,size:r,rotation:0});else{if(2===u){var c=0;return o&&a?c=Math.PI/2:a&&s?c=Math.PI:s&&l&&(c=-Math.PI/2),void this._basicCornerExtraRounded({x:t,y:n,size:r,rotation:c})}if(1===u)return c=0,a?c=Math.PI/2:s?c=Math.PI:l&&(c=-Math.PI/2),void this._basicSideRounded({x:t,y:n,size:r,rotation:c})}else this._basicDot({x:t,y:n,size:r,rotation:0})},e.prototype._drawClassy=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,a=i?+i(0,-1):0,l=i?+i(0,1):0;0!==o+s+a+l?o||a?s||l?this._basicSquare({x:t,y:n,size:r,rotation:0}):this._basicCornerRounded({x:t,y:n,size:r,rotation:Math.PI/2}):this._basicCornerRounded({x:t,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:n,size:r,rotation:Math.PI/2})},e.prototype._drawClassyRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.getNeighbor,o=i?+i(-1,0):0,s=i?+i(1,0):0,a=i?+i(0,-1):0,l=i?+i(0,1):0;0!==o+s+a+l?o||a?s||l?this._basicSquare({x:t,y:n,size:r,rotation:0}):this._basicCornerExtraRounded({x:t,y:n,size:r,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:t,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:n,size:r,rotation:Math.PI/2})},e}();var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const d=function(){function e(e){var t=e.svg,n=e.type;this._svg=t,this._type=n}return e.prototype.draw=function(e,t,n,r){var i;switch(this._type){case"square":i=this._drawSquare;break;case"extra-rounded":i=this._drawExtraRounded;break;default:i=this._drawDot}i.call(this,{x:e,y:t,size:n,rotation:r})},e.prototype._rotateFigure=function(e){var t,n=e.x,r=e.y,i=e.size,o=e.rotation,s=void 0===o?0:o,a=n+i/2,l=r+i/2;(0,e.draw)(),null===(t=this._element)||void 0===t||t.setAttribute("transform","rotate("+180*s/Math.PI+","+a+","+l+")")},e.prototype._basicDot=function(e){var t=this,n=e.size,r=e.x,i=e.y,o=n/7;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+(r+n/2)+" "+i+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+o+"a "+(n/2-o)+" "+(n/2-o)+" 0 1 1 -0.1 0Z")}}))},e.prototype._basicSquare=function(e){var t=this,n=e.size,r=e.x,i=e.y,o=n/7;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+r+" "+i+"v "+n+"h "+n+"v "+-n+"zM "+(r+o)+" "+(i+o)+"h "+(n-2*o)+"v "+(n-2*o)+"h "+(2*o-n)+"z")}}))},e.prototype._basicExtraRounded=function(e){var t=this,n=e.size,r=e.x,i=e.y,o=n/7;this._rotateFigure(h(h({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+r+" "+(i+2.5*o)+"v "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*o+"h "+2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*o+" "+2.5*-o+"v "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*-o+"h "+-2*o+"a "+2.5*o+" "+2.5*o+", 0, 0, 0, "+2.5*-o+" "+2.5*o+"M "+(r+2.5*o)+" "+(i+o)+"h "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*o+"v "+2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*o+"h "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*-o+" "+1.5*-o+"v "+-2*o+"a "+1.5*o+" "+1.5*o+", 0, 0, 1, "+1.5*o+" "+1.5*-o)}}))},e.prototype._drawDot=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicDot({x:t,y:n,size:r,rotation:i})},e.prototype._drawSquare=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicSquare({x:t,y:n,size:r,rotation:i})},e.prototype._drawExtraRounded=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicExtraRounded({x:t,y:n,size:r,rotation:i})},e}();var f=function(){return(f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};const p=function(){function e(e){var t=e.svg,n=e.type;this._svg=t,this._type=n}return e.prototype.draw=function(e,t,n,r){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:e,y:t,size:n,rotation:r})},e.prototype._rotateFigure=function(e){var t,n=e.x,r=e.y,i=e.size,o=e.rotation,s=void 0===o?0:o,a=n+i/2,l=r+i/2;(0,e.draw)(),null===(t=this._element)||void 0===t||t.setAttribute("transform","rotate("+180*s/Math.PI+","+a+","+l+")")},e.prototype._basicDot=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(f(f({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(r+n/2)),t._element.setAttribute("cy",String(i+n/2)),t._element.setAttribute("r",String(n/2))}}))},e.prototype._basicSquare=function(e){var t=this,n=e.size,r=e.x,i=e.y;this._rotateFigure(f(f({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(r)),t._element.setAttribute("y",String(i)),t._element.setAttribute("width",String(n)),t._element.setAttribute("height",String(n))}}))},e.prototype._drawDot=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicDot({x:t,y:n,size:r,rotation:i})},e.prototype._drawSquare=function(e){var t=e.x,n=e.y,r=e.size,i=e.rotation;this._basicSquare({x:t,y:n,size:r,rotation:i})},e}(),m="circle";var g=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},v=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},y=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],b=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const w=function(){function e(e){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=e}return Object.defineProperty(e.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),e.prototype.getElement=function(){return this._element},e.prototype.drawQR=function(e){return g(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c,h,d=this;return v(this,(function(f){switch(f.label){case 0:return t=e.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,r=this._options.shape===m?n/Math.sqrt(2):n,i=Math.floor(r/t),o={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=e,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(f.sent(),!this._image)return[2];s=this._options,a=s.imageOptions,u=s.qrOptions,c=a.imageSize*l[u.errorCorrectionLevel],h=Math.floor(c*t*t),o=function(e){var t=e.originalHeight,n=e.originalWidth,r=e.maxHiddenDots,i=e.maxHiddenAxisDots,o=e.dotSize,s={x:0,y:0},a={x:0,y:0};if(t<=0||n<=0||r<=0||o<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var l=t/n;return s.x=Math.floor(Math.sqrt(r/l)),s.x<=0&&(s.x=1),i&&i<s.x&&(s.x=i),s.x%2==0&&s.x--,a.x=s.x*o,s.y=1+2*Math.ceil((s.x*l-1)/2),a.y=Math.round(a.x*l),(s.y*s.x>r||i&&i<s.y)&&(i&&i<s.y?(s.y=i,s.y%2==0&&s.x--):s.y-=2,a.y=s.y*o,s.x=1+2*Math.ceil((s.y/l-1)/2),a.x=Math.round(a.y/l)),{height:a.y,width:a.x,hideYDots:s.y,hideXDots:s.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:h,maxHiddenAxisDots:t-14,dotSize:i}),f.label=2;case 2:return this.drawBackground(),this.drawDots((function(e,n){var r,i,s,a,l,u;return!(d._options.imageOptions.hideBackgroundDots&&e>=(t-o.hideXDots)/2&&e<(t+o.hideXDots)/2&&n>=(t-o.hideYDots)/2&&n<(t+o.hideYDots)/2||(null===(r=y[e])||void 0===r?void 0:r[n])||(null===(i=y[e-t+7])||void 0===i?void 0:i[n])||(null===(s=y[e])||void 0===s?void 0:s[n-t+7])||(null===(a=b[e])||void 0===a?void 0:a[n])||(null===(l=b[e-t+7])||void 0===l?void 0:l[n])||(null===(u=b[e])||void 0===u?void 0:u[n-t+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:o.width,height:o.height,count:t,dotSize:i})]:[3,4];case 3:f.sent(),f.label=4;case 4:return[2]}}))}))},e.prototype.drawBackground=function(){var e,t,n,r=this._element,i=this._options;if(r){var o=null===(e=i.backgroundOptions)||void 0===e?void 0:e.gradient,s=null===(t=i.backgroundOptions)||void 0===t?void 0:t.color;if((o||s)&&this._createColor({options:o,color:s,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"background-color"}),null===(n=i.backgroundOptions)||void 0===n?void 0:n.round){var a=Math.min(i.width,i.height),l=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),l.setAttribute("x",String((i.width-a)/2)),l.setAttribute("y",String((i.height-a)/2)),l.setAttribute("width",String(a)),l.setAttribute("height",String(a)),l.setAttribute("rx",String(a/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(l)}}},e.prototype.drawDots=function(e){var t,n,r=this;if(!this._qr)throw"QR code is not defined";var i=this._options,o=this._qr.getModuleCount();if(o>i.width||o>i.height)throw"The canvas is too small.";var s=Math.min(i.width,i.height)-2*i.margin,a=i.shape===m?s/Math.sqrt(2):s,l=Math.floor(a/o),u=Math.floor((i.width-o*l)/2),h=Math.floor((i.height-o*l)/2),d=new c({svg:this._element,type:i.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(t=i.dotsOptions)||void 0===t?void 0:t.gradient,color:i.dotsOptions.color,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"dot-color"});for(var f=function(t){for(var i=function(i){return e&&!e(t,i)?"continue":(null===(n=p._qr)||void 0===n?void 0:n.isDark(t,i))?(d.draw(u+t*l,h+i*l,l,(function(n,s){return!(t+n<0||i+s<0||t+n>=o||i+s>=o)&&!(e&&!e(t+n,i+s))&&!!r._qr&&r._qr.isDark(t+n,i+s)})),void(d._element&&p._dotsClipPath&&p._dotsClipPath.appendChild(d._element))):"continue"},s=0;s<o;s++)i(s)},p=this,g=0;g<o;g++)f(g);if(i.shape===m){var v=Math.floor((s/l-o)/2),y=o+2*v,b=u-v*l,w=h-v*l,A=[],_=Math.floor(y/2);for(g=0;g<y;g++){A[g]=[];for(var E=0;E<y;E++)g>=v-1&&g<=y-v&&E>=v-1&&E<=y-v||Math.sqrt((g-_)*(g-_)+(E-_)*(E-_))>_?A[g][E]=0:A[g][E]=this._qr.isDark(E-2*v<0?E:E>=o?E-2*v:E-v,g-2*v<0?g:g>=o?g-2*v:g-v)?1:0}var M=function(e){for(var t=function(t){if(!A[e][t])return"continue";d.draw(b+e*l,w+t*l,l,(function(n,r){var i;return!!(null===(i=A[e+n])||void 0===i?void 0:i[t+r])})),d._element&&k._dotsClipPath&&k._dotsClipPath.appendChild(d._element)},n=0;n<y;n++)t(n)},k=this;for(g=0;g<y;g++)M(g)}},e.prototype.drawCorners=function(){var e=this;if(!this._qr)throw"QR code is not defined";var t=this._element,n=this._options;if(!t)throw"Element code is not defined";var r=this._qr.getModuleCount(),i=Math.min(n.width,n.height)-2*n.margin,o=n.shape===m?i/Math.sqrt(2):i,s=Math.floor(o/r),a=7*s,l=3*s,u=Math.floor((n.width-r*s)/2),h=Math.floor((n.height-r*s)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(t){var i,o,f,m,g,v,w,A,_,E,M,k,S=t[0],x=t[1],C=t[2],T=u+S*s*(r-7),O=h+x*s*(r-7),R=e._dotsClipPath,P=e._dotsClipPath;if(((null===(i=n.cornersSquareOptions)||void 0===i?void 0:i.gradient)||(null===(o=n.cornersSquareOptions)||void 0===o?void 0:o.color))&&((R=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+S+"-"+x),e._defs.appendChild(R),e._cornersSquareClipPath=e._cornersDotClipPath=P=R,e._createColor({options:null===(f=n.cornersSquareOptions)||void 0===f?void 0:f.gradient,color:null===(m=n.cornersSquareOptions)||void 0===m?void 0:m.color,additionalRotation:C,x:T,y:O,height:a,width:a,name:"corners-square-color-"+S+"-"+x})),null===(g=n.cornersSquareOptions)||void 0===g?void 0:g.type){var N=new d({svg:e._element,type:n.cornersSquareOptions.type});N.draw(T,O,a,C),N._element&&R&&R.appendChild(N._element)}else for(var L=new c({svg:e._element,type:n.dotsOptions.type}),I=function(e){for(var t=function(t){if(!(null===(v=y[e])||void 0===v?void 0:v[t]))return"continue";L.draw(T+e*s,O+t*s,s,(function(n,r){var i;return!!(null===(i=y[e+n])||void 0===i?void 0:i[t+r])})),L._element&&R&&R.appendChild(L._element)},n=0;n<y[e].length;n++)t(n)},B=0;B<y.length;B++)I(B);if(((null===(w=n.cornersDotOptions)||void 0===w?void 0:w.gradient)||(null===(A=n.cornersDotOptions)||void 0===A?void 0:A.color))&&((P=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+S+"-"+x),e._defs.appendChild(P),e._cornersDotClipPath=P,e._createColor({options:null===(_=n.cornersDotOptions)||void 0===_?void 0:_.gradient,color:null===(E=n.cornersDotOptions)||void 0===E?void 0:E.color,additionalRotation:C,x:T+2*s,y:O+2*s,height:l,width:l,name:"corners-dot-color-"+S+"-"+x})),null===(M=n.cornersDotOptions)||void 0===M?void 0:M.type){var D=new p({svg:e._element,type:n.cornersDotOptions.type});D.draw(T+2*s,O+2*s,l,C),D._element&&P&&P.appendChild(D._element)}else{L=new c({svg:e._element,type:n.dotsOptions.type});var j=function(e){for(var t=function(t){if(!(null===(k=b[e])||void 0===k?void 0:k[t]))return"continue";L.draw(T+e*s,O+t*s,s,(function(n,r){var i;return!!(null===(i=b[e+n])||void 0===i?void 0:i[t+r])})),L._element&&P&&P.appendChild(L._element)},n=0;n<b[e].length;n++)t(n)};for(B=0;B<b.length;B++)j(B)}}))},e.prototype.loadImage=function(){var e=this;return new Promise((function(t,n){var r=e._options,i=new Image;if(!r.image)return n("Image is not defined");"string"==typeof r.imageOptions.crossOrigin&&(i.crossOrigin=r.imageOptions.crossOrigin),e._image=i,i.onload=function(){t()},i.src=r.image}))},e.prototype.drawImage=function(e){var t=e.width,n=e.height,r=e.count,i=e.dotSize;return g(this,void 0,void 0,(function(){var e,o,s,l,u,c,h,d,f;return v(this,(function(p){switch(p.label){case 0:return e=this._options,o=Math.floor((e.width-r*i)/2),s=Math.floor((e.height-r*i)/2),l=o+e.imageOptions.margin+(r*i-t)/2,u=s+e.imageOptions.margin+(r*i-n)/2,c=t-2*e.imageOptions.margin,h=n-2*e.imageOptions.margin,(d=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(l)),d.setAttribute("y",String(u)),d.setAttribute("width",c+"px"),d.setAttribute("height",h+"px"),[4,a(e.image||"")];case 1:return f=p.sent(),d.setAttribute("href",f||""),this._element.appendChild(d),[2]}}))}))},e.prototype._createColor=function(e){var t=e.options,n=e.color,r=e.additionalRotation,i=e.x,o=e.y,s=e.height,a=e.width,l=e.name,u=a>s?a:s,c=document.createElementNS("http://www.w3.org/2000/svg","rect");if(c.setAttribute("x",String(i)),c.setAttribute("y",String(o)),c.setAttribute("height",String(s)),c.setAttribute("width",String(a)),c.setAttribute("clip-path","url('#clip-path-"+l+"')"),t){var h;if("radial"===t.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",l),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(i+a/2)),h.setAttribute("fy",String(o+s/2)),h.setAttribute("cx",String(i+a/2)),h.setAttribute("cy",String(o+s/2)),h.setAttribute("r",String(u/2));else{var d=((t.rotation||0)+r)%(2*Math.PI),f=(d+2*Math.PI)%(2*Math.PI),p=i+a/2,m=o+s/2,g=i+a/2,v=o+s/2;f>=0&&f<=.25*Math.PI||f>1.75*Math.PI&&f<=2*Math.PI?(p-=a/2,m-=s/2*Math.tan(d),g+=a/2,v+=s/2*Math.tan(d)):f>.25*Math.PI&&f<=.75*Math.PI?(m-=s/2,p-=a/2/Math.tan(d),v+=s/2,g+=a/2/Math.tan(d)):f>.75*Math.PI&&f<=1.25*Math.PI?(p+=a/2,m+=s/2*Math.tan(d),g-=a/2,v-=s/2*Math.tan(d)):f>1.25*Math.PI&&f<=1.75*Math.PI&&(m+=s/2,p+=a/2/Math.tan(d),v-=s/2,g-=a/2/Math.tan(d)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",l),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(p))),h.setAttribute("y1",String(Math.round(m))),h.setAttribute("x2",String(Math.round(g))),h.setAttribute("y2",String(Math.round(v)))}t.colorStops.forEach((function(e){var t=e.offset,n=e.color,r=document.createElementNS("http://www.w3.org/2000/svg","stop");r.setAttribute("offset",100*t+"%"),r.setAttribute("stop-color",n),h.appendChild(r)})),c.setAttribute("fill","url('#"+l+"')"),this._defs.appendChild(h)}else n&&c.setAttribute("fill",n);this._element.appendChild(c)},e}(),A="canvas";for(var _={},E=0;E<=40;E++)_[E]=E;const M={type:A,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:_[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function S(e){var t=k({},e);if(!t.colorStops||!t.colorStops.length)throw"Field 'colorStops' is required in gradient";return t.rotation?t.rotation=Number(t.rotation):t.rotation=0,t.colorStops=t.colorStops.map((function(e){return k(k({},e),{offset:Number(e.offset)})})),t}function x(e){var t=k({},e);return t.width=Number(t.width),t.height=Number(t.height),t.margin=Number(t.margin),t.imageOptions=k(k({},t.imageOptions),{hideBackgroundDots:Boolean(t.imageOptions.hideBackgroundDots),imageSize:Number(t.imageOptions.imageSize),margin:Number(t.imageOptions.margin)}),t.margin>Math.min(t.width,t.height)&&(t.margin=Math.min(t.width,t.height)),t.dotsOptions=k({},t.dotsOptions),t.dotsOptions.gradient&&(t.dotsOptions.gradient=S(t.dotsOptions.gradient)),t.cornersSquareOptions&&(t.cornersSquareOptions=k({},t.cornersSquareOptions),t.cornersSquareOptions.gradient&&(t.cornersSquareOptions.gradient=S(t.cornersSquareOptions.gradient))),t.cornersDotOptions&&(t.cornersDotOptions=k({},t.cornersDotOptions),t.cornersDotOptions.gradient&&(t.cornersDotOptions.gradient=S(t.cornersDotOptions.gradient))),t.backgroundOptions&&(t.backgroundOptions=k({},t.backgroundOptions),t.backgroundOptions.gradient&&(t.backgroundOptions.gradient=S(t.backgroundOptions.gradient))),t}var C=n(192),T=n.n(C),O=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},R=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};const P=function(){function e(e){this._options=e?x(o(M,e)):M,this.update()}return e._clearContainer=function(e){e&&(e.innerHTML="")},e.prototype._setupSvg=function(){var e=this;if(this._qr){var t=new w(this._options);this._svg=t.getElement(),this._svgDrawingPromise=t.drawQR(this._qr).then((function(){var n;e._svg&&(null===(n=e._extension)||void 0===n||n.call(e,t.getElement(),e._options))}))}},e.prototype._setupCanvas=function(){var e,t=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(e=this._svgDrawingPromise)||void 0===e?void 0:e.then((function(){if(t._svg){var e=t._svg,n=(new XMLSerializer).serializeToString(e),r="data:image/svg+xml;base64,"+btoa(n),i=new Image;return new Promise((function(e){i.onload=function(){var n,r;null===(r=null===(n=t._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===r||r.drawImage(i,0,0),e()},i.src=r}))}})))},e.prototype._getElement=function(e){return void 0===e&&(e="png"),O(this,void 0,void 0,(function(){return R(this,(function(t){switch(t.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==e.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return t.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return t.sent(),[2,this._canvas]}}))}))},e.prototype.update=function(t){e._clearContainer(this._container),this._options=t?x(o(this._options,t)):this._options,this._options.data&&(this._qr=T()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(e){switch(!0){case/^[0-9]*$/.test(e):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(e):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===A?this._setupCanvas():this._setupSvg(),this.append(this._container))},e.prototype.append=function(e){if(e){if("function"!=typeof e.appendChild)throw"Container should be a single DOM node";this._options.type===A?this._canvas&&e.appendChild(this._canvas):this._svg&&e.appendChild(this._svg),this._container=e}},e.prototype.applyExtension=function(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()},e.prototype.deleteExtension=function(){this._extension=void 0,this.update()},e.prototype.getRawData=function(e){return void 0===e&&(e="png"),O(this,void 0,void 0,(function(){var t,n,r;return R(this,(function(i){switch(i.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(e)];case 1:return(t=i.sent())?"svg"===e.toLowerCase()?(n=new XMLSerializer,r=n.serializeToString(t),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+r],{type:"image/svg+xml"})]):[2,new Promise((function(n){return t.toBlob(n,"image/"+e,1)}))]:[2,null]}}))}))},e.prototype.download=function(e){return O(this,void 0,void 0,(function(){var t,n,r,i,o;return R(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return t="png",n="qr","string"==typeof e?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof e&&null!==e&&(e.name&&(n=e.name),e.extension&&(t=e.extension)),[4,this._getElement(t)];case 1:return(r=a.sent())?("svg"===t.toLowerCase()?(i=new XMLSerializer,o='<?xml version="1.0" standalone="no"?>\r\n'+(o=i.serializeToString(r)),s("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),n+".svg")):s(r.toDataURL("image/"+t),n+"."+t),[2]):[2]}}))}))},e}()}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(676)})().default}($S)),$S.exports}!function(e,t){!function(e){var t,n,r={exports:{}},i={},o={exports:{}};"production"===Vb.env.NODE_ENV?r.exports=function(){if(t)return i;t=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,m(w,v.prototype),w.isPureReactComponent=!0;var A=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function k(t,n,r){var i,o={},s=null,a=null;if(null!=n)for(i in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(s=""+n.key),n)_.call(n,i)&&!M.hasOwnProperty(i)&&(o[i]=n[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:e,type:t,key:s,ref:a,props:o,_owner:E.current}}function S(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var x=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(t,r,i,o,s){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case e:case n:l=!0}}if(l)return s=s(l=t),t=""===o?"."+C(l,0):o,A(s)?(i="",null!=t&&(i=t.replace(x,"$&/")+"/"),T(s,r,i,"",(function(e){return e}))):null!=s&&(S(s)&&(s=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(s,i+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(x,"$&/")+"/")+t)),r.push(s)),1;if(l=0,o=""===o?".":o+":",A(t))for(var u=0;u<t.length;u++){var c=o+C(a=t[u],u);l+=T(a,r,i,c,s)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(t),"function"==typeof c)for(t=c.call(t),u=0;!(a=t.next()).done;)l+=T(a=a.value,r,i,c=o+C(a,u++),s);else if("object"===a)throw r=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function O(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},N={transition:null},L={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:N,ReactCurrentOwner:E};return i.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},i.Component=v,i.Fragment=r,i.Profiler=s,i.PureComponent=b,i.StrictMode=o,i.Suspense=c,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,i.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=m({},t.props),o=t.key,s=t.ref,a=t._owner;if(null!=n){if(void 0!==n.ref&&(s=n.ref,a=E.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(u in n)_.call(n,u)&&!M.hasOwnProperty(u)&&(i[u]=void 0===n[u]&&void 0!==l?l[u]:n[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:e,type:t.type,key:o,ref:s,props:i,_owner:a}},i.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},i.createElement=k,i.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},i.createRef=function(){return{current:null}},i.forwardRef=function(e){return{$$typeof:u,render:e}},i.isValidElement=S,i.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:R}},i.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},i.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},i.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},i.useCallback=function(e,t){return P.current.useCallback(e,t)},i.useContext=function(e){return P.current.useContext(e)},i.useDebugValue=function(){},i.useDeferredValue=function(e){return P.current.useDeferredValue(e)},i.useEffect=function(e,t){return P.current.useEffect(e,t)},i.useId=function(){return P.current.useId()},i.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},i.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},i.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},i.useMemo=function(e,t){return P.current.useMemo(e,t)},i.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},i.useRef=function(e){return P.current.useRef(e)},i.useState=function(e){return P.current.useState(e)},i.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},i.useTransition=function(){return P.current.useTransition()},i.version="18.2.0",i}():r.exports=(n||(n=1,function(e,t){"production"!==Vb.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator";function v(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[g];return"function"==typeof t?t:null}var y={current:null},b={transition:null},w={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},A={current:null},_={},E=null;function M(e){E=e}_.setExtraStackFrame=function(e){E=e},_.getCurrentStack=null,_.getStackAddendum=function(){var e="";E&&(e+=E);var t=_.getCurrentStack;return t&&(e+=t()||""),e};var k=!1,S=!1,x=!1,C=!1,T=!1,O={ReactCurrentDispatcher:y,ReactCurrentBatchConfig:b,ReactCurrentOwner:A};function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];N("warn",e,n)}function P(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];N("error",e,n)}function N(e,t,n){var r=O.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var i=n.map((function(e){return String(e)}));i.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,i)}O.ReactDebugCurrentFrame=_,O.ReactCurrentActQueue=w;var L={};function I(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;L[i]||(P("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),L[i]=!0)}var B={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){I(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){I(e,"replaceState")},enqueueSetState:function(e,t,n,r){I(e,"setState")}},D=Object.assign,j={};function F(e,t,n){this.props=e,this.context=t,this.refs=j,this.updater=n||B}Object.freeze(j),F.prototype.isReactComponent={},F.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},F.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var U={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},q=function(e,t){Object.defineProperty(F.prototype,e,{get:function(){R("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var z in U)U.hasOwnProperty(z)&&q(z,U[z]);function H(){}function K(e,t,n){this.props=e,this.context=t,this.refs=j,this.updater=n||B}H.prototype=F.prototype;var V=K.prototype=new H;V.constructor=K,D(V,F.prototype),V.isPureReactComponent=!0;var W=Array.isArray;function $(e){return W(e)}function Y(e){return""+e}function G(e){if(function(e){try{return Y(e),!1}catch(e){return!0}}(e))return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),Y(e)}function Z(e){return e.displayName||"Context"}function Q(e){if(null==e)return null;if("number"==typeof e.tag&&P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case i:return"Fragment";case r:return"Portal";case s:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return Z(e)+".Consumer";case a:return Z(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case d:var t=e.displayName||null;return null!==t?t:Q(e.type)||"Memo";case f:var n=e,p=n._payload,m=n._init;try{return Q(m(p))}catch(e){return null}}return null}var J,X,ee,te=Object.prototype.hasOwnProperty,ne={key:!0,ref:!0,__self:!0,__source:!0};function re(e){if(te.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function ie(e){if(te.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}ee={};var oe=function(e,t,r,i,o,s,a){var l={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:s,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function se(e,t,n){var r,i={},o=null,s=null,a=null,l=null;if(null!=t)for(r in re(t)&&(s=t.ref,function(e){if("string"==typeof e.ref&&A.current&&e.__self&&A.current.stateNode!==e.__self){var t=Q(A.current.type);ee[t]||(P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',t,e.ref),ee[t]=!0)}}(t)),ie(t)&&(G(t.key),o=""+t.key),a=void 0===t.__self?null:t.__self,l=void 0===t.__source?null:t.__source,t)te.call(t,r)&&!ne.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(u>1){for(var c=Array(u),h=0;h<u;h++)c[h]=arguments[h+2];Object.freeze&&Object.freeze(c),i.children=c}if(e&&e.defaultProps){var d=e.defaultProps;for(r in d)void 0===i[r]&&(i[r]=d[r])}if(o||s){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;o&&function(e,t){var n=function(){J||(J=!0,P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(i,f),s&&function(e,t){var n=function(){X||(X=!0,P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(i,f)}return oe(e,o,s,a,l,A.current,i)}function ae(e,t,n){if(null==e)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r,i,o=D({},e.props),s=e.key,a=e.ref,l=e._self,u=e._source,c=e._owner;if(null!=t)for(r in re(t)&&(a=t.ref,c=A.current),ie(t)&&(G(t.key),s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)te.call(t,r)&&!ne.hasOwnProperty(r)&&(void 0===t[r]&&void 0!==i?o[r]=i[r]:o[r]=t[r]);var h=arguments.length-2;if(1===h)o.children=n;else if(h>1){for(var d=Array(h),f=0;f<h;f++)d[f]=arguments[f+2];o.children=d}return oe(e.type,s,a,l,u,c,o)}function le(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var ue=".",ce=":",he=!1,de=/\/+/g;function fe(e){return e.replace(de,"$&/")}function pe(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(G(e.key),n=""+e.key,r={"=":"=0",":":"=2"},i=n.replace(/[=:]/g,(function(e){return r[e]})),"$"+i):t.toString(36);var n,r,i}function me(e,t,i,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l,u,c,h=!1;if(null===e)h=!0;else switch(a){case"string":case"number":h=!0;break;case"object":switch(e.$$typeof){case n:case r:h=!0}}if(h){var d=e,f=s(d),p=""===o?ue+pe(d,0):o;if($(f)){var m="";null!=p&&(m=fe(p)+"/"),me(f,t,m,"",(function(e){return e}))}else null!=f&&(le(f)&&(!f.key||d&&d.key===f.key||G(f.key),l=f,u=i+(!f.key||d&&d.key===f.key?"":fe(""+f.key)+"/")+p,f=oe(l.type,u,l.ref,l._self,l._source,l._owner,l.props)),t.push(f));return 1}var g=0,y=""===o?ue:o+ce;if($(e))for(var b=0;b<e.length;b++)g+=me(c=e[b],t,i,y+pe(c,b),s);else{var w=v(e);if("function"==typeof w){var A=e;w===A.entries&&(he||R("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),he=!0);for(var _,E=w.call(A),M=0;!(_=E.next()).done;)g+=me(c=_.value,t,i,y+pe(c,M++),s)}else if("object"===a){var k=String(e);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===k?"object with keys {"+Object.keys(e).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}}return g}function ge(e,t,n){if(null==e)return e;var r=[],i=0;return me(e,r,"","",(function(e){return t.call(n,e,i++)})),r}var ve;function ye(e){if(-1===e._status){var t=(0,e._result)();if(t.then((function(t){if(0===e._status||-1===e._status){var n=e;n._status=1,n._result=t}}),(function(t){if(0===e._status||-1===e._status){var n=e;n._status=2,n._result=t}})),-1===e._status){var n=e;n._status=0,n._result=t}}if(1===e._status){var r=e._result;return void 0===r&&P("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",r),"default"in r||P("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",r),r.default}throw e._result}function be(e){return"string"==typeof e||"function"==typeof e||!!(e===i||e===s||T||e===o||e===c||e===h||C||e===p||k||S||x)||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===a||e.$$typeof===l||e.$$typeof===u||e.$$typeof===ve||void 0!==e.getModuleId)}function we(){var e=y.current;return null===e&&P("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}ve=Symbol.for("react.module.reference");var Ae,_e,Ee,Me,ke,Se,xe,Ce=0;function Te(){}Te.__reactDisabledLog=!0;var Oe,Re=O.ReactCurrentDispatcher;function Pe(e,t,n){if(void 0===Oe)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);Oe=r&&r[1]||""}return"\n"+Oe+e}var Ne,Le=!1,Ie="function"==typeof WeakMap?WeakMap:Map;function Be(e,t){if(!e||Le)return"";var n,r=Ne.get(e);if(void 0!==r)return r;Le=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Re.current,Re.current=null,function(){if(0===Ce){Ae=console.log,_e=console.info,Ee=console.warn,Me=console.error,ke=console.group,Se=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Ce++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){n=e}Reflect.construct(e,[],s)}else{try{s.call()}catch(e){n=e}e.call(s.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),l=n.stack.split("\n"),u=a.length-1,c=l.length-1;u>=1&&c>=0&&a[u]!==l[c];)c--;for(;u>=1&&c>=0;u--,c--)if(a[u]!==l[c]){if(1!==u||1!==c)do{if(u--,--c<0||a[u]!==l[c]){var h="\n"+a[u].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),"function"==typeof e&&Ne.set(e,h),h}}while(u>=1&&c>=0);break}}}finally{Le=!1,Re.current=i,function(){if(0==--Ce){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},e,{value:Ae}),info:D({},e,{value:_e}),warn:D({},e,{value:Ee}),error:D({},e,{value:Me}),group:D({},e,{value:ke}),groupCollapsed:D({},e,{value:Se}),groupEnd:D({},e,{value:xe})})}Ce<0&&P("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var d=e?e.displayName||e.name:"",f=d?Pe(d):"";return"function"==typeof e&&Ne.set(e,f),f}function De(e,t,n){if(null==e)return"";if("function"==typeof e)return Be(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Pe(e);switch(e){case c:return Pe("Suspense");case h:return Pe("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case u:return Be(e.render,!1);case d:return De(e.type,t,n);case f:var r=e,i=r._payload,o=r._init;try{return De(o(i),t,n)}catch(e){}}return""}Ne=new Ie;var je,Fe={},Ue=O.ReactDebugCurrentFrame;function qe(e){if(e){var t=e._owner,n=De(e.type,e._source,t?t.type:null);Ue.setExtraStackFrame(n)}else Ue.setExtraStackFrame(null)}function ze(e){if(e){var t=e._owner;M(De(e.type,e._source,t?t.type:null))}else M(null)}function He(){if(A.current){var e=Q(A.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}je=!1;var Ke={};function Ve(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=He();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!Ke[n]){Ke[n]=!0;var r="";e&&e._owner&&e._owner!==A.current&&(r=" It was passed a child from "+Q(e._owner.type)+"."),ze(e),P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ze(null)}}}function We(e,t){if("object"==typeof e)if($(e))for(var n=0;n<e.length;n++){var r=e[n];le(r)&&Ve(r,t)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var i=v(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)le(o.value)&&Ve(o.value,t)}}function $e(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==u&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=Q(n);!function(e,t,n,r,i){var o=Function.call.bind(te);for(var s in e)if(o(e,s)){var a=void 0;try{if("function"!=typeof e[s]){var l=Error((r||"React class")+": "+n+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}a=e[s](t,s,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(qe(i),P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,s,typeof a),qe(null)),a instanceof Error&&!(a.message in Fe)&&(Fe[a.message]=!0,qe(i),P("Failed %s type: %s",n,a.message),qe(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||je||(je=!0,P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Q(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ye(e,t,r){var o,s,a=be(e);if(!a){var l,u="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),u+=(null!=(o=t)&&void 0!==(s=o.__source)?"\n\nCheck your code at "+s.fileName.replace(/^.*[\\\/]/,"")+":"+s.lineNumber+".":"")||He(),null===e?l="null":$(e)?l="array":void 0!==e&&e.$$typeof===n?(l="<"+(Q(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,P("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,u)}var c=se.apply(this,arguments);if(null==c)return c;if(a)for(var h=2;h<arguments.length;h++)We(arguments[h],e);return e===i?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ze(e),P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ze(null);break}}null!==e.ref&&(ze(e),P("Invalid attribute `ref` supplied to `React.Fragment`."),ze(null))}(c):$e(c),c}var Ge=!1,Ze=!1,Qe=null,Je=0,Xe=!1;function et(e){e!==Je-1&&P("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Je=e}function tt(t,n,r){var i=w.current;if(null!==i)try{rt(i),function(t){if(null===Qe)try{var n=("require"+Math.random()).slice(0,7);Qe=(e&&e[n]).call(e,"timers").setImmediate}catch(e){Qe=function(e){!1===Ze&&(Ze=!0,"undefined"==typeof MessageChannel&&P("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}Qe(t)}((function(){0===i.length?(w.current=null,n(t)):tt(t,n,r)}))}catch(e){r(e)}else n(t)}var nt=!1;function rt(e){if(!nt){nt=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}e.length=0}catch(n){throw e=e.slice(t+1),n}finally{nt=!1}}}var it=Ye,ot={map:ge,forEach:function(e,t,n){ge(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return ge(e,(function(){t++})),t},toArray:function(e){return ge(e,(function(e){return e}))||[]},only:function(e){if(!le(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}};t.Children=ot,t.Component=F,t.Fragment=i,t.Profiler=s,t.PureComponent=K,t.StrictMode=o,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){for(var r=ae.apply(this,arguments),i=2;i<arguments.length;i++)We(arguments[i],r.type);return $e(r),r},t.createContext=function(e){var t={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};t.Provider={$$typeof:a,_context:t};var n=!1,r=!1,i=!1,o={$$typeof:l,_context:t};return Object.defineProperties(o,{Provider:{get:function(){return r||(r=!0,P("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return n||(n=!0,P("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){i||(R("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),i=!0)}}}),t.Consumer=o,t._currentRenderer=null,t._currentRenderer2=null,t},t.createElement=it,t.createFactory=function(e){var t=Ye.bind(null,e);return t.type=e,Ge||(Ge=!0,R("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return R("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===d?P("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?P("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&P("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||P("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:u,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,e.name||e.displayName||(e.displayName=n)}}),n},t.isValidElement=le,t.lazy=function(e){var t,n,r={$$typeof:f,_payload:{_status:-1,_result:e},_init:ye};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){P("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){P("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},t.memo=function(e,t){be(e)||P("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:d,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(e.displayName=t)}}),r},t.startTransition=function(e,t){var n=b.transition;b.transition={};var r=b.transition;b.transition._updatedFibers=new Set;try{e()}finally{b.transition=n,null===n&&r._updatedFibers&&(r._updatedFibers.size>10&&R("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),r._updatedFibers.clear())}},t.unstable_act=function(e){var t=Je;Je++,null===w.current&&(w.current=[]);var n,r=w.isBatchingLegacy;try{if(w.isBatchingLegacy=!0,n=e(),!r&&w.didScheduleLegacyUpdate){var i=w.current;null!==i&&(w.didScheduleLegacyUpdate=!1,rt(i))}}catch(e){throw et(t),e}finally{w.isBatchingLegacy=r}if(null!==n&&"object"==typeof n&&"function"==typeof n.then){var o=n,s=!1,a={then:function(e,n){s=!0,o.then((function(r){et(t),0===Je?tt(r,e,n):e(r)}),(function(e){et(t),n(e)}))}};return Xe||"undefined"==typeof Promise||Promise.resolve().then((function(){})).then((function(){s||(Xe=!0,P("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))})),a}var l=n;if(et(t),0===Je){var u=w.current;return null!==u&&(rt(u),w.current=null),{then:function(e,t){null===w.current?(w.current=[],tt(l,e,t)):e(l)}}}return{then:function(e,t){e(l)}}},t.useCallback=function(e,t){return we().useCallback(e,t)},t.useContext=function(e){var t=we();if(void 0!==e._context){var n=e._context;n.Consumer===e?P("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&P("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},t.useDebugValue=function(e,t){return we().useDebugValue(e,t)},t.useDeferredValue=function(e){return we().useDeferredValue(e)},t.useEffect=function(e,t){return we().useEffect(e,t)},t.useId=function(){return we().useId()},t.useImperativeHandle=function(e,t,n){return we().useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return we().useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return we().useLayoutEffect(e,t)},t.useMemo=function(e,t){return we().useMemo(e,t)},t.useReducer=function(e,t,n){return we().useReducer(e,t,n)},t.useRef=function(e){return we().useRef(e)},t.useState=function(e){return we().useState(e)},t.useSyncExternalStore=function(e,t,n){return we().useSyncExternalStore(e,t,n)},t.useTransition=function(){return we().useTransition()},t.version="18.2.0","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(o,o.exports)),o.exports);var s,a,l,u,c=r.exports,h=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(c),d=function(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}({__proto__:null,default:h},[c]),f={exports:{}},p={},m={exports:{}},g={},v={};function y(){return l||(l=1,"production"===Vb.env.NODE_ENV?m.exports=(s||(s=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,l=e[a],u=a+1,c=e[u];if(0>i(l,n))u<o&&0>i(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[a]=n,r=a);else{if(!(u<o&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,h=null,d=3,f=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(u);null!==i;){if(null===i.callback)r(u);else{if(!(i.startTime<=e))break;r(u),i.sortIndex=i.expirationTime,t(l,i)}i=n(u)}}function w(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,P(A);else{var t=n(u);null!==t&&N(w,t.startTime-e)}}function A(t,i){p=!1,m&&(m=!1,v(k),k=-1),f=!0;var o=d;try{for(b(i),h=n(l);null!==h&&(!(h.expirationTime>i)||t&&!C());){var s=h.callback;if("function"==typeof s){h.callback=null,d=h.priorityLevel;var a=s(h.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?h.callback=a:h===n(l)&&r(l),b(i)}else r(l);h=n(l)}if(null!==h)var c=!0;else{var g=n(u);null!==g&&N(w,g.startTime-i),c=!1}return c}finally{h=null,d=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,E=!1,M=null,k=-1,S=5,x=-1;function C(){return!(e.unstable_now()-x<S)}function T(){if(null!==M){var t=e.unstable_now();x=t;var n=!0;try{n=M(!0,t)}finally{n?_():(E=!1,M=null)}}else E=!1}if("function"==typeof y)_=function(){y(T)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=T,_=function(){R.postMessage(null)}}else _=function(){g(T,0)};function P(e){M=e,E||(E=!0,_())}function N(t,n){k=g((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,P(A))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(d){case 1:case 2:case 3:var t=3;break;default:t=d}var n=d;d=t;try{return e()}finally{d=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=d;d=e;try{return t()}finally{d=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:c++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(u,r),null===n(l)&&r===n(u)&&(m?(v(k),k=-1):m=!0,N(w,o-s))):(r.sortIndex=a,t(l,r),p||f||(p=!0,P(A))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=d;return function(){var n=d;d=t;try{return e.apply(this,arguments)}finally{d=n}}}}(g)),g):m.exports=(a||(a=1,function(e){"production"!==Vb.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=!1,n=!1;function r(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;r>0;){var i=r-1>>>1,o=e[i];if(!(s(o,t)>0))return;e[i]=t,e[r]=o,r=i}}(e,t,n)}function i(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=0,i=e.length,o=i>>>1;r<o;){var a=2*(r+1)-1,l=e[a],u=a+1,c=e[u];if(s(l,t)<0)u<i&&s(c,l)<0?(e[r]=c,e[u]=t,r=u):(e[r]=l,e[a]=t,r=a);else{if(!(u<i&&s(c,t)<0))return;e[r]=c,e[u]=t,r=u}}}(e,n)),t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],h=[],d=1,f=null,p=3,m=!1,g=!1,v=!1,y="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function A(e){for(var t=i(h);null!==t;){if(null===t.callback)o(h);else{if(!(t.startTime<=e))return;o(h),t.sortIndex=t.expirationTime,r(c,t)}t=i(h)}}function _(e){if(v=!1,A(e),!g)if(null!==i(c))g=!0,L(E);else{var t=i(h);null!==t&&I(_,t.startTime-e)}}function E(r,s){g=!1,v&&(v=!1,B()),m=!0;var a=p;try{if(!n)return function(n,r){var s=r;for(A(s),f=i(c);null!==f&&!t&&(!(f.expirationTime>s)||n&&!T());){var a=f.callback;if("function"==typeof a){f.callback=null,p=f.priorityLevel;var l=a(f.expirationTime<=s);s=e.unstable_now(),"function"==typeof l?f.callback=l:f===i(c)&&o(c),A(s)}else o(c);f=i(c)}if(null!==f)return!0;var u=i(h);return null!==u&&I(_,u.startTime-s),!1}(r,s)}finally{f=null,p=a,m=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M=!1,k=null,S=-1,x=5,C=-1;function T(){return!(e.unstable_now()-C<x)}var O,R=function(){if(null!==k){var t=e.unstable_now();C=t;var n=!0;try{n=k(!0,t)}finally{n?O():(M=!1,k=null)}}else M=!1};if("function"==typeof w)O=function(){w(R)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,N=P.port2;P.port1.onmessage=R,O=function(){N.postMessage(null)}}else O=function(){y(R,0)};function L(e){k=e,M||(M=!0,O())}function I(t,n){S=y((function(){t(e.unstable_now())}),n)}function B(){b(S),S=-1}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,L(E))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(e){var t;switch(p){case 1:case 2:case 3:t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(t,n,o){var s,a,l=e.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;s="number"==typeof u&&u>0?l+u:l}else s=l;switch(t){case 1:a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}var f=s+a,p={id:d++,callback:n,priorityLevel:t,startTime:s,expirationTime:f,sortIndex:-1};return s>l?(p.sortIndex=s,r(h,p),null===i(c)&&p===i(h)&&(v?B():v=!0,I(_,s-l))):(p.sortIndex=f,r(c,p),g||m||(g=!0,L(E))),p},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(v)),v)),m.exports}var b,w={};"production"===Vb.env.NODE_ENV?(function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){if("production"!==Vb.env.NODE_ENV)throw new Error("^_^");try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),f.exports=function(){if(u)return p;u=1;var e=c,t=y();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(e,t){s(e,t),s(e+"Capture",t)}function s(e,t){for(i[e]=t,e=0;e<t.length;e++)r.add(t[e])}var a=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),l=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},f={};function m(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!l.call(f,e)||!l.call(d,e)&&(h.test(e)?f[e]=!0:(d[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),E=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),I=Symbol.iterator;function B(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=I&&e[I]||e["@@iterator"])?e:null}var D,j=Object.assign;function F(e){if(void 0===D)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var U=!1;function q(e,t){if(!e||U)return"";U=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{U=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F(e):""}function z(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return q(e.type,!1);case 11:return q(e.type.render,!1);case 1:return q(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case M:return"Fragment";case E:return"Portal";case S:return"Profiler";case k:return"StrictMode";case O:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case x:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function K(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return j({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function X(e,t){J(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?te(e,t.type,n):t.hasOwnProperty("defaultValue")&&te(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ee(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function te(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ne=Array.isArray;function re(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return j({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(ne(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:V(r)}}function se(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,he,de=(he=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return he(e,t)}))}:he);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},me=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){me.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ye=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function be(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function we(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ae=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ee=null,Me=null,ke=null;function Se(e){if(e=vi(e)){if("function"!=typeof Ee)throw Error(n(280));var t=e.stateNode;t&&(t=bi(t),Ee(e.stateNode,e.type,t))}}function xe(e){Me?ke?ke.push(e):ke=[e]:Me=e}function Ce(){if(Me){var e=Me,t=ke;if(ke=Me=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Te(e,t){return e(t)}function Oe(){}var Re=!1;function Pe(e,t,n){if(Re)return e(t,n);Re=!0;try{return Te(e,t,n)}finally{Re=!1,(null!==Me||null!==ke)&&(Oe(),Ce())}}function Ne(e,t){var r=e.stateNode;if(null===r)return null;var i=bi(r);if(null===i)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var Le=!1;if(a)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch(he){Le=!1}function Be(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var De=!1,je=null,Fe=!1,Ue=null,qe={onError:function(e){De=!0,je=e}};function ze(e,t,n,r,i,o,s,a,l){De=!1,je=null,Be.apply(qe,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ke(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ve(e){if(He(e)!==e)throw Error(n(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var s=o.alternate;if(null===s){if(null!==(i=o.return)){r=i;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===r)return Ve(o),e;if(s===i)return Ve(o),t;s=s.sibling}throw Error(n(188))}if(r.return!==i.return)r=o,i=s;else{for(var a=!1,l=o.child;l;){if(l===r){a=!0,r=o,i=s;break}if(l===i){a=!0,i=o,r=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===r){a=!0,r=s,i=o;break}if(l===i){a=!0,i=s,r=o;break}l=l.sibling}if(!a)throw Error(n(189))}}if(r.alternate!==i)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e))?$e(e):null}function $e(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=$e(e);if(null!==t)return t;e=e.sibling}return null}var Ye=t.unstable_scheduleCallback,Ge=t.unstable_cancelCallback,Ze=t.unstable_shouldYield,Qe=t.unstable_requestPaint,Je=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,et=t.unstable_ImmediatePriority,tt=t.unstable_UserBlockingPriority,nt=t.unstable_NormalPriority,rt=t.unstable_LowPriority,it=t.unstable_IdlePriority,ot=null,st=null,at=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(lt(e)/ut|0)|0},lt=Math.log,ut=Math.LN2,ct=64,ht=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=dt(a):0!=(o&=s)&&(r=dt(o))}else 0!=(s=n&~i)?r=dt(s):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function mt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var wt=0;function At(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var _t,Et,Mt,kt,St,xt=!1,Ct=[],Tt=null,Ot=null,Rt=null,Pt=new Map,Nt=new Map,Lt=[],It="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Bt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function Dt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&null!==(t=vi(t))&&Et(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function jt(e){var t=gi(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ke(n)))return e.blockedOn=t,void St(e.priority,(function(){Mt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ft(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=vi(n))&&Et(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ae=r,n.target.dispatchEvent(r),Ae=null,t.shift()}return!0}function Ut(e,t,n){Ft(e)&&n.delete(t)}function qt(){xt=!1,null!==Tt&&Ft(Tt)&&(Tt=null),null!==Ot&&Ft(Ot)&&(Ot=null),null!==Rt&&Ft(Rt)&&(Rt=null),Pt.forEach(Ut),Nt.forEach(Ut)}function zt(e,n){e.blockedOn===n&&(e.blockedOn=null,xt||(xt=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qt)))}function Ht(e){function t(t){return zt(t,e)}if(0<Ct.length){zt(Ct[0],e);for(var n=1;n<Ct.length;n++){var r=Ct[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&zt(Tt,e),null!==Ot&&zt(Ot,e),null!==Rt&&zt(Rt,e),Pt.forEach(t),Nt.forEach(t),n=0;n<Lt.length;n++)(r=Lt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)jt(n),null===n.blockedOn&&Lt.shift()}var Kt=A.ReactCurrentBatchConfig,Vt=!0;function Wt(e,t,n,r){var i=wt,o=Kt.transition;Kt.transition=null;try{wt=1,Yt(e,t,n,r)}finally{wt=i,Kt.transition=o}}function $t(e,t,n,r){var i=wt,o=Kt.transition;Kt.transition=null;try{wt=4,Yt(e,t,n,r)}finally{wt=i,Kt.transition=o}}function Yt(e,t,n,r){if(Vt){var i=Zt(e,t,n,r);if(null===i)zr(e,t,r,Gt,n),Bt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Dt(Tt,e,t,n,r,i),!0;case"dragenter":return Ot=Dt(Ot,e,t,n,r,i),!0;case"mouseover":return Rt=Dt(Rt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Pt.set(o,Dt(Pt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Nt.set(o,Dt(Nt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Bt(e,r),4&t&&-1<It.indexOf(e)){for(;null!==i;){var o=vi(i);if(null!==o&&_t(o),null===(o=Zt(e,t,n,r))&&zr(e,t,r,Gt,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else zr(e,t,r,null,n)}}var Gt=null;function Zt(e,t,n,r){if(Gt=null,null!==(e=gi(e=_e(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ke(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case et:return 1;case tt:return 4;case nt:case rt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Jt=null,Xt=null,en=null;function tn(){if(en)return en;var e,t,n=Xt,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return en=i.slice(e,1<t?1-t:void 0)}function nn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rn(){return!0}function on(){return!1}function sn(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?rn:on,this.isPropagationStopped=on,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var an,ln,un,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=sn(cn),dn=j({},cn,{view:0,detail:0}),fn=sn(dn),pn=j({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(an=e.screenX-un.screenX,ln=e.screenY-un.screenY):ln=an=0,un=e),an)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=sn(pn),gn=sn(j({},pn,{dataTransfer:0})),vn=sn(j({},dn,{relatedTarget:0})),yn=sn(j({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),bn=sn(j({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),wn=sn(j({},cn,{data:0})),An={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function kn(){return Mn}var Sn=sn(j({},dn,{key:function(e){if(e.key){var t=An[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=nn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?nn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?nn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),xn=sn(j({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=sn(j({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Tn=sn(j({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),On=sn(j({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Rn=[9,13,27,32],Pn=a&&"CompositionEvent"in window,Nn=null;a&&"documentMode"in document&&(Nn=document.documentMode);var Ln=a&&"TextEvent"in window&&!Nn,In=a&&(!Pn||Nn&&8<Nn&&11>=Nn),Bn=String.fromCharCode(32),Dn=!1;function jn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1,qn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qn[e.type]:"textarea"===t}function Hn(e,t,n,r){xe(r),0<(t=Kr(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Vn=null;function Wn(e){Br(e,0)}function $n(e){if(Y(yi(e)))return e}function Yn(e,t){if("change"===e)return t}var Gn=!1;if(a){var Zn;if(a){var Qn="oninput"in document;if(!Qn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Qn="function"==typeof Jn.oninput}Zn=Qn}else Zn=!1;Gn=Zn&&(!document.documentMode||9<document.documentMode)}function Xn(){Kn&&(Kn.detachEvent("onpropertychange",er),Vn=Kn=null)}function er(e){if("value"===e.propertyName&&$n(Vn)){var t=[];Hn(t,Vn,e,_e(e)),Pe(Wn,t)}}function tr(e,t,n){"focusin"===e?(Xn(),Vn=n,(Kn=t).attachEvent("onpropertychange",er)):"focusout"===e&&Xn()}function nr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Vn)}function rr(e,t){if("click"===e)return $n(t)}function ir(e,t){if("input"===e||"change"===e)return $n(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function sr(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!or(e[i],t[i]))return!1}return!0}function ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lr(e,t){var n,r=ar(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ar(r)}}function ur(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ur(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function cr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function dr(e){var t=cr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ur(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=lr(n,o);var s=lr(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fr=a&&"documentMode"in document&&11>=document.documentMode,pr=null,mr=null,gr=null,vr=!1;function yr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==pr||pr!==G(r)||(r="selectionStart"in(r=pr)&&hr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&sr(gr,r)||(gr=r,0<(r=Kr(mr,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=pr)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},Ar={},_r={};function Er(e){if(Ar[e])return Ar[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in _r)return Ar[e]=n[t];return e}a&&(_r=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Mr=Er("animationend"),kr=Er("animationiteration"),Sr=Er("animationstart"),xr=Er("transitionend"),Cr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){Cr.set(e,t),o(t,[e])}for(var Rr=0;Rr<Tr.length;Rr++){var Pr=Tr[Rr];Or(Pr.toLowerCase(),"on"+(Pr[0].toUpperCase()+Pr.slice(1)))}Or(Mr,"onAnimationEnd"),Or(kr,"onAnimationIteration"),Or(Sr,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(xr,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Nr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Nr));function Ir(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,i,o,s,a,l,u){if(ze.apply(this,arguments),De){if(!De)throw Error(n(198));var c=je;De=!1,je=null,Fe||(Fe=!0,Ue=c)}}(i,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Ir(i,a,u),o=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,u=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Ir(i,a,u),o=l}}}if(Fe)throw e=Ue,Fe=!1,Ue=null,e}function Dr(e,t){var n=t[fi];void 0===n&&(n=t[fi]=new Set);var r=e+"__bubble";n.has(r)||(qr(t,e,2,!1),n.add(r))}function jr(e,t,n){var r=0;t&&(r|=4),qr(n,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Fr]){e[Fr]=!0,r.forEach((function(t){"selectionchange"!==t&&(Lr.has(t)||jr(t,!1,e),jr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Fr]||(t[Fr]=!0,jr("selectionchange",!1,t))}}function qr(e,t,n,r){switch(Qt(t)){case 1:var i=Wt;break;case 4:i=$t;break;default:i=Yt}n=i.bind(null,t,n,e),i=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function zr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=gi(a)))return;if(5===(l=s.tag)||6===l){r=o=s;continue e}a=a.parentNode}}r=r.return}Pe((function(){var r=o,i=_e(n),s=[];e:{var a=Cr.get(e);if(void 0!==a){var l=hn,u=e;switch(e){case"keypress":if(0===nn(n))break e;case"keydown":case"keyup":l=Sn;break;case"focusin":u="focus",l=vn;break;case"focusout":u="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case Mr:case kr:case Sr:l=yn;break;case xr:l=Tn;break;case"scroll":l=fn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=xn}var c=0!=(4&t),h=!c&&"scroll"===e,d=c?null!==a?a+"Capture":null:a;c=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==d&&null!=(m=Ne(p,d))&&c.push(Hr(p,m,f))),h)break;p=p.return}0<c.length&&(a=new l(a,u,null,n,i),s.push({event:a,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===Ae||!(u=n.relatedTarget||n.fromElement)||!gi(u)&&!u[di])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?gi(u):null)&&(u!==(h=He(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=mn,m="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=xn,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?a:yi(l),f=null==u?a:yi(u),(a=new c(m,p+"leave",l,n,i)).target=h,a.relatedTarget=f,m=null,gi(i)===r&&((c=new c(d,p+"enter",u,n,i)).target=f,c.relatedTarget=h,m=c),h=m,l&&u)e:{for(d=u,p=0,f=c=l;f;f=Vr(f))p++;for(f=0,m=d;m;m=Vr(m))f++;for(;0<p-f;)c=Vr(c),p--;for(;0<f-p;)d=Vr(d),f--;for(;p--;){if(c===d||null!==d&&c===d.alternate)break e;c=Vr(c),d=Vr(d)}c=null}else c=null;null!==l&&Wr(s,a,l,c,!1),null!==u&&null!==h&&Wr(s,h,u,c,!0)}if("select"===(l=(a=r?yi(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Yn;else if(zn(a))if(Gn)g=ir;else{g=nr;var v=tr}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=rr);switch(g&&(g=g(e,r))?Hn(s,g,n,i):(v&&v(e,a,r),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&te(a,"number",a.value)),v=r?yi(r):window,e){case"focusin":(zn(v)||"true"===v.contentEditable)&&(pr=v,mr=r,gr=null);break;case"focusout":gr=mr=pr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,yr(s,n,i);break;case"selectionchange":if(fr)break;case"keydown":case"keyup":yr(s,n,i)}var y;if(Pn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?jn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(In&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=tn()):(Xt="value"in(Jt=i)?Jt.value:Jt.textContent,Un=!0)),0<(v=Kr(r,b)).length&&(b=new wn(b,e,null,n,i),s.push({event:b,listeners:v}),(y||null!==(y=Fn(n)))&&(b.data=y))),(y=Ln?function(e,t){switch(e){case"compositionend":return Fn(t);case"keypress":return 32!==t.which?null:(Dn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Dn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Pn&&jn(e,t)?(e=tn(),en=Xt=Jt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return In&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Kr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=y)}Br(s,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ne(e,n))&&r.unshift(Hr(e,o,i)),null!=(o=Ne(e,t))&&r.push(Hr(e,o,i))),e=e.return}return r}function Vr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Wr(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==u&&(a=u,i?null!=(l=Ne(n,o))&&s.unshift(Hr(n,l,a)):i||null!=(l=Ne(n,o))&&s.push(Hr(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var $r=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Gr(e){return("string"==typeof e?e:""+e).replace($r,"\n").replace(Yr,"")}function Zr(e,t,r){if(t=Gr(t),Gr(e)!==t&&r)throw Error(n(425))}function Qr(){}var Jr=null,Xr=null;function ei(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ti="function"==typeof setTimeout?setTimeout:void 0,ni="function"==typeof clearTimeout?clearTimeout:void 0,ri="function"==typeof Promise?Promise:void 0,ii="function"==typeof queueMicrotask?queueMicrotask:void 0!==ri?function(e){return ri.resolve(null).then(e).catch(oi)}:ti;function oi(e){setTimeout((function(){throw e}))}function si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ht(t)}function ai(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function li(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ui=Math.random().toString(36).slice(2),ci="__reactFiber$"+ui,hi="__reactProps$"+ui,di="__reactContainer$"+ui,fi="__reactEvents$"+ui,pi="__reactListeners$"+ui,mi="__reactHandles$"+ui;function gi(e){var t=e[ci];if(t)return t;for(var n=e.parentNode;n;){if(t=n[di]||n[ci]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=li(e);null!==e;){if(n=e[ci])return n;e=li(e)}return t}n=(e=n).parentNode}return null}function vi(e){return!(e=e[ci]||e[di])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function yi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function bi(e){return e[hi]||null}var wi=[],Ai=-1;function _i(e){return{current:e}}function Ei(e){0>Ai||(e.current=wi[Ai],wi[Ai]=null,Ai--)}function Mi(e,t){Ai++,wi[Ai]=e.current,e.current=t}var ki={},Si=_i(ki),xi=_i(!1),Ci=ki;function Ti(e,t){var n=e.type.contextTypes;if(!n)return ki;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Oi(e){return null!=e.childContextTypes}function Ri(){Ei(xi),Ei(Si)}function Pi(e,t,r){if(Si.current!==ki)throw Error(n(168));Mi(Si,t),Mi(xi,r)}function Ni(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var o in i=i.getChildContext())if(!(o in t))throw Error(n(108,K(e)||"Unknown",o));return j({},r,i)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ki,Ci=Si.current,Mi(Si,e),Mi(xi,xi.current),!0}function Ii(e,t,r){var i=e.stateNode;if(!i)throw Error(n(169));r?(e=Ni(e,t,Ci),i.__reactInternalMemoizedMergedChildContext=e,Ei(xi),Ei(Si),Mi(Si,e)):Ei(xi),Mi(xi,r)}var Bi=null,Di=!1,ji=!1;function Fi(e){null===Bi?Bi=[e]:Bi.push(e)}function Ui(){if(!ji&&null!==Bi){ji=!0;var e=0,t=wt;try{var n=Bi;for(wt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bi=null,Di=!1}catch(t){throw null!==Bi&&(Bi=Bi.slice(e+1)),Ye(et,Ui),t}finally{wt=t,ji=!1}}return null}var qi=[],zi=0,Hi=null,Ki=0,Vi=[],Wi=0,$i=null,Yi=1,Gi="";function Zi(e,t){qi[zi++]=Ki,qi[zi++]=Hi,Hi=e,Ki=t}function Qi(e,t,n){Vi[Wi++]=Yi,Vi[Wi++]=Gi,Vi[Wi++]=$i,$i=e;var r=Yi;e=Gi;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Yi=1<<32-at(t)+i|n<<i|r,Gi=o+e}else Yi=1<<o|n<<i|r,Gi=e}function Ji(e){null!==e.return&&(Zi(e,1),Qi(e,1,0))}function Xi(e){for(;e===Hi;)Hi=qi[--zi],qi[zi]=null,Ki=qi[--zi],qi[zi]=null;for(;e===$i;)$i=Vi[--Wi],Vi[Wi]=null,Gi=Vi[--Wi],Vi[Wi]=null,Yi=Vi[--Wi],Vi[Wi]=null}var eo=null,to=null,no=!1,ro=null;function io(e,t){var n=Ou(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function oo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,eo=e,to=ai(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,eo=e,to=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==$i?{id:Yi,overflow:Gi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ou(18,null,null,0)).stateNode=t,n.return=e,e.child=n,eo=e,to=null,!0);default:return!1}}function so(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ao(e){if(no){var t=to;if(t){var r=t;if(!oo(e,t)){if(so(e))throw Error(n(418));t=ai(r.nextSibling);var i=eo;t&&oo(e,t)?io(i,r):(e.flags=-4097&e.flags|2,no=!1,eo=e)}}else{if(so(e))throw Error(n(418));e.flags=-4097&e.flags|2,no=!1,eo=e}}}function lo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;eo=e}function uo(e){if(e!==eo)return!1;if(!no)return lo(e),no=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ei(e.type,e.memoizedProps)),t&&(t=to)){if(so(e))throw co(),Error(n(418));for(;t;)io(e,t),t=ai(t.nextSibling)}if(lo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){to=ai(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}to=null}}else to=eo?ai(e.stateNode.nextSibling):null;return!0}function co(){for(var e=to;e;)e=ai(e.nextSibling)}function ho(){to=eo=null,no=!1}function fo(e){null===ro?ro=[e]:ro.push(e)}var po=A.ReactCurrentBatchConfig;function mo(e,t){if(e&&e.defaultProps){for(var n in t=j({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var go=_i(null),vo=null,yo=null,bo=null;function wo(){bo=yo=vo=null}function Ao(e){var t=go.current;Ei(go),e._currentValue=t}function _o(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Eo(e,t){vo=e,bo=yo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ya=!0),e.firstContext=null)}function Mo(e){var t=e._currentValue;if(bo!==e)if(e={context:e,memoizedValue:t,next:null},null===yo){if(null===vo)throw Error(n(308));yo=e,vo.dependencies={lanes:0,firstContext:e}}else yo=yo.next=e;return t}var ko=null;function So(e){null===ko?ko=[e]:ko.push(e)}function xo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,So(t)):(n.next=i.next,i.next=n),t.interleaved=n,Co(e,r)}function Co(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var To=!1;function Oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ro(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Po(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function No(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&xl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Co(e,n)}return null===(i=r.interleaved)?(t.next=t,So(r)):(t.next=i.next,i.next=t),r.interleaved=t,Co(e,n)}function Lo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}function Io(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bo(e,t,n,r){var i=e.updateQueue;To=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,u=l.next;l.next=null,null===s?o=u:s.next=u,s=l;var c=e.alternate;null!==c&&(a=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===a?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l)}if(null!==o){var h=i.baseState;for(s=0,c=u=l=null,a=o;;){var d=a.lane,f=a.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(d=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=m.payload)?p.call(f,h,d):p))break e;h=j({},h,d);break e;case 2:To=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(u=c=f,l=h):c=c.next=f,s|=d;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(d=a).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===c&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Il|=s,e.lanes=s,e.memoizedState=h}}function Do(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(null!==o){if(i.callback=null,i=r,"function"!=typeof o)throw Error(n(191,o));o.call(i)}}}var jo=(new e.Component).refs;function Fo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:j({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Uo={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xl(),i=eu(e),o=Po(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=No(e,o,i))&&(tu(t,e,i,r),Lo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xl(),i=eu(e),o=Po(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=No(e,o,i))&&(tu(t,e,i,r),Lo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xl(),r=eu(e),i=Po(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=No(e,i,r))&&(tu(t,e,r,n),Lo(t,e,r))}};function qo(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!(t.prototype&&t.prototype.isPureReactComponent&&sr(n,r)&&sr(i,o))}function zo(e,t,n){var r=!1,i=ki,o=t.contextType;return"object"==typeof o&&null!==o?o=Mo(o):(i=Oi(t)?Ci:Si.current,o=(r=null!=(r=t.contextTypes))?Ti(e,i):ki),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Uo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ho(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Uo.enqueueReplaceState(t,t.state,null)}function Ko(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=jo,Oo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Mo(o):(o=Oi(t)?Ci:Si.current,i.context=Ti(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Fo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Uo.enqueueReplaceState(i,i.state,null),Bo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Vo(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var i=r.stateNode}if(!i)throw Error(n(147,e));var o=i,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=o.refs;t===jo&&(t=o.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function Wo(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $o(e){return(0,e._init)(e._payload)}function Yo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Pu(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Bu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var i=n.type;return i===M?h(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===N&&$o(i)===t.type)?((r=o(t,n.props)).ref=Vo(e,t,n),r.return=e,r):((r=Nu(n.type,n.key,n.props,null,e.mode,r)).ref=Vo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Du(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function h(e,t,n,r,i){return null===t||7!==t.tag?((t=Lu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Bu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=Nu(t.type,t.key,t.props,null,e.mode,n)).ref=Vo(e,null,t),n.return=e,n;case E:return(t=Du(t,e.mode,n)).return=e,t;case N:return d(e,(0,t._init)(t._payload),n)}if(ne(t)||B(t))return(t=Lu(t,e.mode,n,null)).return=e,t;Wo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?u(e,t,n,r):null;case E:return n.key===i?c(e,t,n,r):null;case N:return f(e,t,(i=n._init)(n._payload),r)}if(ne(n)||B(n))return null!==i?null:h(e,t,n,r,null);Wo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case E:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case N:return p(e,t,n,(0,r._init)(r._payload),i)}if(ne(r)||B(r))return h(t,e=e.get(n)||null,r,i,null);Wo(t,r)}return null}function m(n,o,a,l){for(var u=null,c=null,h=o,m=o=0,g=null;null!==h&&m<a.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(n,h,a[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(n,h),o=s(v,o,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===a.length)return r(n,h),no&&Zi(n,m),u;if(null===h){for(;m<a.length;m++)null!==(h=d(n,a[m],l))&&(o=s(h,o,m),null===c?u=h:c.sibling=h,c=h);return no&&Zi(n,m),u}for(h=i(n,h);m<a.length;m++)null!==(g=p(h,n,m,a[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),o=s(g,o,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(n,e)})),no&&Zi(n,m),u}function g(o,a,l,u){var c=B(l);if("function"!=typeof c)throw Error(n(150));if(null==(l=c.call(l)))throw Error(n(151));for(var h=c=null,m=a,g=a=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(o,m,y.value,u);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(o,m),a=s(b,a,g),null===h?c=b:h.sibling=b,h=b,m=v}if(y.done)return r(o,m),no&&Zi(o,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(o,y.value,u))&&(a=s(y,a,g),null===h?c=y:h.sibling=y,h=y);return no&&Zi(o,g),c}for(m=i(o,m);!y.done;g++,y=l.next())null!==(y=p(m,o,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=s(y,a,g),null===h?c=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(o,e)})),no&&Zi(o,g),c}return function e(n,i,s,l){if("object"==typeof s&&null!==s&&s.type===M&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case _:e:{for(var u=s.key,c=i;null!==c;){if(c.key===u){if((u=s.type)===M){if(7===c.tag){r(n,c.sibling),(i=o(c,s.props.children)).return=n,n=i;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===N&&$o(u)===c.type){r(n,c.sibling),(i=o(c,s.props)).ref=Vo(n,c,s),i.return=n,n=i;break e}r(n,c);break}t(n,c),c=c.sibling}s.type===M?((i=Lu(s.props.children,n.mode,l,s.key)).return=n,n=i):((l=Nu(s.type,s.key,s.props,null,n.mode,l)).ref=Vo(n,i,s),l.return=n,n=l)}return a(n);case E:e:{for(c=s.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===s.containerInfo&&i.stateNode.implementation===s.implementation){r(n,i.sibling),(i=o(i,s.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Du(s,n.mode,l)).return=n,n=i}return a(n);case N:return e(n,i,(c=s._init)(s._payload),l)}if(ne(s))return m(n,i,s,l);if(B(s))return g(n,i,s,l);Wo(n,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,s)).return=n,n=i):(r(n,i),(i=Bu(s,n.mode,l)).return=n,n=i),a(n)):r(n,i)}}var Go=Yo(!0),Zo=Yo(!1),Qo={},Jo=_i(Qo),Xo=_i(Qo),es=_i(Qo);function ts(e){if(e===Qo)throw Error(n(174));return e}function ns(e,t){switch(Mi(es,t),Mi(Xo,e),Mi(Jo,Qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ei(Jo),Mi(Jo,t)}function rs(){Ei(Jo),Ei(Xo),Ei(es)}function is(e){ts(es.current);var t=ts(Jo.current),n=ue(t,e.type);t!==n&&(Mi(Xo,e),Mi(Jo,n))}function os(e){Xo.current===e&&(Ei(Jo),Ei(Xo))}var ss=_i(0);function as(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ls=[];function us(){for(var e=0;e<ls.length;e++)ls[e]._workInProgressVersionPrimary=null;ls.length=0}var cs=A.ReactCurrentDispatcher,hs=A.ReactCurrentBatchConfig,ds=0,fs=null,ps=null,ms=null,gs=!1,vs=!1,ys=0,bs=0;function ws(){throw Error(n(321))}function As(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function _s(e,t,r,i,o,s){if(ds=s,fs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cs.current=null===e||null===e.memoizedState?oa:sa,e=r(i,o),vs){s=0;do{if(vs=!1,ys=0,25<=s)throw Error(n(301));s+=1,ms=ps=null,t.updateQueue=null,cs.current=aa,e=r(i,o)}while(vs)}if(cs.current=ia,t=null!==ps&&null!==ps.next,ds=0,ms=ps=fs=null,gs=!1,t)throw Error(n(300));return e}function Es(){var e=0!==ys;return ys=0,e}function Ms(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ms?fs.memoizedState=ms=e:ms=ms.next=e,ms}function ks(){if(null===ps){var e=fs.alternate;e=null!==e?e.memoizedState:null}else e=ps.next;var t=null===ms?fs.memoizedState:ms.next;if(null!==t)ms=t,ps=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ps=e).memoizedState,baseState:ps.baseState,baseQueue:ps.baseQueue,queue:ps.queue,next:null},null===ms?fs.memoizedState=ms=e:ms=ms.next=e}return ms}function Ss(e,t){return"function"==typeof t?t(e):t}function xs(e){var t=ks(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=ps,o=i.baseQueue,s=r.pending;if(null!==s){if(null!==o){var a=o.next;o.next=s.next,s.next=a}i.baseQueue=o=s,r.pending=null}if(null!==o){s=o.next,i=i.baseState;var l=a=null,u=null,c=s;do{var h=c.lane;if((ds&h)===h)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=d,a=i):u=u.next=d,fs.lanes|=h,Il|=h}c=c.next}while(null!==c&&c!==s);null===u?a=i:u.next=l,or(i,t.memoizedState)||(ya=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=u,r.lastRenderedState=i}if(null!==(e=r.interleaved)){o=e;do{s=o.lane,fs.lanes|=s,Il|=s,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Cs(e){var t=ks(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,s=t.memoizedState;if(null!==o){r.pending=null;var a=o=o.next;do{s=e(s,a.action),a=a.next}while(a!==o);or(s,t.memoizedState)||(ya=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),r.lastRenderedState=s}return[s,i]}function Ts(){}function Os(e,t){var r=fs,i=ks(),o=t(),s=!or(i.memoizedState,o);if(s&&(i.memoizedState=o,ya=!0),i=i.queue,zs(Ns.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==ms&&1&ms.memoizedState.tag){if(r.flags|=2048,Ds(9,Ps.bind(null,r,i,o,t),void 0,null),null===Cl)throw Error(n(349));0!=(30&ds)||Rs(r,t,o)}return o}function Rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ps(e,t,n,r){t.value=n,t.getSnapshot=r,Ls(t)&&Is(e)}function Ns(e,t,n){return n((function(){Ls(t)&&Is(e)}))}function Ls(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Is(e){var t=Co(e,1);null!==t&&tu(t,e,1,-1)}function Bs(e){var t=Ms();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:e},t.queue=e,e=e.dispatch=ea.bind(null,fs,e),[t.memoizedState,e]}function Ds(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function js(){return ks().memoizedState}function Fs(e,t,n,r){var i=Ms();fs.flags|=e,i.memoizedState=Ds(1|t,n,void 0,void 0===r?null:r)}function Us(e,t,n,r){var i=ks();r=void 0===r?null:r;var o=void 0;if(null!==ps){var s=ps.memoizedState;if(o=s.destroy,null!==r&&As(r,s.deps))return void(i.memoizedState=Ds(t,n,o,r))}fs.flags|=e,i.memoizedState=Ds(1|t,n,o,r)}function qs(e,t){return Fs(8390656,8,e,t)}function zs(e,t){return Us(2048,8,e,t)}function Hs(e,t){return Us(4,2,e,t)}function Ks(e,t){return Us(4,4,e,t)}function Vs(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ws(e,t,n){return n=null!=n?n.concat([e]):null,Us(4,4,Vs.bind(null,t,e),n)}function $s(){}function Ys(e,t){var n=ks();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&As(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gs(e,t){var n=ks();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&As(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zs(e,t,n){return 0==(21&ds)?(e.baseState&&(e.baseState=!1,ya=!0),e.memoizedState=n):(or(n,t)||(n=gt(),fs.lanes|=n,Il|=n,e.baseState=!0),t)}function Qs(e,t){var n=wt;wt=0!==n&&4>n?n:4,e(!0);var r=hs.transition;hs.transition={};try{e(!1),t()}finally{wt=n,hs.transition=r}}function Js(){return ks().memoizedState}function Xs(e,t,n){var r=eu(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ta(e)?na(t,n):null!==(n=xo(e,t,n,r))&&(tu(n,e,r,Xl()),ra(n,t,r))}function ea(e,t,n){var r=eu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ta(e))na(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,or(a,s)){var l=t.interleaved;return null===l?(i.next=i,So(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=xo(e,t,i,r))&&(tu(n,e,r,i=Xl()),ra(n,t,r))}}function ta(e){var t=e.alternate;return e===fs||null!==t&&t===fs}function na(e,t){vs=gs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ra(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,bt(e,n)}}var ia={readContext:Mo,useCallback:ws,useContext:ws,useEffect:ws,useImperativeHandle:ws,useInsertionEffect:ws,useLayoutEffect:ws,useMemo:ws,useReducer:ws,useRef:ws,useState:ws,useDebugValue:ws,useDeferredValue:ws,useTransition:ws,useMutableSource:ws,useSyncExternalStore:ws,useId:ws,unstable_isNewReconciler:!1},oa={readContext:Mo,useCallback:function(e,t){return Ms().memoizedState=[e,void 0===t?null:t],e},useContext:Mo,useEffect:qs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fs(4194308,4,Vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fs(4,2,e,t)},useMemo:function(e,t){var n=Ms();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ms();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Xs.bind(null,fs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ms().memoizedState=e},useState:Bs,useDebugValue:$s,useDeferredValue:function(e){return Ms().memoizedState=e},useTransition:function(){var e=Bs(!1),t=e[0];return e=Qs.bind(null,e[1]),Ms().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=fs,o=Ms();if(no){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===Cl)throw Error(n(349));0!=(30&ds)||Rs(i,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,qs(Ns.bind(null,i,s,e),[e]),i.flags|=2048,Ds(9,Ps.bind(null,i,s,r,t),void 0,null),r},useId:function(){var e=Ms(),t=Cl.identifierPrefix;if(no){var n=Gi;t=":"+t+"R"+(n=(Yi&~(1<<32-at(Yi)-1)).toString(32)+n),0<(n=ys++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=bs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sa={readContext:Mo,useCallback:Ys,useContext:Mo,useEffect:zs,useImperativeHandle:Ws,useInsertionEffect:Hs,useLayoutEffect:Ks,useMemo:Gs,useReducer:xs,useRef:js,useState:function(){return xs(Ss)},useDebugValue:$s,useDeferredValue:function(e){return Zs(ks(),ps.memoizedState,e)},useTransition:function(){return[xs(Ss)[0],ks().memoizedState]},useMutableSource:Ts,useSyncExternalStore:Os,useId:Js,unstable_isNewReconciler:!1},aa={readContext:Mo,useCallback:Ys,useContext:Mo,useEffect:zs,useImperativeHandle:Ws,useInsertionEffect:Hs,useLayoutEffect:Ks,useMemo:Gs,useReducer:Cs,useRef:js,useState:function(){return Cs(Ss)},useDebugValue:$s,useDeferredValue:function(e){var t=ks();return null===ps?t.memoizedState=e:Zs(t,ps.memoizedState,e)},useTransition:function(){return[Cs(Ss)[0],ks().memoizedState]},useMutableSource:Ts,useSyncExternalStore:Os,useId:Js,unstable_isNewReconciler:!1};function la(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ua(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ca(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var ha="function"==typeof WeakMap?WeakMap:Map;function da(e,t,n){(n=Po(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Kl=r),ca(0,t)},n}function fa(e,t,n){(n=Po(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ca(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ca(0,t),"function"!=typeof r&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function pa(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ha;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Mu.bind(null,e,t,n),t.then(e,e))}function ma(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ga(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Po(-1,1)).tag=2,No(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var va=A.ReactCurrentOwner,ya=!1;function ba(e,t,n,r){t.child=null===e?Zo(t,null,n,r):Go(t,e.child,n,r)}function wa(e,t,n,r,i){n=n.render;var o=t.ref;return Eo(t,i),r=_s(e,t,n,r,o,i),n=Es(),null===e||ya?(no&&n&&Ji(t),t.flags|=1,ba(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Aa(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Ru(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Nu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_a(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(s,r)&&e.ref===t.ref)return Ha(e,t,i)}return t.flags|=1,(e=Pu(o,r)).ref=t.ref,e.return=t,t.child=e}function _a(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(sr(o,r)&&e.ref===t.ref){if(ya=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Ha(e,t,i);0!=(131072&e.flags)&&(ya=!0)}}return ka(e,t,n,r,i)}function Ea(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mi(Pl,Rl),Rl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mi(Pl,Rl),Rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Mi(Pl,Rl),Rl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Mi(Pl,Rl),Rl|=r;return ba(e,t,i,n),t.child}function Ma(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ka(e,t,n,r,i){var o=Oi(n)?Ci:Si.current;return o=Ti(t,o),Eo(t,i),n=_s(e,t,n,r,o,i),r=Es(),null===e||ya?(no&&r&&Ji(t),t.flags|=1,ba(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ha(e,t,i))}function Sa(e,t,n,r,i){if(Oi(n)){var o=!0;Li(t)}else o=!1;if(Eo(t,i),null===t.stateNode)za(e,t),zo(t,n,r),Ko(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;u="object"==typeof u&&null!==u?Mo(u):Ti(t,u=Oi(n)?Ci:Si.current);var c=n.getDerivedStateFromProps,h="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==u)&&Ho(t,s,r,u),To=!1;var d=t.memoizedState;s.state=d,Bo(t,r,s,i),l=t.memoizedState,a!==r||d!==l||xi.current||To?("function"==typeof c&&(Fo(t,n,c,r),l=t.memoizedState),(a=To||qo(t,n,a,r,d,l,u))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ro(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:mo(t.type,a),s.props=u,h=t.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Mo(l):Ti(t,l=Oi(n)?Ci:Si.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==h||d!==l)&&Ho(t,s,r,l),To=!1,d=t.memoizedState,s.state=d,Bo(t,r,s,i);var p=t.memoizedState;a!==h||d!==p||xi.current||To?("function"==typeof f&&(Fo(t,n,f,r),p=t.memoizedState),(u=To||qo(t,n,u,r,d,p,l)||!1)?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return xa(e,t,n,r,o,i)}function xa(e,t,n,r,i,o){Ma(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Ii(t,n,!1),Ha(e,t,o);r=t.stateNode,va.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Go(t,e.child,null,o),t.child=Go(t,null,a,o)):ba(e,t,a,o),t.memoizedState=r.state,i&&Ii(t,n,!0),t.child}function Ca(e){var t=e.stateNode;t.pendingContext?Pi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Pi(0,t.context,!1),ns(e,t.containerInfo)}function Ta(e,t,n,r,i){return ho(),fo(i),t.flags|=256,ba(e,t,n,r),t.child}var Oa,Ra,Pa,Na,La={dehydrated:null,treeContext:null,retryLane:0};function Ia(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ba(e,t,r){var i,o=t.pendingProps,s=ss.current,a=!1,l=0!=(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&0!=(2&s)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Mi(ss,1&s),null===e)return ao(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,a?(o=t.mode,a=t.child,l={mode:"hidden",children:l},0==(1&o)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Iu(l,o,0,null),e=Lu(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ia(r),t.memoizedState=La,e):Da(t,l));if(null!==(s=e.memoizedState)&&null!==(i=s.dehydrated))return function(e,t,r,i,o,s,a){if(r)return 256&t.flags?(t.flags&=-257,ja(e,t,a,i=ua(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,o=t.mode,i=Iu({mode:"visible",children:i.children},o,0,null),(s=Lu(s,o,a,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,0!=(1&t.mode)&&Go(t,e.child,null,a),t.child.memoizedState=Ia(a),t.memoizedState=La,s);if(0==(1&t.mode))return ja(e,t,a,null);if("$!"===o.data){if(i=o.nextSibling&&o.nextSibling.dataset)var l=i.dgst;return i=l,ja(e,t,a,i=ua(s=Error(n(419)),i,void 0))}if(l=0!=(a&e.childLanes),ya||l){if(null!==(i=Cl)){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(i.suspendedLanes|a))?0:o)&&o!==s.retryLane&&(s.retryLane=o,Co(e,o),tu(i,e,o,-1))}return pu(),ja(e,t,a,i=ua(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Su.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,to=ai(o.nextSibling),eo=t,no=!0,ro=null,null!==e&&(Vi[Wi++]=Yi,Vi[Wi++]=Gi,Vi[Wi++]=$i,Yi=e.id,Gi=e.overflow,$i=t),(t=Da(t,i.children)).flags|=4096,t)}(e,t,l,o,i,s,r);if(a){a=o.fallback,l=t.mode,i=(s=e.child).sibling;var u={mode:"hidden",children:o.children};return 0==(1&l)&&t.child!==s?((o=t.child).childLanes=0,o.pendingProps=u,t.deletions=null):(o=Pu(s,u)).subtreeFlags=14680064&s.subtreeFlags,null!==i?a=Pu(i,a):(a=Lu(a,l,r,null)).flags|=2,a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,l=null===(l=e.child.memoizedState)?Ia(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~r,t.memoizedState=La,o}return e=(a=e.child).sibling,o=Pu(a,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Da(e,t){return(t=Iu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ja(e,t,n,r){return null!==r&&fo(r),Go(t,e.child,null,n),(e=Da(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fa(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),_o(e.return,t,n)}function Ua(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function qa(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ba(e,t,r.children,n),0!=(2&(r=ss.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fa(e,n,t);else if(19===e.tag)Fa(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Mi(ss,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===as(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ua(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===as(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ua(t,!0,n,null,o);break;case"together":Ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function za(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ha(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0==(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=Pu(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Pu(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Ka(e,t){if(!no)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Va(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wa(e,t,r){var o=t.pendingProps;switch(Xi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Va(t),null;case 1:case 17:return Oi(t.type)&&Ri(),Va(t),null;case 3:return o=t.stateNode,rs(),Ei(xi),Ei(Si),us(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(uo(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==ro&&(ou(ro),ro=null))),Ra(e,t),Va(t),null;case 5:os(t);var s=ts(es.current);if(r=t.type,null!==e&&null!=t.stateNode)Pa(e,t,r,o,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Va(t),null}if(e=ts(Jo.current),uo(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[ci]=t,o[hi]=a,e=0!=(1&t.mode),r){case"dialog":Dr("cancel",o),Dr("close",o);break;case"iframe":case"object":case"embed":Dr("load",o);break;case"video":case"audio":for(s=0;s<Nr.length;s++)Dr(Nr[s],o);break;case"source":Dr("error",o);break;case"img":case"image":case"link":Dr("error",o),Dr("load",o);break;case"details":Dr("toggle",o);break;case"input":Q(o,a),Dr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},Dr("invalid",o);break;case"textarea":oe(o,a),Dr("invalid",o)}for(var l in be(r,a),s=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"==typeof u?o.textContent!==u&&(!0!==a.suppressHydrationWarning&&Zr(o.textContent,u,e),s=["children",u]):"number"==typeof u&&o.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Zr(o.textContent,u,e),s=["children",""+u]):i.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Dr("scroll",o)}switch(r){case"input":$(o),ee(o,a,!0);break;case"textarea":$(o),ae(o);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(o.onclick=Qr)}o=s,t.updateQueue=o,null!==o&&(t.flags|=4)}else{l=9===s.nodeType?s:s.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(r,{is:o.is}):(e=l.createElement(r),"select"===r&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,r),e[ci]=t,e[hi]=o,Oa(e,t,!1,!1),t.stateNode=e;e:{switch(l=we(r,o),r){case"dialog":Dr("cancel",e),Dr("close",e),s=o;break;case"iframe":case"object":case"embed":Dr("load",e),s=o;break;case"video":case"audio":for(s=0;s<Nr.length;s++)Dr(Nr[s],e);s=o;break;case"source":Dr("error",e),s=o;break;case"img":case"image":case"link":Dr("error",e),Dr("load",e),s=o;break;case"details":Dr("toggle",e),s=o;break;case"input":Q(e,o),s=Z(e,o),Dr("invalid",e);break;case"option":default:s=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},s=j({},o,{value:void 0}),Dr("invalid",e);break;case"textarea":oe(e,o),s=ie(e,o),Dr("invalid",e)}for(a in be(r,s),u=s)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?ve(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===a?"string"==typeof c?("textarea"!==r||""!==c)&&fe(e,c):"number"==typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(i.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Dr("scroll",e):null!=c&&w(e,a,c,l))}switch(r){case"input":$(e),ee(e,o,!1);break;case"textarea":$(e),ae(e);break;case"option":null!=o.value&&e.setAttribute("value",""+V(o.value));break;case"select":e.multiple=!!o.multiple,null!=(a=o.value)?re(e,!!o.multiple,a,!1):null!=o.defaultValue&&re(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=Qr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Va(t),null;case 6:if(e&&null!=t.stateNode)Na(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=ts(es.current),ts(Jo.current),uo(t)){if(o=t.stateNode,r=t.memoizedProps,o[ci]=t,(a=o.nodeValue!==r)&&null!==(e=eo))switch(e.tag){case 3:Zr(o.nodeValue,r,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zr(o.nodeValue,r,0!=(1&e.mode))}a&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[ci]=t,t.stateNode=o}return Va(t),null;case 13:if(Ei(ss),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(no&&null!==to&&0!=(1&t.mode)&&0==(128&t.flags))co(),ho(),t.flags|=98560,a=!1;else if(a=uo(t),null!==o&&null!==o.dehydrated){if(null===e){if(!a)throw Error(n(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(n(317));a[ci]=t}else ho(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Va(t),a=!1}else null!==ro&&(ou(ro),ro=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=r,t):((o=null!==o)!=(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ss.current)?0===Nl&&(Nl=3):pu())),null!==t.updateQueue&&(t.flags|=4),Va(t),null);case 4:return rs(),Ra(e,t),null===e&&Ur(t.stateNode.containerInfo),Va(t),null;case 10:return Ao(t.type._context),Va(t),null;case 19:if(Ei(ss),null===(a=t.memoizedState))return Va(t),null;if(o=0!=(128&t.flags),null===(l=a.rendering))if(o)Ka(a,!1);else{if(0!==Nl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=as(e))){for(t.flags|=128,Ka(a,!1),null!==(o=l.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(a=r).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Mi(ss,1&ss.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>ql&&(t.flags|=128,o=!0,Ka(a,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=as(l))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Ka(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!no)return Va(t),null}else 2*Je()-a.renderingStartTime>ql&&1073741824!==r&&(t.flags|=128,o=!0,Ka(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=a.last)?r.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,r=ss.current,Mi(ss,o?1&r|2:1&r),t):(Va(t),null);case 22:case 23:return cu(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&0!=(1&t.mode)?0!=(1073741824&Rl)&&(Va(t),6&t.subtreeFlags&&(t.flags|=8192)):Va(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function $a(e,t){switch(Xi(t),t.tag){case 1:return Oi(t.type)&&Ri(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rs(),Ei(xi),Ei(Si),us(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return os(t),null;case 13:if(Ei(ss),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));ho()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ei(ss),null;case 4:return rs(),null;case 10:return Ao(t.type._context),null;case 22:case 23:return cu(),null;default:return null}}Oa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ra=function(){},Pa=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ts(Jo.current);var s,a=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),a=[];break;case"select":o=j({},o,{value:void 0}),r=j({},r,{value:void 0}),a=[];break;case"textarea":o=ie(e,o),r=ie(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Qr)}for(c in be(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var l=o[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(i.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(i.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Dr("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Na=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ya=!1,Ga=!1,Za="function"==typeof WeakSet?WeakSet:Set,Qa=null;function Ja(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Eu(e,t,n)}else n.current=null}function Xa(e,t,n){try{n()}catch(n){Eu(e,t,n)}}var el=!1;function tl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Xa(t,n,o)}i=i.next}while(i!==r)}}function nl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[ci],delete t[hi],delete t[fi],delete t[pi],delete t[mi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Qr));else if(4!==r&&null!==(e=e.child))for(al(e,t,n),e=e.sibling;null!==e;)al(e,t,n),e=e.sibling}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}var ul=null,cl=!1;function hl(e,t,n){for(n=n.child;null!==n;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(st&&"function"==typeof st.onCommitFiberUnmount)try{st.onCommitFiberUnmount(ot,n)}catch(e){}switch(n.tag){case 5:Ga||Ja(n,t);case 6:var r=ul,i=cl;ul=null,hl(e,t,n),cl=i,null!==(ul=r)&&(cl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(cl?(e=ul,n=n.stateNode,8===e.nodeType?si(e.parentNode,n):1===e.nodeType&&si(e,n),Ht(e)):si(ul,n.stateNode));break;case 4:r=ul,i=cl,ul=n.stateNode.containerInfo,cl=!0,hl(e,t,n),ul=r,cl=i;break;case 0:case 11:case 14:case 15:if(!Ga&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(0!=(2&o)||0!=(4&o))&&Xa(n,t,s),i=i.next}while(i!==r)}hl(e,t,n);break;case 1:if(!Ga&&(Ja(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Eu(n,t,e)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ga=(r=Ga)||null!==n.memoizedState,hl(e,t,n),Ga=r):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Za),t.forEach((function(t){var r=xu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function pl(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,cl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,cl=!0;break e}l=l.return}if(null===ul)throw Error(n(160));dl(s,a,o),ul=null,cl=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(e){Eu(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pl(t,e),gl(e),4&i){try{tl(3,e,e.return),nl(3,e)}catch(t){Eu(e,e.return,t)}try{tl(5,e,e.return)}catch(t){Eu(e,e.return,t)}}break;case 1:pl(t,e),gl(e),512&i&&null!==r&&Ja(r,r.return);break;case 5:if(pl(t,e),gl(e),512&i&&null!==r&&Ja(r,r.return),32&e.flags){var o=e.stateNode;try{fe(o,"")}catch(t){Eu(e,e.return,t)}}if(4&i&&null!=(o=e.stateNode)){var s=e.memoizedProps,a=null!==r?r.memoizedProps:s,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===s.type&&null!=s.name&&J(o,s),we(l,a);var c=we(l,s);for(a=0;a<u.length;a+=2){var h=u[a],d=u[a+1];"style"===h?ve(o,d):"dangerouslySetInnerHTML"===h?de(o,d):"children"===h?fe(o,d):w(o,h,d,c)}switch(l){case"input":X(o,s);break;case"textarea":se(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?re(o,!!s.multiple,p,!1):f!==!!s.multiple&&(null!=s.defaultValue?re(o,!!s.multiple,s.defaultValue,!0):re(o,!!s.multiple,s.multiple?[]:"",!1))}o[hi]=s}catch(t){Eu(e,e.return,t)}}break;case 6:if(pl(t,e),gl(e),4&i){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(t){Eu(e,e.return,t)}}break;case 3:if(pl(t,e),gl(e),4&i&&null!==r&&r.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(t){Eu(e,e.return,t)}break;case 4:default:pl(t,e),gl(e);break;case 13:pl(t,e),gl(e),8192&(o=e.child).flags&&(s=null!==o.memoizedState,o.stateNode.isHidden=s,!s||null!==o.alternate&&null!==o.alternate.memoizedState||(Ul=Je())),4&i&&fl(e);break;case 22:if(h=null!==r&&null!==r.memoizedState,1&e.mode?(Ga=(c=Ga)||h,pl(t,e),Ga=c):pl(t,e),gl(e),8192&i){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!h&&0!=(1&e.mode))for(Qa=e,h=e.child;null!==h;){for(d=Qa=h;null!==Qa;){switch(p=(f=Qa).child,f.tag){case 0:case 11:case 14:case 15:tl(4,f,f.return);break;case 1:Ja(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){i=f,r=f.return;try{t=i,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Eu(i,r,e)}}break;case 5:Ja(f,f.return);break;case 22:if(null!==f.memoizedState){wl(d);continue}}null!==p?(p.return=f,Qa=p):wl(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{o=d.stateNode,c?"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=d.stateNode,a=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ge("display",a))}catch(t){Eu(e,e.return,t)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Eu(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:pl(t,e),gl(e),4&i&&fl(e);case 21:}}function gl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(ol(r)){var i=r;break e}r=r.return}throw Error(n(160))}switch(i.tag){case 5:var o=i.stateNode;32&i.flags&&(fe(o,""),i.flags&=-33),ll(e,sl(e),o);break;case 3:case 4:var s=i.stateNode.containerInfo;al(e,sl(e),s);break;default:throw Error(n(161))}}catch(t){Eu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Qa=e,yl(e)}function yl(e,t,n){for(var r=0!=(1&e.mode);null!==Qa;){var i=Qa,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||Ya;if(!s){var a=i.alternate,l=null!==a&&null!==a.memoizedState||Ga;a=Ya;var u=Ga;if(Ya=s,(Ga=l)&&!u)for(Qa=i;null!==Qa;)l=(s=Qa).child,22===s.tag&&null!==s.memoizedState?Al(i):null!==l?(l.return=s,Qa=l):Al(i);for(;null!==o;)Qa=o,yl(o),o=o.sibling;Qa=i,Ya=a,Ga=u}bl(e)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,Qa=o):bl(e)}}function bl(e){for(;null!==Qa;){var t=Qa;if(0!=(8772&t.flags)){var r=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ga||nl(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ga)if(null===r)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:mo(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Do(t,s,i);break;case 3:var a=t.updateQueue;if(null!==a){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Do(t,a,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var h=c.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Ht(d)}}}break;default:throw Error(n(163))}Ga||512&t.flags&&rl(t)}catch(e){Eu(t,t.return,e)}}if(t===e){Qa=null;break}if(null!==(r=t.sibling)){r.return=t.return,Qa=r;break}Qa=t.return}}function wl(e){for(;null!==Qa;){var t=Qa;if(t===e){Qa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qa=n;break}Qa=t.return}}function Al(e){for(;null!==Qa;){var t=Qa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nl(4,t)}catch(e){Eu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Eu(t,i,e)}}var o=t.return;try{rl(t)}catch(e){Eu(t,o,e)}break;case 5:var s=t.return;try{rl(t)}catch(e){Eu(t,s,e)}}}catch(e){Eu(t,t.return,e)}if(t===e){Qa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,Qa=a;break}Qa=t.return}}var _l,El=Math.ceil,Ml=A.ReactCurrentDispatcher,kl=A.ReactCurrentOwner,Sl=A.ReactCurrentBatchConfig,xl=0,Cl=null,Tl=null,Ol=0,Rl=0,Pl=_i(0),Nl=0,Ll=null,Il=0,Bl=0,Dl=0,jl=null,Fl=null,Ul=0,ql=1/0,zl=null,Hl=!1,Kl=null,Vl=null,Wl=!1,$l=null,Yl=0,Gl=0,Zl=null,Ql=-1,Jl=0;function Xl(){return 0!=(6&xl)?Je():-1!==Ql?Ql:Ql=Je()}function eu(e){return 0==(1&e.mode)?1:0!=(2&xl)&&0!==Ol?Ol&-Ol:null!==po.transition?(0===Jl&&(Jl=gt()),Jl):0!==(e=wt)?e:e=void 0===(e=window.event)?16:Qt(e.type)}function tu(e,t,r,i){if(50<Gl)throw Gl=0,Zl=null,Error(n(185));yt(e,r,i),0!=(2&xl)&&e===Cl||(e===Cl&&(0==(2&xl)&&(Bl|=r),4===Nl&&su(e,Ol)),nu(e,i),1===r&&0===xl&&0==(1&t.mode)&&(ql=Je()+500,Di&&Ui()))}function nu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-at(o),a=1<<s,l=i[s];-1===l?0!=(a&n)&&0==(a&r)||(i[s]=pt(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=ft(e,e===Cl?Ol:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Di=!0,Fi(e)}(au.bind(null,e)):Fi(au.bind(null,e)),ii((function(){0==(6&xl)&&Ui()})),n=null;else{switch(At(r)){case 1:n=et;break;case 4:n=tt;break;case 16:default:n=nt;break;case 536870912:n=it}n=Cu(n,ru.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ru(e,t){if(Ql=-1,Jl=0,0!=(6&xl))throw Error(n(327));var r=e.callbackNode;if(Au()&&e.callbackNode!==r)return null;var i=ft(e,e===Cl?Ol:0);if(0===i)return null;if(0!=(30&i)||0!=(i&e.expiredLanes)||t)t=mu(e,i);else{t=i;var o=xl;xl|=2;var s=fu();for(Cl===e&&Ol===t||(zl=null,ql=Je()+500,hu(e,t));;)try{vu();break}catch(t){du(e,t)}wo(),Ml.current=s,xl=o,null!==Tl?t=0:(Cl=null,Ol=0,t=Nl)}if(0!==t){if(2===t&&0!==(o=mt(e))&&(i=o,t=iu(e,o)),1===t)throw r=Ll,hu(e,0),su(e,i),nu(e,Je()),r;if(6===t)su(e,i);else{if(o=e.current.alternate,0==(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!or(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=mu(e,i))&&0!==(s=mt(e))&&(i=s,t=iu(e,s)),1===t))throw r=Ll,hu(e,0),su(e,i),nu(e,Je()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(n(345));case 2:case 5:wu(e,Fl,zl);break;case 3:if(su(e,i),(130023424&i)===i&&10<(t=Ul+500-Je())){if(0!==ft(e,0))break;if(((o=e.suspendedLanes)&i)!==i){Xl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ti(wu.bind(null,e,Fl,zl),t);break}wu(e,Fl,zl);break;case 4:if(su(e,i),(4194240&i)===i)break;for(t=e.eventTimes,o=-1;0<i;){var a=31-at(i);s=1<<a,(a=t[a])>o&&(o=a),i&=~s}if(i=o,10<(i=(120>(i=Je()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*El(i/1960))-i)){e.timeoutHandle=ti(wu.bind(null,e,Fl,zl),i);break}wu(e,Fl,zl);break;default:throw Error(n(329))}}}return nu(e,Je()),e.callbackNode===r?ru.bind(null,e):null}function iu(e,t){var n=jl;return e.current.memoizedState.isDehydrated&&(hu(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Fl,Fl=n,null!==t&&ou(t)),e}function ou(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function su(e,t){for(t&=~Dl,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function au(e){if(0!=(6&xl))throw Error(n(327));Au();var t=ft(e,0);if(0==(1&t))return nu(e,Je()),null;var r=mu(e,t);if(0!==e.tag&&2===r){var i=mt(e);0!==i&&(t=i,r=iu(e,i))}if(1===r)throw r=Ll,hu(e,0),su(e,t),nu(e,Je()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,Fl,zl),nu(e,Je()),null}function lu(e,t){var n=xl;xl|=1;try{return e(t)}finally{0===(xl=n)&&(ql=Je()+500,Di&&Ui())}}function uu(e){null!==$l&&0===$l.tag&&0==(6&xl)&&Au();var t=xl;xl|=1;var n=Sl.transition,r=wt;try{if(Sl.transition=null,wt=1,e)return e()}finally{wt=r,Sl.transition=n,0==(6&(xl=t))&&Ui()}}function cu(){Rl=Pl.current,Ei(Pl)}function hu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ni(n)),null!==Tl)for(n=Tl.return;null!==n;){var r=n;switch(Xi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Ri();break;case 3:rs(),Ei(xi),Ei(Si),us();break;case 5:os(r);break;case 4:rs();break;case 13:case 19:Ei(ss);break;case 10:Ao(r.type._context);break;case 22:case 23:cu()}n=n.return}if(Cl=e,Tl=e=Pu(e.current,null),Ol=Rl=t,Nl=0,Ll=null,Dl=Bl=Il=0,Fl=jl=null,null!==ko){for(t=0;t<ko.length;t++)if(null!==(r=(n=ko[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}ko=null}return e}function du(e,t){for(;;){var r=Tl;try{if(wo(),cs.current=ia,gs){for(var i=fs.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}gs=!1}if(ds=0,ms=ps=fs=null,vs=!1,ys=0,kl.current=null,null===r||null===r.return){Nl=1,Ll=t,Tl=null;break}e:{var s=e,a=r.return,l=r,u=t;if(t=Ol,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=ma(a);if(null!==p){p.flags&=-257,ga(p,a,l,0,t),1&p.mode&&pa(s,c,t),u=c;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(0==(1&t)){pa(s,c,t),pu();break e}u=Error(n(426))}else if(no&&1&l.mode){var v=ma(a);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),ga(v,a,l,0,t),fo(la(u,l));break e}}s=u=la(u,l),4!==Nl&&(Nl=2),null===jl?jl=[s]:jl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Io(s,da(0,u,t));break e;case 1:l=u;var y=s.type,b=s.stateNode;if(0==(128&s.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Vl||!Vl.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t,Io(s,fa(s,l,t));break e}}s=s.return}while(null!==s)}bu(r)}catch(e){t=e,Tl===r&&null!==r&&(Tl=r=r.return);continue}break}}function fu(){var e=Ml.current;return Ml.current=ia,null===e?ia:e}function pu(){0!==Nl&&3!==Nl&&2!==Nl||(Nl=4),null===Cl||0==(268435455&Il)&&0==(268435455&Bl)||su(Cl,Ol)}function mu(e,t){var r=xl;xl|=2;var i=fu();for(Cl===e&&Ol===t||(zl=null,hu(e,t));;)try{gu();break}catch(t){du(e,t)}if(wo(),xl=r,Ml.current=i,null!==Tl)throw Error(n(261));return Cl=null,Ol=0,Nl}function gu(){for(;null!==Tl;)yu(Tl)}function vu(){for(;null!==Tl&&!Ze();)yu(Tl)}function yu(e){var t=_l(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?bu(e):Tl=t,kl.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Wa(n,t,Rl)))return void(Tl=n)}else{if(null!==(n=$a(n,t)))return n.flags&=32767,void(Tl=n);if(null===e)return Nl=6,void(Tl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Tl=t);Tl=t=e}while(null!==t);0===Nl&&(Nl=5)}function wu(e,t,r){var i=wt,o=Sl.transition;try{Sl.transition=null,wt=1,function(e,t,r,i){do{Au()}while(null!==$l);if(0!=(6&xl))throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,s),e===Cl&&(Tl=Cl=null,Ol=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||Wl||(Wl=!0,Cu(nt,(function(){return Au(),null}))),s=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||s){s=Sl.transition,Sl.transition=null;var a=wt;wt=1;var l=xl;xl|=4,kl.current=null,function(e,t){if(Jr=Vt,hr(e=cr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(i&&0!==i.rangeCount){r=i.anchorNode;var o=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{r.nodeType,s.nodeType}catch(e){r=null;break e}var a=0,l=-1,u=-1,c=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==r||0!==o&&3!==d.nodeType||(l=a+o),d!==s||0!==i&&3!==d.nodeType||(u=a+i),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++c===o&&(l=a),f===s&&++h===i&&(u=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}r=-1===l||-1===u?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xr={focusedElem:e,selectionRange:r},Vt=!1,Qa=t;null!==Qa;)if(e=(t=Qa).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Qa=e;else for(;null!==Qa;){t=Qa;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:mo(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(n(163))}}catch(e){Eu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Qa=e;break}Qa=t.return}m=el,el=!1}(e,r),ml(r,e),dr(Xr),Vt=!!Jr,Xr=Jr=null,e.current=r,vl(r),Qe(),xl=l,wt=a,Sl.transition=s}else e.current=r;if(Wl&&(Wl=!1,$l=e,Yl=o),0===(s=e.pendingLanes)&&(Vl=null),function(e){if(st&&"function"==typeof st.onCommitFiberRoot)try{st.onCommitFiberRoot(ot,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),nu(e,Je()),null!==t)for(i=e.onRecoverableError,r=0;r<t.length;r++)i((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if(Hl)throw Hl=!1,e=Kl,Kl=null,e;0!=(1&Yl)&&0!==e.tag&&Au(),0!=(1&(s=e.pendingLanes))?e===Zl?Gl++:(Gl=0,Zl=e):Gl=0,Ui()}(e,t,r,i)}finally{Sl.transition=o,wt=i}return null}function Au(){if(null!==$l){var e=At(Yl),t=Sl.transition,r=wt;try{if(Sl.transition=null,wt=16>e?16:e,null===$l)var i=!1;else{if(e=$l,$l=null,Yl=0,0!=(6&xl))throw Error(n(331));var o=xl;for(xl|=4,Qa=e.current;null!==Qa;){var s=Qa,a=s.child;if(0!=(16&Qa.flags)){var l=s.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Qa=c;null!==Qa;){var h=Qa;switch(h.tag){case 0:case 11:case 15:tl(8,h,s)}var d=h.child;if(null!==d)d.return=h,Qa=d;else for(;null!==Qa;){var f=(h=Qa).sibling,p=h.return;if(il(h),h===c){Qa=null;break}if(null!==f){f.return=p,Qa=f;break}Qa=p}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Qa=s}}if(0!=(2064&s.subtreeFlags)&&null!==a)a.return=s,Qa=a;else e:for(;null!==Qa;){if(0!=(2048&(s=Qa).flags))switch(s.tag){case 0:case 11:case 15:tl(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,Qa=y;break e}Qa=s.return}}var b=e.current;for(Qa=b;null!==Qa;){var w=(a=Qa).child;if(0!=(2064&a.subtreeFlags)&&null!==w)w.return=a,Qa=w;else e:for(a=b;null!==Qa;){if(0!=(2048&(l=Qa).flags))try{switch(l.tag){case 0:case 11:case 15:nl(9,l)}}catch(e){Eu(l,l.return,e)}if(l===a){Qa=null;break e}var A=l.sibling;if(null!==A){A.return=l.return,Qa=A;break e}Qa=l.return}}if(xl=o,Ui(),st&&"function"==typeof st.onPostCommitFiberRoot)try{st.onPostCommitFiberRoot(ot,e)}catch(e){}i=!0}return i}finally{wt=r,Sl.transition=t}}return!1}function _u(e,t,n){e=No(e,t=da(0,t=la(n,t),1),1),t=Xl(),null!==e&&(yt(e,1,t),nu(e,t))}function Eu(e,t,n){if(3===e.tag)_u(e,e,n);else for(;null!==t;){if(3===t.tag){_u(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Vl||!Vl.has(r))){t=No(t,e=fa(t,e=la(n,e),1),1),e=Xl(),null!==t&&(yt(t,1,e),nu(t,e));break}}t=t.return}}function Mu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Xl(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Ol&n)===n&&(4===Nl||3===Nl&&(130023424&Ol)===Ol&&500>Je()-Ul?hu(e,0):Dl|=n),nu(e,t)}function ku(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ht,0==(130023424&(ht<<=1))&&(ht=4194304)));var n=Xl();null!==(e=Co(e,t))&&(yt(e,t,n),nu(e,n))}function Su(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ku(e,n)}function xu(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(n(314))}null!==i&&i.delete(t),ku(e,r)}function Cu(e,t){return Ye(e,t)}function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ou(e,t,n,r){return new Tu(e,t,n,r)}function Ru(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pu(e,t){var n=e.alternate;return null===n?((n=Ou(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Nu(e,t,r,i,o,s){var a=2;if(i=e,"function"==typeof e)Ru(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case M:return Lu(r.children,o,s,t);case k:a=8,o|=8;break;case S:return(e=Ou(12,r,t,2|o)).elementType=S,e.lanes=s,e;case O:return(e=Ou(13,r,t,o)).elementType=O,e.lanes=s,e;case R:return(e=Ou(19,r,t,o)).elementType=R,e.lanes=s,e;case L:return Iu(r,o,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:a=10;break e;case C:a=9;break e;case T:a=11;break e;case P:a=14;break e;case N:a=16,i=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Ou(a,r,t,o)).elementType=e,t.type=i,t.lanes=s,t}function Lu(e,t,n,r){return(e=Ou(7,e,r,t)).lanes=n,e}function Iu(e,t,n,r){return(e=Ou(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function Bu(e,t,n){return(e=Ou(6,e,null,t)).lanes=n,e}function Du(e,t,n){return(t=Ou(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ju(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,i,o,s,a,l){return e=new ju(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ou(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oo(o),e}function Uu(e){if(!e)return ki;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Oi(r))return Ni(e,r,t)}return t}function qu(e,t,n,r,i,o,s,a,l){return(e=Fu(n,r,!0,e,0,o,0,a,l)).context=Uu(null),n=e.current,(o=Po(r=Xl(),i=eu(n))).callback=null!=t?t:null,No(n,o,i),e.current.lanes=i,yt(e,i,r),nu(e,r),e}function zu(e,t,n,r){var i=t.current,o=Xl(),s=eu(i);return n=Uu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Po(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=No(i,t,s))&&(tu(e,i,s,o),Lo(e,i,s)),s}function Hu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ku(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Vu(e,t){Ku(e,t),(e=e.alternate)&&Ku(e,t)}_l=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||xi.current)ya=!0;else{if(0==(e.lanes&r)&&0==(128&t.flags))return ya=!1,function(e,t,n){switch(t.tag){case 3:Ca(t),ho();break;case 5:is(t);break;case 1:Oi(t.type)&&Li(t);break;case 4:ns(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Mi(go,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Mi(ss,1&ss.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ba(e,t,n):(Mi(ss,1&ss.current),null!==(e=Ha(e,t,n))?e.sibling:null);Mi(ss,1&ss.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return qa(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mi(ss,ss.current),r)break;return null;case 22:case 23:return t.lanes=0,Ea(e,t,n)}return Ha(e,t,n)}(e,t,r);ya=0!=(131072&e.flags)}else ya=!1,no&&0!=(1048576&t.flags)&&Qi(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;za(e,t),e=t.pendingProps;var o=Ti(t,Si.current);Eo(t,r),o=_s(null,t,i,e,o,r);var s=Es();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oi(i)?(s=!0,Li(t)):s=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Oo(t),o.updater=Uo,t.stateNode=o,o._reactInternals=t,Ko(t,i,e,r),t=xa(null,t,i,!0,s,r)):(t.tag=0,no&&s&&Ji(t),ba(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(za(e,t),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Ru(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===P)return 14}return 2}(i),e=mo(i,e),o){case 0:t=ka(null,t,i,e,r);break e;case 1:t=Sa(null,t,i,e,r);break e;case 11:t=wa(null,t,i,e,r);break e;case 14:t=Aa(null,t,i,mo(i.type,e),r);break e}throw Error(n(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,ka(e,t,i,o=t.elementType===i?o:mo(i,o),r);case 1:return i=t.type,o=t.pendingProps,Sa(e,t,i,o=t.elementType===i?o:mo(i,o),r);case 3:e:{if(Ca(t),null===e)throw Error(n(387));i=t.pendingProps,o=(s=t.memoizedState).element,Ro(e,t),Bo(t,i,null,r);var a=t.memoizedState;if(i=a.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Ta(e,t,i,r,o=la(Error(n(423)),t));break e}if(i!==o){t=Ta(e,t,i,r,o=la(Error(n(424)),t));break e}for(to=ai(t.stateNode.containerInfo.firstChild),eo=t,no=!0,ro=null,r=Zo(t,null,i,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(ho(),i===o){t=Ha(e,t,r);break e}ba(e,t,i,r)}t=t.child}return t;case 5:return is(t),null===e&&ao(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,a=o.children,ei(i,o)?a=null:null!==s&&ei(i,s)&&(t.flags|=32),Ma(e,t),ba(e,t,a,r),t.child;case 6:return null===e&&ao(t),null;case 13:return Ba(e,t,r);case 4:return ns(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Go(t,null,i,r):ba(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,wa(e,t,i,o=t.elementType===i?o:mo(i,o),r);case 7:return ba(e,t,t.pendingProps,r),t.child;case 8:case 12:return ba(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,s=t.memoizedProps,a=o.value,Mi(go,i._currentValue),i._currentValue=a,null!==s)if(or(s.value,a)){if(s.children===o.children&&!xi.current){t=Ha(e,t,r);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var u=l.firstContext;null!==u;){if(u.context===i){if(1===s.tag){(u=Po(-1,r&-r)).tag=2;var c=s.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}s.lanes|=r,null!==(u=s.alternate)&&(u.lanes|=r),_o(s.return,r,t),l.lanes|=r;break}u=u.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(n(341));a.lanes|=r,null!==(l=a.alternate)&&(l.lanes|=r),_o(a,r,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}ba(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,Eo(t,r),i=i(o=Mo(o)),t.flags|=1,ba(e,t,i,r),t.child;case 14:return o=mo(i=t.type,t.pendingProps),Aa(e,t,i,o=mo(i.type,o),r);case 15:return _a(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:mo(i,o),za(e,t),t.tag=1,Oi(i)?(e=!0,Li(t)):e=!1,Eo(t,r),zo(t,i,o),Ko(t,i,o,r),xa(null,t,i,!0,e,r);case 19:return qa(e,t,r);case 22:return Ea(e,t,r)}throw Error(n(156,t.tag))};var Wu="function"==typeof reportError?reportError:function(e){console.error(e)};function $u(e){this._internalRoot=e}function Yu(e){this._internalRoot=e}function Gu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function Ju(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=Hu(s);a.call(e)}}zu(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Hu(s);o.call(e)}}var s=qu(t,r,e,0,null,!1,0,"",Qu);return e._reactRootContainer=s,e[di]=s.current,Ur(8===e.nodeType?e.parentNode:e),uu(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=Hu(l);a.call(e)}}var l=Fu(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=l,e[di]=l.current,Ur(8===e.nodeType?e.parentNode:e),uu((function(){zu(t,l,n,r)})),l}(n,t,e,i,r);return Hu(s)}Yu.prototype.render=$u.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));zu(e,t,null,null)},Yu.prototype.unmount=$u.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uu((function(){zu(null,e,null,null)})),t[di]=null}},Yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&jt(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(bt(t,1|n),nu(t,Je()),0==(6&xl)&&(ql=Je()+500,Ui()))}break;case 13:uu((function(){var t=Co(e,1);if(null!==t){var n=Xl();tu(t,e,1,n)}})),Vu(e,1)}},Et=function(e){if(13===e.tag){var t=Co(e,134217728);null!==t&&tu(t,e,134217728,Xl()),Vu(e,134217728)}},Mt=function(e){if(13===e.tag){var t=eu(e),n=Co(e,t);null!==n&&tu(n,e,t,Xl()),Vu(e,t)}},kt=function(){return wt},St=function(e,t){var n=wt;try{return wt=e,t()}finally{wt=n}},Ee=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=bi(i);if(!o)throw Error(n(90));Y(i),X(i,o)}}}break;case"textarea":se(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Te=lu,Oe=uu;var Xu={usingClientEntryPoint:!1,Events:[vi,yi,bi,xe,Ce,lu]},ec={findFiberByHostInstance:gi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},tc={bundleType:ec.bundleType,version:ec.version,rendererPackageName:ec.rendererPackageName,rendererConfig:ec.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:ec.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{ot=nc.inject(tc),st=nc}catch(he){}}return p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xu,p.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Gu(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},p.createRoot=function(e,t){if(!Gu(e))throw Error(n(299));var r=!1,i="",o=Wu;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Fu(e,1,!1,null,0,r,0,i,o),e[di]=t.current,Ur(8===e.nodeType?e.parentNode:e),new $u(t)},p.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return null===(e=We(t))?null:e.stateNode},p.flushSync=function(e){return uu(e)},p.hydrate=function(e,t,r){if(!Zu(t))throw Error(n(200));return Ju(null,e,t,!0,r)},p.hydrateRoot=function(e,t,r){if(!Gu(e))throw Error(n(405));var i=null!=r&&r.hydratedSources||null,o=!1,s="",a=Wu;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(s=r.identifierPrefix),void 0!==r.onRecoverableError&&(a=r.onRecoverableError)),t=qu(t,null,e,1,null!=r?r:null,o,0,s,a),e[di]=t.current,Ur(e),i)for(e=0;e<i.length;e++)o=(o=(r=i[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Yu(t)},p.render=function(e,t,r){if(!Zu(t))throw Error(n(200));return Ju(null,e,t,!1,r)},p.unmountComponentAtNode=function(e){if(!Zu(e))throw Error(n(40));return!!e._reactRootContainer&&(uu((function(){Ju(null,null,e,!1,(function(){e._reactRootContainer=null,e[di]=null}))})),!0)},p.unstable_batchedUpdates=lu,p.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Zu(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Ju(e,t,r,!1,i)},p.version="18.2.0-next-9e3b772b8-20220608",p}()):f.exports=(b||(b=1,"production"!==Vb.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=y(),n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,r=!1;function i(e){if(!r){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];s("warn",e,n)}}function o(e){if(!r){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];s("error",e,n)}}function s(e,t,r){var i=n.ReactDebugCurrentFrame.getStackAddendum();""!==i&&(t+="%s",r=r.concat([i]));var o=r.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,o)}var a=0,l=1,u=2,h=3,d=4,f=5,p=6,m=7,g=8,v=9,b=10,A=11,_=12,E=13,M=14,k=15,S=16,x=17,C=18,T=19,O=21,R=22,P=23,N=24,L=25,I=!0,B=!1,D=!1,j=!1,F=!1,U=!1,q=!1,z=!0,H=!0,K=!0,V=new Set,W={},$={};function Y(e,t){G(e,t),G(e+"Capture",t)}function G(e,t){W[e]&&o("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),W[e]=t;var n=e.toLowerCase();$[n]=e,"onDoubleClick"===e&&($.ondblclick=e);for(var r=0;r<t.length;r++)V.add(t[r])}var Z=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Q=Object.prototype.hasOwnProperty;function J(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function X(e){try{return ee(e),!1}catch(e){return!0}}function ee(e){return""+e}function te(e,t){if(X(e))return o("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",t,J(e)),ee(e)}function ne(e){if(X(e))return o("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",J(e)),ee(e)}var re=0,ie=3,oe=4,se=5,ae=6,le=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ue=le+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ce=new RegExp("^["+le+"]["+ue+"]*$"),he={},de={};function fe(e){return!!Q.call(de,e)||!Q.call(he,e)&&(ce.test(e)?(de[e]=!0,!0):(he[e]=!0,o("Invalid attribute name: `%s`",e),!1))}function pe(e,t,n){return null!==t?t.type===re:!n&&e.length>2&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])}function me(e,t,n,r){if(null!==n&&n.type===re)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;var i=e.toLowerCase().slice(0,5);return"data-"!==i&&"aria-"!==i;default:return!1}}function ge(e,t,n,r){if(null==t)return!0;if(me(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case ie:return!t;case oe:return!1===t;case se:return isNaN(t);case ae:return isNaN(t)||t<1}return!1}function ve(e){return be.hasOwnProperty(e)?be[e]:null}function ye(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||t===ie||t===oe,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var be={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){be[e]=new ye(e,re,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0],n=e[1];be[t]=new ye(t,1,!1,n,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){be[e]=new ye(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){be[e]=new ye(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((function(e){be[e]=new ye(e,ie,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){be[e]=new ye(e,ie,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){be[e]=new ye(e,oe,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){be[e]=new ye(e,ae,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){be[e]=new ye(e,se,!1,e.toLowerCase(),null,!1,!1)}));var we=/[\-\:]([a-z])/g,Ae=function(e){return e[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((function(e){var t=e.replace(we,Ae);be[t]=new ye(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(we,Ae);be[t]=new ye(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(we,Ae);be[t]=new ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){be[e]=new ye(e,1,!1,e.toLowerCase(),null,!1,!1)})),be.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){be[e]=new ye(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _e=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Ee=!1;function Me(e){!Ee&&_e.test(e)&&(Ee=!0,o("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(e)))}function ke(e,t,n,r){if(r.mustUseProperty)return e[r.propertyName];te(n,t),r.sanitizeURL&&Me(""+n);var i=r.attributeName,o=null;if(r.type===oe){if(e.hasAttribute(i)){var s=e.getAttribute(i);return""===s||(ge(t,n,r,!1)?s:s===""+n?n:s)}}else if(e.hasAttribute(i)){if(ge(t,n,r,!1))return e.getAttribute(i);if(r.type===ie)return n;o=e.getAttribute(i)}return ge(t,n,r,!1)?null===o?n:o:o===""+n?n:o}function Se(e,t,n,r){if(fe(t)){if(!e.hasAttribute(t))return void 0===n?void 0:null;var i=e.getAttribute(t);return te(n,t),i===""+n?n:i}}function xe(e,t,n,r){var i=ve(t);if(!pe(t,i,r))if(ge(t,n,i,r)&&(n=null),r||null===i){if(fe(t)){var o=t;null===n?e.removeAttribute(o):(te(n,t),e.setAttribute(o,""+n))}}else if(i.mustUseProperty){var s=i.propertyName;if(null===n){var a=i.type;e[s]=a!==ie&&""}else e[s]=n}else{var l=i.attributeName,u=i.attributeNamespace;if(null===n)e.removeAttribute(l);else{var c,h=i.type;h===ie||h===oe&&!0===n?c="":(te(n,l),c=""+n,i.sanitizeURL&&Me(c.toString())),u?e.setAttributeNS(u,l,c):e.setAttribute(l,c)}}}var Ce=Symbol.for("react.element"),Te=Symbol.for("react.portal"),Oe=Symbol.for("react.fragment"),Re=Symbol.for("react.strict_mode"),Pe=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),Le=Symbol.for("react.context"),Ie=Symbol.for("react.forward_ref"),Be=Symbol.for("react.suspense"),De=Symbol.for("react.suspense_list"),je=Symbol.for("react.memo"),Fe=Symbol.for("react.lazy"),Ue=Symbol.for("react.offscreen"),qe=Symbol.iterator,ze="@@iterator";function He(e){if(null===e||"object"!=typeof e)return null;var t=qe&&e[qe]||e[ze];return"function"==typeof t?t:null}var Ke,Ve,We,$e,Ye,Ge,Ze,Qe=Object.assign,Je=0;function Xe(){}Xe.__reactDisabledLog=!0;var et,tt=n.ReactCurrentDispatcher;function nt(e,t,n){if(void 0===et)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);et=r&&r[1]||""}return"\n"+et+e}var rt,it=!1,ot="function"==typeof WeakMap?WeakMap:Map;function st(e,t){if(!e||it)return"";var n,r=rt.get(e);if(void 0!==r)return r;it=!0;var i,s=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=tt.current,tt.current=null,function(){if(0===Je){Ke=console.log,Ve=console.info,We=console.warn,$e=console.error,Ye=console.group,Ge=console.groupCollapsed,Ze=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Xe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Je++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var l=t.stack.split("\n"),u=n.stack.split("\n"),c=l.length-1,h=u.length-1;c>=1&&h>=0&&l[c]!==u[h];)h--;for(;c>=1&&h>=0;c--,h--)if(l[c]!==u[h]){if(1!==c||1!==h)do{if(c--,--h<0||l[c]!==u[h]){var d="\n"+l[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&rt.set(e,d),d}}while(c>=1&&h>=0);break}}}finally{it=!1,tt.current=i,function(){if(0==--Je){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Qe({},e,{value:Ke}),info:Qe({},e,{value:Ve}),warn:Qe({},e,{value:We}),error:Qe({},e,{value:$e}),group:Qe({},e,{value:Ye}),groupCollapsed:Qe({},e,{value:Ge}),groupEnd:Qe({},e,{value:Ze})})}Je<0&&o("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=s}var f=e?e.displayName||e.name:"",p=f?nt(f):"";return"function"==typeof e&&rt.set(e,p),p}function at(e,t,n){return st(e,!1)}function lt(e,t,n){if(null==e)return"";if("function"==typeof e)return st(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return nt(e);switch(e){case Be:return nt("Suspense");case De:return nt("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case Ie:return at(e.render);case je:return lt(e.type,t,n);case Fe:var i=e,o=i._payload,s=i._init;try{return lt(s(o),t,n)}catch(e){}}return""}function ut(e){switch(e._debugOwner&&e._debugOwner.type,e._debugSource,e.tag){case f:return nt(e.type);case S:return nt("Lazy");case E:return nt("Suspense");case T:return nt("SuspenseList");case a:case u:case k:return at(e.type);case A:return at(e.type.render);case l:return st(e.type,!0);default:return""}}function ct(e){try{var t="",n=e;do{t+=ut(n),n=n.return}while(n);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function ht(e){return e.displayName||"Context"}function dt(e){if(null==e)return null;if("number"==typeof e.tag&&o("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Oe:return"Fragment";case Te:return"Portal";case Pe:return"Profiler";case Re:return"StrictMode";case Be:return"Suspense";case De:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Le:return ht(e)+".Consumer";case Ne:return ht(e._context)+".Provider";case Ie:return function(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||"";return""!==i?n+"("+i+")":n}(e,e.render,"ForwardRef");case je:var t=e.displayName||null;return null!==t?t:dt(e.type)||"Memo";case Fe:var n=e,r=n._payload,i=n._init;try{return dt(i(r))}catch(e){return null}}return null}function ft(e){return e.displayName||"Context"}function pt(e){var t,n,r,i,o=e.tag,s=e.type;switch(o){case N:return"Cache";case v:return ft(s)+".Consumer";case b:return ft(s._context)+".Provider";case C:return"DehydratedFragment";case A:return t=s,r="ForwardRef",i=(n=s.render).displayName||n.name||"",t.displayName||(""!==i?r+"("+i+")":r);case m:return"Fragment";case f:return s;case d:return"Portal";case h:return"Root";case p:return"Text";case S:return dt(s);case g:return s===Re?"StrictMode":"Mode";case R:return"Offscreen";case _:return"Profiler";case O:return"Scope";case E:return"Suspense";case T:return"SuspenseList";case L:return"TracingMarker";case l:case a:case x:case u:case M:case k:if("function"==typeof s)return s.displayName||s.name||null;if("string"==typeof s)return s}return null}rt=new ot;var mt=n.ReactDebugCurrentFrame,gt=null,vt=!1;function yt(){if(null===gt)return null;var e=gt._debugOwner;return null!=e?pt(e):null}function bt(){return null===gt?"":ct(gt)}function wt(){mt.getCurrentStack=null,gt=null,vt=!1}function At(e){mt.getCurrentStack=null===e?null:bt,gt=e,vt=!1}function _t(e){vt=e}function Et(e){return""+e}function Mt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return ne(e),e;default:return""}}var kt={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function St(e,t){kt[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||null==t.value||o("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||null==t.checked||o("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function xt(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ct(e){return e._valueTracker}function Tt(e){Ct(e)||(e._valueTracker=function(e){var t=xt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);ne(e[t]);var r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){ne(e),r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable});var s={getValue:function(){return r},setValue:function(e){ne(e),r=""+e},stopTracking:function(){!function(e){e._valueTracker=null}(e),delete e[t]}};return s}}(e))}function Ot(e){if(!e)return!1;var t=Ct(e);if(!t)return!0;var n=t.getValue(),r=function(e){var t="";return e?t=xt(e)?e.checked?"true":"false":e.value:t}(e);return r!==n&&(t.setValue(r),!0)}function Rt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Pt=!1,Nt=!1,Lt=!1,It=!1;function Bt(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}function Dt(e,t){var n=e,r=t.checked;return Qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:n._wrapperState.initialChecked})}function jt(e,t){St(0,t),void 0===t.checked||void 0===t.defaultChecked||Nt||(o("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",yt()||"A component",t.type),Nt=!0),void 0===t.value||void 0===t.defaultValue||Pt||(o("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",yt()||"A component",t.type),Pt=!0);var n=e,r=null==t.defaultValue?"":t.defaultValue;n._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:Mt(null!=t.value?t.value:r),controlled:Bt(t)}}function Ft(e,t){var n=e,r=t.checked;null!=r&&xe(n,"checked",r,!1)}function Ut(e,t){var n=e,r=Bt(t);n._wrapperState.controlled||!r||It||(o("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),It=!0),!n._wrapperState.controlled||r||Lt||(o("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Lt=!0),Ft(e,t);var i=Mt(t.value),s=t.type;if(null!=i)"number"===s?(0===i&&""===n.value||n.value!=i)&&(n.value=Et(i)):n.value!==Et(i)&&(n.value=Et(i));else if("submit"===s||"reset"===s)return void n.removeAttribute("value");t.hasOwnProperty("value")?zt(n,t.type,i):t.hasOwnProperty("defaultValue")&&zt(n,t.type,Mt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(n.defaultChecked=!!t.defaultChecked)}function qt(e,t,n){var r=e;if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;var o=Et(r._wrapperState.initialValue);n||o!==r.value&&(r.value=o),r.defaultValue=o}var s=r.name;""!==s&&(r.name=""),r.defaultChecked=!r.defaultChecked,r.defaultChecked=!!r._wrapperState.initialChecked,""!==s&&(r.name=s)}function zt(e,t,n){"number"===t&&Rt(e.ownerDocument)===e||(null==n?e.defaultValue=Et(e._wrapperState.initialValue):e.defaultValue!==Et(n)&&(e.defaultValue=Et(n)))}var Ht=!1,Kt=!1,Vt=!1;function Wt(t,n){null==n.value&&("object"==typeof n.children&&null!==n.children?e.Children.forEach(n.children,(function(e){null!=e&&"string"!=typeof e&&"number"!=typeof e&&(Kt||(Kt=!0,o("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))})):null!=n.dangerouslySetInnerHTML&&(Vt||(Vt=!0,o("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),null==n.selected||Ht||(o("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),Ht=!0)}var $t,Yt=Array.isArray;function Gt(e){return Yt(e)}function Zt(){var e=yt();return e?"\n\nCheck the render method of `"+e+"`.":""}$t=!1;var Qt=["value","defaultValue"];function Jt(e,t,n,r){var i=e.options;if(t){for(var o=n,s={},a=0;a<o.length;a++)s["$"+o[a]]=!0;for(var l=0;l<i.length;l++){var u=s.hasOwnProperty("$"+i[l].value);i[l].selected!==u&&(i[l].selected=u),u&&r&&(i[l].defaultSelected=!0)}}else{for(var c=Et(Mt(n)),h=null,d=0;d<i.length;d++){if(i[d].value===c)return i[d].selected=!0,void(r&&(i[d].defaultSelected=!0));null!==h||i[d].disabled||(h=i[d])}null!==h&&(h.selected=!0)}}function Xt(e,t){return Qe({},t,{value:void 0})}function en(e,t){var n=e;!function(e){St(0,e);for(var t=0;t<Qt.length;t++){var n=Qt[t];if(null!=e[n]){var r=Gt(e[n]);e.multiple&&!r?o("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Zt()):!e.multiple&&r&&o("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Zt())}}}(t),n._wrapperState={wasMultiple:!!t.multiple},void 0===t.value||void 0===t.defaultValue||$t||(o("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),$t=!0)}var tn=!1;function nn(e,t){var n=e;if(null!=t.dangerouslySetInnerHTML)throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");return Qe({},t,{value:void 0,defaultValue:void 0,children:Et(n._wrapperState.initialValue)})}function rn(e,t){var n=e;St(0,t),void 0===t.value||void 0===t.defaultValue||tn||(o("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",yt()||"A component"),tn=!0);var r=t.value;if(null==r){var i=t.children,s=t.defaultValue;if(null!=i){if(o("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),null!=s)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Gt(i)){if(i.length>1)throw new Error("<textarea> can only have at most one child.");i=i[0]}s=i}null==s&&(s=""),r=s}n._wrapperState={initialValue:Mt(r)}}function on(e,t){var n=e,r=Mt(t.value),i=Mt(t.defaultValue);if(null!=r){var o=Et(r);o!==n.value&&(n.value=o),null==t.defaultValue&&n.defaultValue!==o&&(n.defaultValue=o)}null!=i&&(n.defaultValue=Et(i))}function sn(e,t){var n=e,r=n.textContent;r===n._wrapperState.initialValue&&""!==r&&null!==r&&(n.value=r)}var an="http://www.w3.org/1999/xhtml",ln="http://www.w3.org/1998/Math/MathML",un="http://www.w3.org/2000/svg";function cn(e){switch(e){case"svg":return un;case"math":return ln;default:return an}}function hn(e,t){return null==e||e===an?cn(t):e===un&&"foreignObject"===t?an:e}var dn,fn,pn=(fn=function(e,t){if(e.namespaceURI!==un||"innerHTML"in e)e.innerHTML=t;else{(dn=dn||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(var n=dn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return fn(e,t)}))}:fn),mn=1,gn=3,vn=8,yn=9,bn=11,wn=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===gn)return void(n.nodeValue=t)}e.textContent=t},An={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},_n={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},En=["Webkit","ms","Moz","O"];function Mn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||_n.hasOwnProperty(e)&&_n[e]?(function(e,t){X(e)&&(o("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",t,J(e)),ee(e))}(t,e),(""+t).trim()):t+"px"}Object.keys(_n).forEach((function(e){En.forEach((function(t){_n[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=_n[e]}))}));var kn=/([A-Z])/g,Sn=/^ms-/,xn=/^(?:webkit|moz|o)[A-Z]/,Cn=/^-ms-/,Tn=/-(.)/g,On=/;\s*$/,Rn={},Pn={},Nn=!1,Ln=!1,In=function(e,t){e.indexOf("-")>-1?function(e){Rn.hasOwnProperty(e)&&Rn[e]||(Rn[e]=!0,o("Unsupported style property %s. Did you mean %s?",e,e.replace(Cn,"ms-").replace(Tn,(function(e,t){return t.toUpperCase()}))))}(e):xn.test(e)?function(e){Rn.hasOwnProperty(e)&&Rn[e]||(Rn[e]=!0,o("Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)))}(e):On.test(t)&&function(e,t){Pn.hasOwnProperty(t)&&Pn[t]||(Pn[t]=!0,o('Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(On,"")))}(e,t),"number"==typeof t&&(isNaN(t)?function(e,t){Nn||(Nn=!0,o("`NaN` is an invalid value for the `%s` css style property.",e))}(e):isFinite(t)||function(e,t){Ln||(Ln=!0,o("`Infinity` is an invalid value for the `%s` css style property.",e))}(e))};function Bn(e){var t="",n="";for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i){var o=0===r.indexOf("--");t+=n+(o?r:r.replace(kn,"-$1").toLowerCase().replace(Sn,"-ms-"))+":",t+=Mn(r,i,o),n=";"}}return t||null}function Dn(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--");i||In(r,t[r]);var o=Mn(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,o):n[r]=o}}function jn(e){var t={};for(var n in e)for(var r=An[n]||[n],i=0;i<r.length;i++)t[r[i]]=n;return t}var Fn=Qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Un="__html";function qn(e,t){if(t){if(Fn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw new Error(e+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if("object"!=typeof t.dangerouslySetInnerHTML||!(Un in t.dangerouslySetInnerHTML))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!t.suppressContentEditableWarning&&t.contentEditable&&null!=t.children&&o("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),null!=t.style&&"object"!=typeof t.style)throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}}function zn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Hn={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Kn={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},Vn={},Wn=new RegExp("^(aria)-["+ue+"]*$"),$n=new RegExp("^(aria)[A-Z]["+ue+"]*$");function Yn(e,t){if(Q.call(Vn,t)&&Vn[t])return!0;if($n.test(t)){var n="aria-"+t.slice(4).toLowerCase(),r=Kn.hasOwnProperty(n)?n:null;if(null==r)return o("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Vn[t]=!0,!0;if(t!==r)return o("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,r),Vn[t]=!0,!0}if(Wn.test(t)){var i=t.toLowerCase(),s=Kn.hasOwnProperty(i)?i:null;if(null==s)return Vn[t]=!0,!1;if(t!==s)return o("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,s),Vn[t]=!0,!0}return!0}var Gn,Zn=!1,Qn={},Jn=/^on./,Xn=/^on[^A-Z]/,er=new RegExp("^(aria)-["+ue+"]*$"),tr=new RegExp("^(aria)[A-Z]["+ue+"]*$");Gn=function(e,t,n,r){if(Q.call(Qn,t)&&Qn[t])return!0;var i=t.toLowerCase();if("onfocusin"===i||"onfocusout"===i)return o("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),Qn[t]=!0,!0;if(null!=r){var s=r.registrationNameDependencies,a=r.possibleRegistrationNames;if(s.hasOwnProperty(t))return!0;var l=a.hasOwnProperty(i)?a[i]:null;if(null!=l)return o("Invalid event handler property `%s`. Did you mean `%s`?",t,l),Qn[t]=!0,!0;if(Jn.test(t))return o("Unknown event handler property `%s`. It will be ignored.",t),Qn[t]=!0,!0}else if(Jn.test(t))return Xn.test(t)&&o("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Qn[t]=!0,!0;if(er.test(t)||tr.test(t))return!0;if("innerhtml"===i)return o("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Qn[t]=!0,!0;if("aria"===i)return o("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Qn[t]=!0,!0;if("is"===i&&null!=n&&"string"!=typeof n)return o("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),Qn[t]=!0,!0;if("number"==typeof n&&isNaN(n))return o("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Qn[t]=!0,!0;var u=ve(t),c=null!==u&&u.type===re;if(Hn.hasOwnProperty(i)){var h=Hn[i];if(h!==t)return o("Invalid DOM property `%s`. Did you mean `%s`?",t,h),Qn[t]=!0,!0}else if(!c&&t!==i)return o("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,i),Qn[t]=!0,!0;return"boolean"==typeof n&&me(t,n,u,!1)?(n?o('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):o('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),Qn[t]=!0,!0):!!c||(me(t,n,u,!1)?(Qn[t]=!0,!1):("false"!==n&&"true"!==n||null===u||u.type!==ie||(o("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,"false"===n?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),Qn[t]=!0),!0))};var nr=1,rr=2,ir=4,or=nr|rr|ir,sr=null;function ar(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===gn?t.parentNode:t}var lr=null,ur=null,cr=null;function hr(e){var t=Oc(e);if(t){if("function"!=typeof lr)throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var n=t.stateNode;if(n){var r=Pc(n);lr(t.stateNode,t.type,r)}}}function dr(e){ur?cr?cr.push(e):cr=[e]:ur=e}function fr(){if(ur){var e=ur,t=cr;if(ur=null,cr=null,hr(e),t)for(var n=0;n<t.length;n++)hr(t[n])}}var pr=function(e,t){return e(t)},mr=function(){},gr=!1;function vr(e,t,n){if(gr)return e(t,n);gr=!0;try{return pr(e,t,n)}finally{gr=!1,(null!==ur||null!==cr)&&(mr(),fr())}}function yr(e,t){var n=e.stateNode;if(null===n)return null;var r=Pc(n);if(null===r)return null;var i=r[t];if(function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e.type,r))return null;if(i&&"function"!=typeof i)throw new Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof i+"` type.");return i}var br=!1;if(Z)try{var wr={};Object.defineProperty(wr,"passive",{get:function(){br=!0}}),window.addEventListener("test",wr,wr),window.removeEventListener("test",wr,wr)}catch(e){br=!1}function Ar(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var _r=Ar;if("undefined"!=typeof window&&"function"==typeof window.dispatchEvent&&"undefined"!=typeof document&&"function"==typeof document.createEvent){var Er=document.createElement("react");_r=function(e,t,n,r,i,o,s,a,l){if("undefined"==typeof document||null===document)throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var u=document.createEvent("Event"),c=!1,h=!0,d=window.event,f=Object.getOwnPropertyDescriptor(window,"event");function p(){Er.removeEventListener(A,v,!1),void 0!==window.event&&window.hasOwnProperty("event")&&(window.event=d)}var m,g=Array.prototype.slice.call(arguments,3);function v(){c=!0,p(),t.apply(n,g),h=!1}var y=!1,b=!1;function w(e){if(m=e.error,y=!0,null===m&&0===e.colno&&0===e.lineno&&(b=!0),e.defaultPrevented&&null!=m&&"object"==typeof m)try{m._suppressLogging=!0}catch(e){}}var A="react-"+(e||"invokeguardedcallback");if(window.addEventListener("error",w),Er.addEventListener(A,v,!1),u.initEvent(A,!1,!1),Er.dispatchEvent(u),f&&Object.defineProperty(window,"event",f),c&&h&&(y?b&&(m=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")):m=new Error("An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the \"Pause on exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue."),this.onError(m)),window.removeEventListener("error",w),!c)return p(),Ar.apply(this,arguments)}}var Mr=_r,kr=!1,Sr=null,xr=!1,Cr=null,Tr={onError:function(e){kr=!0,Sr=e}};function Or(e,t,n,r,i,o,s,a,l){kr=!1,Sr=null,Mr.apply(Tr,arguments)}function Rr(){if(kr){var e=Sr;return kr=!1,Sr=null,e}throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function Pr(e){return e._reactInternals}var Nr=0,Lr=1,Ir=2,Br=4,Dr=16,jr=32,Fr=64,Ur=128,qr=256,zr=512,Hr=1024,Kr=2048,Vr=4096,Wr=8192,$r=16384,Yr=Kr|Br|Fr|zr|Hr|$r,Gr=32767,Zr=32768,Qr=65536,Jr=131072,Xr=1048576,ei=2097152,ti=4194304,ni=8388608,ri=16777216,ii=33554432,oi=Br|Hr|0,si=Ir|Br|Dr|jr|zr|Vr|Wr,ai=Br|Fr|zr|Wr,li=Kr|Dr,ui=ti|ni|ei,ci=n.ReactCurrentOwner;function hi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{var r=t;do{((t=r).flags&(Ir|Vr))!==Nr&&(n=t.return),r=t.return}while(r)}return t.tag===h?n:null}function di(e){if(e.tag===E){var t=e.memoizedState;if(null===t){var n=e.alternate;null!==n&&(t=n.memoizedState)}if(null!==t)return t.dehydrated}return null}function fi(e){return e.tag===h?e.stateNode.containerInfo:null}function pi(e){if(hi(e)!==e)throw new Error("Unable to find node on an unmounted component.")}function mi(e){var t=e.alternate;if(!t){var n=hi(e);if(null===n)throw new Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var s=o.alternate;if(null===s){var a=o.return;if(null!==a){r=i=a;continue}break}if(o.child===s.child){for(var l=o.child;l;){if(l===r)return pi(o),e;if(l===i)return pi(o),t;l=l.sibling}throw new Error("Unable to find node on an unmounted component.")}if(r.return!==i.return)r=o,i=s;else{for(var u=!1,c=o.child;c;){if(c===r){u=!0,r=o,i=s;break}if(c===i){u=!0,i=o,r=s;break}c=c.sibling}if(!u){for(c=s.child;c;){if(c===r){u=!0,r=s,i=o;break}if(c===i){u=!0,i=s,r=o;break}c=c.sibling}if(!u)throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==i)throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==h)throw new Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function gi(e){var t=mi(e);return null!==t?vi(t):null}function vi(e){if(e.tag===f||e.tag===p)return e;for(var t=e.child;null!==t;){var n=vi(t);if(null!==n)return n;t=t.sibling}return null}function yi(e){var t=mi(e);return null!==t?bi(t):null}function bi(e){if(e.tag===f||e.tag===p)return e;for(var t=e.child;null!==t;){if(t.tag!==d){var n=bi(t);if(null!==n)return n}t=t.sibling}return null}var wi=t.unstable_scheduleCallback,Ai=t.unstable_cancelCallback,_i=t.unstable_shouldYield,Ei=t.unstable_requestPaint,Mi=t.unstable_now,ki=t.unstable_getCurrentPriorityLevel,Si=t.unstable_ImmediatePriority,xi=t.unstable_UserBlockingPriority,Ci=t.unstable_NormalPriority,Ti=t.unstable_LowPriority,Oi=t.unstable_IdlePriority,Ri=t.unstable_yieldValue,Pi=t.unstable_setDisableYieldValue,Ni=null,Li=null,Ii=null,Bi=!1,Di="undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;function ji(e){if("function"==typeof Ri&&(Pi(e),r=e),Li&&"function"==typeof Li.setStrictMode)try{Li.setStrictMode(Ni,e)}catch(e){Bi||(Bi=!0,o("React instrumentation encountered an error: %s",e))}}function Fi(e){Ii=e}function Ui(){for(var e=new Map,t=1,n=0;n<so;n++){var r=Vo(t);e.set(t,r),t*=2}return e}function qi(){null!==Ii&&"function"==typeof Ii.markCommitStopped&&Ii.markCommitStopped()}function zi(e){null!==Ii&&"function"==typeof Ii.markComponentRenderStarted&&Ii.markComponentRenderStarted(e)}function Hi(){null!==Ii&&"function"==typeof Ii.markComponentRenderStopped&&Ii.markComponentRenderStopped()}function Ki(e){null!==Ii&&"function"==typeof Ii.markComponentLayoutEffectMountStarted&&Ii.markComponentLayoutEffectMountStarted(e)}function Vi(e){null!==Ii&&"function"==typeof Ii.markComponentLayoutEffectUnmountStarted&&Ii.markComponentLayoutEffectUnmountStarted(e)}function Wi(){null!==Ii&&"function"==typeof Ii.markComponentLayoutEffectUnmountStopped&&Ii.markComponentLayoutEffectUnmountStopped()}function $i(e,t,n){null!==Ii&&"function"==typeof Ii.markComponentErrored&&Ii.markComponentErrored(e,t,n)}function Yi(e,t,n){null!==Ii&&"function"==typeof Ii.markComponentSuspended&&Ii.markComponentSuspended(e,t,n)}function Gi(e){null!==Ii&&"function"==typeof Ii.markRenderStarted&&Ii.markRenderStarted(e)}function Zi(){null!==Ii&&"function"==typeof Ii.markRenderStopped&&Ii.markRenderStopped()}function Qi(e,t){null!==Ii&&"function"==typeof Ii.markStateUpdateScheduled&&Ii.markStateUpdateScheduled(e,t)}var Ji=0,Xi=1,eo=2,to=8,no=16,ro=Math.clz32?Math.clz32:function(e){var t=e>>>0;return 0===t?32:31-(io(t)/oo|0)|0},io=Math.log,oo=Math.LN2,so=31,ao=0,lo=0,uo=1,co=2,ho=4,fo=8,po=16,mo=32,go=4194240,vo=64,yo=128,bo=256,wo=512,Ao=1024,_o=2048,Eo=4096,Mo=8192,ko=16384,So=32768,xo=65536,Co=131072,To=262144,Oo=524288,Ro=1048576,Po=2097152,No=130023424,Lo=4194304,Io=8388608,Bo=16777216,Do=33554432,jo=67108864,Fo=Lo,Uo=134217728,qo=268435455,zo=268435456,Ho=536870912,Ko=1073741824;function Vo(e){return e&uo?"Sync":e&co?"InputContinuousHydration":e&ho?"InputContinuous":e&fo?"DefaultHydration":e&po?"Default":e&mo?"TransitionHydration":e&go?"Transition":e&No?"Retry":e&Uo?"SelectiveHydration":e&zo?"IdleHydration":e&Ho?"Idle":e&Ko?"Offscreen":void 0}var Wo=-1,$o=vo,Yo=Lo;function Go(e){switch(is(e)){case uo:return uo;case co:return co;case ho:return ho;case fo:return fo;case po:return po;case mo:return mo;case vo:case yo:case bo:case wo:case Ao:case _o:case Eo:case Mo:case ko:case So:case xo:case Co:case To:case Oo:case Ro:case Po:return e&go;case Lo:case Io:case Bo:case Do:case jo:return e&No;case Uo:return Uo;case zo:return zo;case Ho:return Ho;case Ko:return Ko;default:return o("Should have found matching lanes. This is a bug in React."),e}}function Zo(e,t){var n=e.pendingLanes;if(n===ao)return ao;var r=ao,i=e.suspendedLanes,o=e.pingedLanes,s=n&qo;if(s!==ao){var a=s&~i;if(a!==ao)r=Go(a);else{var l=s&o;l!==ao&&(r=Go(l))}}else{var u=n&~i;u!==ao?r=Go(u):o!==ao&&(r=Go(o))}if(r===ao)return ao;if(t!==ao&&t!==r&&(t&i)===ao){var c=is(r),h=is(t);if(c>=h||c===po&&(h&go)!==ao)return t}(r&ho)!==ao&&(r|=n&po);var d=e.entangledLanes;if(d!==ao)for(var f=e.entanglements,p=r&d;p>0;){var m=ss(p),g=1<<m;r|=f[m],p&=~g}return r}function Qo(e,t){switch(e){case uo:case co:case ho:return t+250;case fo:case po:case mo:case vo:case yo:case bo:case wo:case Ao:case _o:case Eo:case Mo:case ko:case So:case xo:case Co:case To:case Oo:case Ro:case Po:return t+5e3;case Lo:case Io:case Bo:case Do:case jo:case Uo:case zo:case Ho:case Ko:return Wo;default:return o("Should have found matching lanes. This is a bug in React."),Wo}}function Jo(e){var t=e.pendingLanes&~Ko;return t!==ao?t:t&Ko?Ko:ao}function Xo(e){return(e&qo)!==ao}function es(e){return(e&No)===e}function ts(e,t){return(t&(co|ho|fo|po))!==ao}function ns(e){return(e&go)!==ao}function rs(){var e=$o;return(($o<<=1)&go)===ao&&($o=vo),e}function is(e){return e&-e}function os(e){return is(e)}function ss(e){return 31-ro(e)}function as(e){return ss(e)}function ls(e,t){return(e&t)!==ao}function us(e,t){return(e&t)===t}function cs(e,t){return e|t}function hs(e,t){return e&~t}function ds(e,t){return e&t}function fs(e){for(var t=[],n=0;n<so;n++)t.push(e);return t}function ps(e,t,n){e.pendingLanes|=t,t!==Ho&&(e.suspendedLanes=ao,e.pingedLanes=ao),e.eventTimes[as(t)]=n}function ms(e,t,n){e.pingedLanes|=e.suspendedLanes&t}function gs(e,t){for(var n=e.entangledLanes|=t,r=e.entanglements,i=n;i;){var o=ss(i),s=1<<o;s&t|r[o]&t&&(r[o]|=t),i&=~s}}function vs(e,t,n){if(Di)for(var r=e.pendingUpdatersLaneMap;n>0;){var i=as(n),o=1<<i;r[i].add(t),n&=~o}}function ys(e,t){if(Di)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;t>0;){var i=as(t),o=1<<i,s=n[i];s.size>0&&(s.forEach((function(e){var t=e.alternate;null!==t&&r.has(t)||r.add(e)})),s.clear()),t&=~o}}var bs,ws,As,_s,Es,Ms=uo,ks=ho,Ss=po,xs=Ho,Cs=lo;function Ts(){return Cs}function Os(e){Cs=e}function Rs(e,t){return 0!==e&&e<t}function Ps(e){var t=is(e);return Rs(Ms,t)?Rs(ks,t)?Xo(t)?Ss:xs:ks:Ms}function Ns(e){return e.current.memoizedState.isDehydrated}function Ls(e){bs(e)}var Is=!1,Bs=[],Ds=null,js=null,Fs=null,Us=new Map,qs=new Map,zs=[],Hs=["mousedown","mouseup","touchcancel","touchend","touchstart","auxclick","dblclick","pointercancel","pointerdown","pointerup","dragend","dragstart","drop","compositionend","compositionstart","keydown","keypress","keyup","input","textInput","copy","cut","paste","click","change","contextmenu","reset","submit"];function Ks(e,t){switch(e){case"focusin":case"focusout":Ds=null;break;case"dragenter":case"dragleave":js=null;break;case"mouseover":case"mouseout":Fs=null;break;case"pointerover":case"pointerout":var n=t.pointerId;Us.delete(n);break;case"gotpointercapture":case"lostpointercapture":var r=t.pointerId;qs.delete(r)}}function Vs(e,t,n,r,i,o){if(null===e||e.nativeEvent!==o){var s=function(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:i,targetContainers:[r]}}(t,n,r,i,o);if(null!==t){var a=Oc(t);null!==a&&ws(a)}return s}e.eventSystemFlags|=r;var l=e.targetContainers;return null!==i&&-1===l.indexOf(i)&&l.push(i),e}function Ws(e){var t=Tc(e.target);if(null!==t){var n=hi(t);if(null!==n){var r=n.tag;if(r===E){var i=di(n);if(null!==i)return e.blockedOn=i,void Es(e.priority,(function(){As(n)}))}else if(r===h&&Ns(n.stateNode))return void(e.blockedOn=fi(n))}}e.blockedOn=null}function $s(e){if(null!==e.blockedOn)return!1;for(var t,n=e.targetContainers;n.length>0;){n[0];var r=oa(e.domEventName,e.eventSystemFlags,0,e.nativeEvent);if(null!==r){var i=Oc(r);return null!==i&&ws(i),e.blockedOn=r,!1}var s=e.nativeEvent,a=new s.constructor(s.type,s);t=a,null!==sr&&o("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),sr=t,s.target.dispatchEvent(a),null===sr&&o("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),sr=null,n.shift()}return!0}function Ys(e,t,n){$s(e)&&n.delete(t)}function Gs(){Is=!1,null!==Ds&&$s(Ds)&&(Ds=null),null!==js&&$s(js)&&(js=null),null!==Fs&&$s(Fs)&&(Fs=null),Us.forEach(Ys),qs.forEach(Ys)}function Zs(e,n){e.blockedOn===n&&(e.blockedOn=null,Is||(Is=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Gs)))}function Qs(e){if(Bs.length>0){Zs(Bs[0],e);for(var t=1;t<Bs.length;t++){var n=Bs[t];n.blockedOn===e&&(n.blockedOn=null)}}null!==Ds&&Zs(Ds,e),null!==js&&Zs(js,e),null!==Fs&&Zs(Fs,e);var r=function(t){return Zs(t,e)};Us.forEach(r),qs.forEach(r);for(var i=0;i<zs.length;i++){var o=zs[i];o.blockedOn===e&&(o.blockedOn=null)}for(;zs.length>0;){var s=zs[0];if(null!==s.blockedOn)break;Ws(s),null===s.blockedOn&&zs.shift()}}var Js=n.ReactCurrentBatchConfig,Xs=!0;function ea(e){Xs=!!e}function ta(e,t,n,r){var i=Ts(),o=Js.transition;Js.transition=null;try{Os(Ms),ra(e,t,n,r)}finally{Os(i),Js.transition=o}}function na(e,t,n,r){var i=Ts(),o=Js.transition;Js.transition=null;try{Os(ks),ra(e,t,n,r)}finally{Os(i),Js.transition=o}}function ra(e,t,n,r){Xs&&function(e,t,n,r){var i=oa(0,0,0,r);if(null===i)return iu(e,t,r,ia,n),void Ks(e,r);if(function(e,t,n,r,i){switch(t){case"focusin":return Ds=Vs(Ds,e,t,n,r,i),!0;case"dragenter":return js=Vs(js,e,t,n,r,i),!0;case"mouseover":return Fs=Vs(Fs,e,t,n,r,i),!0;case"pointerover":var o=i,s=o.pointerId;return Us.set(s,Vs(Us.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":var a=i,l=a.pointerId;return qs.set(l,Vs(qs.get(l)||null,e,t,n,r,a)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ks(e,r),t&ir&&(a=e,Hs.indexOf(a)>-1)){for(;null!==i;){var o=Oc(i);null!==o&&Ls(o);var s=oa(0,0,0,r);if(null===s&&iu(e,t,r,ia,n),s===i)break;i=s}null!==i&&r.stopPropagation()}else{var a;iu(e,t,r,null,n)}}(e,t,n,r)}var ia=null;function oa(e,t,n,r){ia=null;var i=Tc(ar(r));if(null!==i){var o=hi(i);if(null===o)i=null;else{var s=o.tag;if(s===E){var a=di(o);if(null!==a)return a;i=null}else if(s===h){if(Ns(o.stateNode))return fi(o);i=null}else o!==i&&(i=null)}}return ia=i,null}function sa(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return Ms;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return ks;case"message":switch(ki()){case Si:return Ms;case xi:return ks;case Ci:case Ti:return Ss;case Oi:return xs;default:return Ss}default:return Ss}}var aa=null,la=null,ua=null;function ca(){if(ua)return ua;var e,t,n=la,r=n.length,i=ha(),o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);var a=t>1?1-t:void 0;return ua=i.slice(e,a)}function ha(){return"value"in aa?aa.value:aa.textContent}function da(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),t>=32||13===t?t:0}function fa(){return!0}function pa(){return!1}function ma(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)if(e.hasOwnProperty(s)){var a=e[s];this[s]=a?a(i):i[s]}var l=null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue;return this.isDefaultPrevented=l?fa:pa,this.isPropagationStopped=pa,this}return Qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=fa)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=fa)},persist:function(){},isPersistent:fa}),t}var ga,va,ya,ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wa=ma(ba),Aa=Qe({},ba,{view:0,detail:0}),_a=ma(Aa),Ea=Qe({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ia,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(function(e){e!==ya&&(ya&&"mousemove"===e.type?(ga=e.screenX-ya.screenX,va=e.screenY-ya.screenY):(ga=0,va=0),ya=e)}(e),ga)},movementY:function(e){return"movementY"in e?e.movementY:va}}),Ma=ma(Ea),ka=ma(Qe({},Ea,{dataTransfer:0})),Sa=ma(Qe({},Aa,{relatedTarget:0})),xa=ma(Qe({},ba,{animationName:0,elapsedTime:0,pseudoElement:0})),Ca=ma(Qe({},ba,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),Ta=ma(Qe({},ba,{data:0})),Oa=Ta,Ra={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pa={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Na={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function La(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=Na[e];return!!n&&!!t[n]}function Ia(e){return La}var Ba=ma(Qe({},Aa,{key:function(e){if(e.key){var t=Ra[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=da(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?Pa[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ia,charCode:function(e){return"keypress"===e.type?da(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?da(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Da=ma(Qe({},Ea,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ja=ma(Qe({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ia})),Fa=ma(Qe({},ba,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ua=ma(Qe({},Ea,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),qa=[9,13,27,32],za=229,Ha=Z&&"CompositionEvent"in window,Ka=null;Z&&"documentMode"in document&&(Ka=document.documentMode);var Va=Z&&"TextEvent"in window&&!Ka,Wa=Z&&(!Ha||Ka&&Ka>8&&Ka<=11),$a=32,Ya=String.fromCharCode($a),Ga=!1;function Za(e,t){switch(e){case"keyup":return-1!==qa.indexOf(t.keyCode);case"keydown":return t.keyCode!==za;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qa(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function Ja(e){return"ko"===e.locale}var Xa=!1;function el(e,t,n,r,i){var o;if(!(o=Va?function(e,t){switch(e){case"compositionend":return Qa(t);case"keypress":return t.which!==$a?null:(Ga=!0,Ya);case"textInput":var n=t.data;return n===Ya&&Ga?null:n;default:return null}}(t,r):function(e,t){if(Xa){if("compositionend"===e||!Ha&&Za(e,t)){var n=ca();return aa=null,la=null,ua=null,Xa=!1,n}return null}switch(e){case"paste":default:return null;case"keypress":if(!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)){if(t.char&&t.char.length>1)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wa&&!Ja(t)?null:t.data}}(t,r)))return null;var s=su(n,"onBeforeInput");if(s.length>0){var a=new Oa("onBeforeInput","beforeinput",null,r,i);e.push({event:a,listeners:s}),a.data=o}}var tl={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!tl[e.type]:"textarea"===t}function rl(e,t,n,r){dr(r);var i=su(t,"onChange");if(i.length>0){var o=new wa("onChange","change",null,n,r);e.push({event:o,listeners:i})}}var il=null,ol=null;function sl(e){Ql(e,0)}function al(e){if(Ot(Rc(e)))return e}function ll(e,t){if("change"===e)return t}var ul=!1;function cl(){il&&(il.detachEvent("onpropertychange",hl),il=null,ol=null)}function hl(e){"value"===e.propertyName&&al(ol)&&function(e){var t=[];rl(t,ol,e,ar(e)),vr(sl,t)}(e)}function dl(e,t,n){"focusin"===e?(cl(),function(e,t){ol=t,(il=e).attachEvent("onpropertychange",hl)}(t,n)):"focusout"===e&&cl()}function fl(e,t){if("selectionchange"===e||"keyup"===e||"keydown"===e)return al(ol)}function pl(e,t){if("click"===e)return al(t)}function ml(e,t){if("input"===e||"change"===e)return al(t)}Z&&(ul=function(e){if(!Z)return!1;var t="oninput",n=t in document;if(!n){var r=document.createElement("div");r.setAttribute(t,"return;"),n="function"==typeof r[t]}return n}()&&(!document.documentMode||document.documentMode>9));var gl="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function vl(e,t){if(gl(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var o=n[i];if(!Q.call(t,o)||!gl(e[o],t[o]))return!1}return!0}function yl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bl(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function wl(e,t){for(var n=yl(e),r=0,i=0;n;){if(n.nodeType===gn){if(i=r+n.textContent.length,r<=t&&i>=t)return{node:n,offset:t-r};r=i}n=yl(bl(n))}}function Al(e){return e&&e.nodeType===gn}function _l(e,t){return!(!e||!t)&&(e===t||!Al(e)&&(Al(t)?_l(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function El(e){return e&&e.ownerDocument&&_l(e.ownerDocument.documentElement,e)}function Ml(e){try{return"string"==typeof e.contentWindow.location.href}catch(e){return!1}}function kl(){for(var e=window,t=Rt();t instanceof e.HTMLIFrameElement;){if(!Ml(t))return t;t=Rt((e=t.contentWindow).document)}return t}function Sl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function xl(e){return("selectionStart"in e?{start:e.selectionStart,end:e.selectionEnd}:function(e){var t=e.ownerDocument,n=t&&t.defaultView||window,r=n.getSelection&&n.getSelection();if(!r||0===r.rangeCount)return null;var i=r.anchorNode,o=r.anchorOffset,s=r.focusNode,a=r.focusOffset;try{i.nodeType,s.nodeType}catch(e){return null}return function(e,t,n,r,i){var o=0,s=-1,a=-1,l=0,u=0,c=e,h=null;e:for(;;){for(var d=null;c!==t||0!==n&&c.nodeType!==gn||(s=o+n),c!==r||0!==i&&c.nodeType!==gn||(a=o+i),c.nodeType===gn&&(o+=c.nodeValue.length),null!==(d=c.firstChild);)h=c,c=d;for(;;){if(c===e)break e;if(h===t&&++l===n&&(s=o),h===r&&++u===i&&(a=o),null!==(d=c.nextSibling))break;h=(c=h).parentNode}c=d}return-1===s||-1===a?null:{start:s,end:a}}(e,i,o,s,a)}(e))||{start:0,end:0}}var Cl=Z&&"documentMode"in document&&document.documentMode<=11,Tl=null,Ol=null,Rl=null,Pl=!1;function Nl(e,t,n){var r,i=(r=n).window===r?r.document:r.nodeType===yn?r:r.ownerDocument;if(!Pl&&null!=Tl&&Tl===Rt(i)){var o=function(e){if("selectionStart"in e&&Sl(e))return{start:e.selectionStart,end:e.selectionEnd};var t=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}(Tl);if(!Rl||!vl(Rl,o)){Rl=o;var s=su(Ol,"onSelect");if(s.length>0){var a=new wa("onSelect","select",null,t,n);e.push({event:a,listeners:s}),a.target=Tl}}}}function Ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Il={animationend:Ll("Animation","AnimationEnd"),animationiteration:Ll("Animation","AnimationIteration"),animationstart:Ll("Animation","AnimationStart"),transitionend:Ll("Transition","TransitionEnd")},Bl={},Dl={};function jl(e){if(Bl[e])return Bl[e];if(!Il[e])return e;var t=Il[e];for(var n in t)if(t.hasOwnProperty(n)&&n in Dl)return Bl[e]=t[n];return e}Z&&(Dl=document.createElement("div").style,"AnimationEvent"in window||(delete Il.animationend.animation,delete Il.animationiteration.animation,delete Il.animationstart.animation),"TransitionEvent"in window||delete Il.transitionend.transition);var Fl=jl("animationend"),Ul=jl("animationiteration"),ql=jl("animationstart"),zl=jl("transitionend"),Hl=new Map,Kl=["abort","auxClick","cancel","canPlay","canPlayThrough","click","close","contextMenu","copy","cut","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","gotPointerCapture","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","lostPointerCapture","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","pointerCancel","pointerDown","pointerMove","pointerOut","pointerOver","pointerUp","progress","rateChange","reset","resize","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchStart","volumeChange","scroll","toggle","touchMove","waiting","wheel"];function Vl(e,t){Hl.set(e,t),Y(t,[e])}function Wl(e,t,n,r,i,o,s){(function(e,t,n,r,i,o,s){var a=Hl.get(t);if(void 0!==a){var l=wa,u=t;switch(t){case"keypress":if(0===da(r))return;case"keydown":case"keyup":l=Ba;break;case"focusin":u="focus",l=Sa;break;case"focusout":u="blur",l=Sa;break;case"beforeblur":case"afterblur":l=Sa;break;case"click":if(2===r.button)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=Ma;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=ka;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=ja;break;case Fl:case Ul:case ql:l=xa;break;case zl:l=Fa;break;case"scroll":l=_a;break;case"wheel":l=Ua;break;case"copy":case"cut":case"paste":l=Ca;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Da}var c=0!=(o&ir),h=!c&&"scroll"===t,d=function(e,t,n,r,i,o){for(var s=r?null!==t?t+"Capture":null:t,a=[],l=e,u=null;null!==l;){var c=l,h=c.stateNode;if(c.tag===f&&null!==h&&(u=h,null!==s)){var d=yr(l,s);null!=d&&a.push(ou(l,d,u))}if(i)break;l=l.return}return a}(n,a,r.type,c,h);if(d.length>0){var p=new l(a,u,null,r,i);e.push({event:p,listeners:d})}}})(e,t,n,r,i,o),0==(o&or)&&(function(e,t,n,r,i,o,s){var a="mouseover"===t||"pointerover"===t,l="mouseout"===t||"pointerout"===t;if(a&&r!==sr){var u=r.relatedTarget||r.fromElement;if(u&&(Tc(u)||Cc(u)))return}if(l||a){var c,h,d;if(i.window===i)c=i;else{var m=i.ownerDocument;c=m?m.defaultView||m.parentWindow:window}if(l){var g=r.relatedTarget||r.toElement;h=n,null!==(d=g?Tc(g):null)&&(d!==hi(d)||d.tag!==f&&d.tag!==p)&&(d=null)}else h=null,d=n;if(h!==d){var v=Ma,y="onMouseLeave",b="onMouseEnter",w="mouse";"pointerout"!==t&&"pointerover"!==t||(v=Da,y="onPointerLeave",b="onPointerEnter",w="pointer");var A=null==h?c:Rc(h),_=null==d?c:Rc(d),E=new v(y,w+"leave",h,r,i);E.target=A,E.relatedTarget=_;var M=null;if(Tc(i)===n){var k=new v(b,w+"enter",d,r,i);k.target=_,k.relatedTarget=A,M=k}!function(e,t,n,r,i){var o=r&&i?function(e,t){for(var n=e,r=t,i=0,o=n;o;o=au(o))i++;for(var s=0,a=r;a;a=au(a))s++;for(;i-s>0;)n=au(n),i--;for(;s-i>0;)r=au(r),s--;for(var l=i;l--;){if(n===r||null!==r&&n===r.alternate)return n;n=au(n),r=au(r)}return null}(r,i):null;null!==r&&lu(e,t,r,o,!1),null!==i&&null!==n&&lu(e,n,i,o,!0)}(e,E,M,h,d)}}}(e,t,n,r,i),function(e,t,n,r,i,o,s){var a,l,u,c,h=n?Rc(n):window;if("select"===(c=(u=h).nodeName&&u.nodeName.toLowerCase())||"input"===c&&"file"===u.type?a=ll:nl(h)?ul?a=ml:(a=fl,l=dl):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(h)&&(a=pl),a){var d=a(t,n);if(d)return void rl(e,d,r,i)}l&&l(t,h,n),"focusout"===t&&function(e){var t=e._wrapperState;t&&t.controlled&&"number"===e.type&&zt(e,"number",e.value)}(h)}(e,t,n,r,i),function(e,t,n,r,i,o,s){var a=n?Rc(n):window;switch(t){case"focusin":(nl(a)||"true"===a.contentEditable)&&(Tl=a,Ol=n,Rl=null);break;case"focusout":Tl=null,Ol=null,Rl=null;break;case"mousedown":Pl=!0;break;case"contextmenu":case"mouseup":case"dragend":Pl=!1,Nl(e,r,i);break;case"selectionchange":if(Cl)break;case"keydown":case"keyup":Nl(e,r,i)}}(e,t,n,r,i),function(e,t,n,r,i,o,s){(function(e,t,n,r,i){var o,s;if(Ha?o=function(e){switch(e){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}(t):Xa?Za(t,r)&&(o="onCompositionEnd"):function(e,t){return"keydown"===e&&t.keyCode===za}(t,r)&&(o="onCompositionStart"),!o)return null;Wa&&!Ja(r)&&(Xa||"onCompositionStart"!==o?"onCompositionEnd"===o&&Xa&&(s=ca()):Xa=function(e){return aa=e,la=ha(),!0}(i));var a=su(n,o);if(a.length>0){var l=new Ta(o,t,null,r,i);if(e.push({event:l,listeners:a}),s)l.data=s;else{var u=Qa(r);null!==u&&(l.data=u)}}})(e,t,n,r,i),el(e,t,n,r,i)}(e,t,n,r,i))}!function(){for(var e=0;e<Kl.length;e++){var t=Kl[e];Vl(t.toLowerCase(),"on"+(t[0].toUpperCase()+t.slice(1)))}Vl(Fl,"onAnimationEnd"),Vl(Ul,"onAnimationIteration"),Vl(ql,"onAnimationStart"),Vl("dblclick","onDoubleClick"),Vl("focusin","onFocus"),Vl("focusout","onBlur"),Vl(zl,"onTransitionEnd")}(),G("onMouseEnter",["mouseout","mouseover"]),G("onMouseLeave",["mouseout","mouseover"]),G("onPointerEnter",["pointerout","pointerover"]),G("onPointerLeave",["pointerout","pointerover"]),Y("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"]),Y("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"]),Y("onBeforeInput",["compositionend","keypress","textInput","paste"]),Y("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),Y("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),Y("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"]);var $l=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],Yl=new Set(["cancel","close","invalid","load","scroll","toggle"].concat($l));function Gl(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,a,l){if(Or.apply(this,arguments),kr){var u=Rr();xr||(xr=!0,Cr=u)}}(r,t,void 0,e),e.currentTarget=null}function Zl(e,t,n){var r;if(n)for(var i=t.length-1;i>=0;i--){var o=t[i],s=o.instance,a=o.currentTarget,l=o.listener;if(s!==r&&e.isPropagationStopped())return;Gl(e,l,a),r=s}else for(var u=0;u<t.length;u++){var c=t[u],h=c.instance,d=c.currentTarget,f=c.listener;if(h!==r&&e.isPropagationStopped())return;Gl(e,f,d),r=h}}function Ql(e,t){for(var n=0!=(t&ir),r=0;r<e.length;r++){var i=e[r];Zl(i.event,i.listeners,n)}!function(){if(xr){var e=Cr;throw xr=!1,Cr=null,e}}()}function Jl(e,t){Yl.has(e)||o('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=function(e){var t=e[_c];return void 0===t&&(t=e[_c]=new Set),t}(t),r=function(e,t){return e+"__bubble"}(e);n.has(r)||(nu(t,e,rr,!1),n.add(r))}function Xl(e,t,n){Yl.has(e)&&!t&&o('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var r=0;t&&(r|=ir),nu(n,e,r,t)}var eu="_reactListening"+Math.random().toString(36).slice(2);function tu(e){if(!e[eu]){e[eu]=!0,V.forEach((function(t){"selectionchange"!==t&&(Yl.has(t)||Xl(t,!1,e),Xl(t,!0,e))}));var t=e.nodeType===yn?e:e.ownerDocument;null!==t&&(t[eu]||(t[eu]=!0,Xl("selectionchange",!1,t)))}}function nu(e,t,n,r,i){var o=function(e,t,n){var r;switch(sa(t)){case Ms:r=ta;break;case ks:r=na;break;default:r=ra}return r.bind(null,t,n,e)}(e,t,n),s=void 0;br&&("touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(s=!0)),r?void 0!==s?function(e,t,n,r){e.addEventListener(t,n,{capture:!0,passive:r})}(e,t,o,s):function(e,t,n){e.addEventListener(t,n,!0)}(e,t,o):void 0!==s?function(e,t,n,r){e.addEventListener(t,n,{passive:r})}(e,t,o,s):function(e,t,n){e.addEventListener(t,n,!1)}(e,t,o)}function ru(e,t){return e===t||e.nodeType===vn&&e.parentNode===t}function iu(e,t,n,r,i){var o=r;if(0==(t&nr)&&0==(t&rr)){var s=i;if(null!==r){var a=r;e:for(;;){if(null===a)return;var l=a.tag;if(l===h||l===d){var u=a.stateNode.containerInfo;if(ru(u,s))break;if(l===d)for(var c=a.return;null!==c;){var m=c.tag;if((m===h||m===d)&&ru(c.stateNode.containerInfo,s))return;c=c.return}for(;null!==u;){var g=Tc(u);if(null===g)return;var v=g.tag;if(v===f||v===p){a=o=g;continue e}u=u.parentNode}}a=a.return}}}vr((function(){return function(e,t,n,r,i){var o=[];Wl(o,e,r,n,ar(n),t),Ql(o,t)}(e,t,n,o)}))}function ou(e,t,n){return{instance:e,listener:t,currentTarget:n}}function su(e,t){for(var n=t+"Capture",r=[],i=e;null!==i;){var o=i,s=o.stateNode;if(o.tag===f&&null!==s){var a=s,l=yr(i,n);null!=l&&r.unshift(ou(i,l,a));var u=yr(i,t);null!=u&&r.push(ou(i,u,a))}i=i.return}return r}function au(e){if(null===e)return null;do{e=e.return}while(e&&e.tag!==f);return e||null}function lu(e,t,n,r,i){for(var o=t._reactName,s=[],a=n;null!==a&&a!==r;){var l=a,u=l.alternate,c=l.stateNode,h=l.tag;if(null!==u&&u===r)break;if(h===f&&null!==c){var d=c;if(i){var p=yr(a,o);null!=p&&s.unshift(ou(a,p,d))}else if(!i){var m=yr(a,o);null!=m&&s.push(ou(a,m,d))}}a=a.return}0!==s.length&&e.push({event:t,listeners:s})}var uu,cu,hu,du,fu,pu,mu,gu=!1,vu="dangerouslySetInnerHTML",yu="suppressContentEditableWarning",bu="suppressHydrationWarning",wu="autoFocus",Au="children",_u="style",Eu="__html";uu={dialog:!0,webview:!0},cu=function(e,t){(function(e,t){zn(e,t)||function(e,t){var n=[];for(var r in t)Yn(0,r)||n.push(r);var i=n.map((function(e){return"`"+e+"`"})).join(", ");1===n.length?o("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",i,e):n.length>1&&o("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",i,e)}(e,t)})(e,t),function(e,t){"input"!==e&&"textarea"!==e&&"select"!==e||null==t||null!==t.value||Zn||(Zn=!0,"select"===e&&t.multiple?o("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):o("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e))}(e,t),function(e,t,n){zn(e,t)||function(e,t,n){var r=[];for(var i in t)Gn(0,i,t[i],n)||r.push(i);var s=r.map((function(e){return"`"+e+"`"})).join(", ");1===r.length?o("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",s,e):r.length>1&&o("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",s,e)}(e,t,n)}(e,t,{registrationNameDependencies:W,possibleRegistrationNames:$})},pu=Z&&!document.documentMode,hu=function(e,t,n){if(!gu){var r=Su(n),i=Su(t);i!==r&&(gu=!0,o("Prop `%s` did not match. Server: %s Client: %s",e,JSON.stringify(i),JSON.stringify(r)))}},du=function(e){if(!gu){gu=!0;var t=[];e.forEach((function(e){t.push(e)})),o("Extra attributes from the server: %s",t)}},fu=function(e,t){!1===t?o("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):o("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)},mu=function(e,t){var n=e.namespaceURI===an?e.ownerDocument.createElement(e.tagName):e.ownerDocument.createElementNS(e.namespaceURI,e.tagName);return n.innerHTML=t,n.innerHTML};var Mu=/\r\n?/g,ku=/\u0000|\uFFFD/g;function Su(e){return X(t=e)&&(o("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",J(t)),ee(t)),("string"==typeof e?e:""+e).replace(Mu,"\n").replace(ku,"");var t}function xu(e,t,n,r){var i=Su(t),s=Su(e);if(s!==i&&(r&&(gu||(gu=!0,o('Text content did not match. Server: "%s" Client: "%s"',s,i))),n&&I))throw new Error("Text content does not match server-rendered HTML.")}function Cu(e){return e.nodeType===yn?e:e.ownerDocument}function Tu(){}function Ou(e){e.onclick=Tu}function Ru(e,t,n,r){var i,o=zn(t,n);switch(cu(t,n),t){case"dialog":Jl("cancel",e),Jl("close",e),i=n;break;case"iframe":case"object":case"embed":Jl("load",e),i=n;break;case"video":case"audio":for(var s=0;s<$l.length;s++)Jl($l[s],e);i=n;break;case"source":Jl("error",e),i=n;break;case"img":case"image":case"link":Jl("error",e),Jl("load",e),i=n;break;case"details":Jl("toggle",e),i=n;break;case"input":jt(e,n),i=Dt(e,n),Jl("invalid",e);break;case"option":Wt(0,n),i=n;break;case"select":en(e,n),i=Xt(0,n),Jl("invalid",e);break;case"textarea":rn(e,n),i=nn(e,n),Jl("invalid",e);break;default:i=n}switch(qn(t,i),function(e,t,n,r,i){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];if(o===_u)s&&Object.freeze(s),Dn(t,s);else if(o===vu){var a=s?s[Eu]:void 0;null!=a&&pn(t,a)}else o===Au?"string"==typeof s?("textarea"!==e||""!==s)&&wn(t,s):"number"==typeof s&&wn(t,""+s):o===yu||o===bu||o===wu||(W.hasOwnProperty(o)?null!=s&&("function"!=typeof s&&fu(o,s),"onScroll"===o&&Jl("scroll",t)):null!=s&&xe(t,o,s,i))}}(t,e,0,i,o),t){case"input":Tt(e),qt(e,n,!1);break;case"textarea":Tt(e),sn(e);break;case"option":!function(e,t){null!=t.value&&e.setAttribute("value",Et(Mt(t.value)))}(e,n);break;case"select":!function(e,t){var n=e;n.multiple=!!t.multiple;var r=t.value;null!=r?Jt(n,!!t.multiple,r,!1):null!=t.defaultValue&&Jt(n,!!t.multiple,t.defaultValue,!0)}(e,n);break;default:"function"==typeof i.onClick&&Ou(e)}}function Pu(e,t,n,r,i){cu(t,r);var s,a,l,u,c=null;switch(t){case"input":s=Dt(e,n),a=Dt(e,r),c=[];break;case"select":s=Xt(0,n),a=Xt(0,r),c=[];break;case"textarea":s=nn(e,n),a=nn(e,r),c=[];break;default:a=r,"function"!=typeof(s=n).onClick&&"function"==typeof a.onClick&&Ou(e)}qn(t,a);var h=null;for(l in s)if(!a.hasOwnProperty(l)&&s.hasOwnProperty(l)&&null!=s[l])if(l===_u){var d=s[l];for(u in d)d.hasOwnProperty(u)&&(h||(h={}),h[u]="")}else l===vu||l===Au||l===yu||l===bu||l===wu||(W.hasOwnProperty(l)?c||(c=[]):(c=c||[]).push(l,null));for(l in a){var f=a[l],p=null!=s?s[l]:void 0;if(a.hasOwnProperty(l)&&f!==p&&(null!=f||null!=p))if(l===_u)if(f&&Object.freeze(f),p){for(u in p)!p.hasOwnProperty(u)||f&&f.hasOwnProperty(u)||(h||(h={}),h[u]="");for(u in f)f.hasOwnProperty(u)&&p[u]!==f[u]&&(h||(h={}),h[u]=f[u])}else h||(c||(c=[]),c.push(l,h)),h=f;else if(l===vu){var m=f?f[Eu]:void 0,g=p?p[Eu]:void 0;null!=m&&g!==m&&(c=c||[]).push(l,m)}else l===Au?"string"!=typeof f&&"number"!=typeof f||(c=c||[]).push(l,""+f):l===yu||l===bu||(W.hasOwnProperty(l)?(null!=f&&("function"!=typeof f&&fu(l,f),"onScroll"===l&&Jl("scroll",e)),c||p===f||(c=[])):(c=c||[]).push(l,f))}return h&&(function(e,t){if(t){var n,r=jn(e),i=jn(t),s={};for(var a in r){var l=r[a],u=i[a];if(u&&l!==u){var c=l+","+u;if(s[c])continue;s[c]=!0,o("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",null==(n=e[l])||"boolean"==typeof n||""===n?"Removing":"Updating",l,u)}}}}(h,a[_u]),(c=c||[]).push(_u,h)),c}function Nu(e,t){gu||(gu=!0,o("Did not expect server HTML to contain a <%s> in <%s>.",t.nodeName.toLowerCase(),e.nodeName.toLowerCase()))}function Lu(e,t){gu||(gu=!0,o('Did not expect server HTML to contain the text node "%s" in <%s>.',t.nodeValue,e.nodeName.toLowerCase()))}function Iu(e,t,n){gu||(gu=!0,o("Expected server HTML to contain a matching <%s> in <%s>.",t,e.nodeName.toLowerCase()))}function Bu(e,t){""!==t&&(gu||(gu=!0,o('Expected server HTML to contain a matching text node for "%s" in <%s>.',t,e.nodeName.toLowerCase())))}var Du=function(){},ju=function(){},Fu=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],Uu=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],qu=Uu.concat(["button"]),zu=["dd","dt","li","option","optgroup","p","rp","rt"],Hu={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};ju=function(e,t){var n=Qe({},e||Hu),r={tag:t};return-1!==Uu.indexOf(t)&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),-1!==qu.indexOf(t)&&(n.pTagInButtonScope=null),-1!==Fu.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=r,"form"===t&&(n.formTag=r),"a"===t&&(n.aTagInScope=r),"button"===t&&(n.buttonTagInScope=r),"nobr"===t&&(n.nobrTagInScope=r),"p"===t&&(n.pTagInButtonScope=r),"li"===t&&(n.listItemTagAutoclosing=r),"dd"!==t&&"dt"!==t||(n.dlItemTagAutoclosing=r),n};var Ku={};Du=function(e,t,n){var r=(n=n||Hu).current,i=r&&r.tag;null!=t&&(null!=e&&o("validateDOMNesting: when childText is passed, childTag should be null"),e="#text");var s=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e||"frameset"===e;case"frameset":return"frame"===e;case"#document":return"html"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===zu.indexOf(t);case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0}(e,i)?null:r,a=s?null:function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}(e,n),l=s||a;if(l){var u=l.tag,c=!!s+"|"+e+"|"+u;if(!Ku[c]){Ku[c]=!0;var h=e,d="";if("#text"===e?/\S/.test(t)?h="Text nodes":(h="Whitespace text nodes",d=" Make sure you don't have any extra whitespace between tags on each line of your source code."):h="<"+e+">",s){var f="";"table"===u&&"tr"===e&&(f+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),o("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",h,u,d,f)}else o("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",h,u)}}};var Vu="suppressHydrationWarning",Wu="$",$u="/$",Yu="$?",Gu="$!",Zu="style",Qu=null,Ju=null;function Xu(e,t,n,r,i){var s=r;if(Du(e,null,s.ancestorInfo),"string"==typeof t.children||"number"==typeof t.children){var a=""+t.children,l=ju(s.ancestorInfo,e);Du(null,a,l)}var u=function(e,t,n,r){var i,s,a=Cu(n),l=r;if(l===an&&(l=cn(e)),l===an){if((i=zn(e,t))||e===e.toLowerCase()||o("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",e),"script"===e){var u=a.createElement("div");u.innerHTML="<script><\/script>";var c=u.firstChild;s=u.removeChild(c)}else if("string"==typeof t.is)s=a.createElement(e,{is:t.is});else if(s=a.createElement(e),"select"===e){var h=s;t.multiple?h.multiple=!0:t.size&&(h.size=t.size)}}else s=a.createElementNS(l,e);return l===an&&(i||"[object HTMLUnknownElement]"!==Object.prototype.toString.call(s)||Q.call(uu,e)||(uu[e]=!0,o("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",e))),s}(e,t,n,s.namespace);return kc(i,u),Nc(u,t),u}function ec(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var tc="function"==typeof setTimeout?setTimeout:void 0,nc="function"==typeof clearTimeout?clearTimeout:void 0,rc=-1,ic="function"==typeof Promise?Promise:void 0,oc="function"==typeof queueMicrotask?queueMicrotask:void 0!==ic?function(e){return ic.resolve(null).then(e).catch(sc)}:tc;function sc(e){setTimeout((function(){throw e}))}function ac(e){wn(e,"")}function lc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===vn){var o=i.data;if(o===$u){if(0===r)return e.removeChild(i),void Qs(t);r--}else o!==Wu&&o!==Yu&&o!==Gu||r++}n=i}while(n);Qs(t)}function uc(e){var t=e.style;"function"==typeof t.setProperty?t.setProperty("display","none","important"):t.display="none"}function cc(e,t){var n=t[Zu],r=null!=n&&n.hasOwnProperty("display")?n.display:null;e.style.display=Mn("display",r)}function hc(e,t){e.nodeValue=t}function dc(e){return e.data===Yu}function fc(e){return e.data===Gu}function pc(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(t===mn||t===gn)break;if(t===vn){var n=e.data;if(n===Wu||n===Gu||n===Yu)break;if(n===$u)return null}}return e}function mc(e){return pc(e.nextSibling)}function gc(e,t,n,r,i,o,s){return kc(o,e),Nc(e,n),function(e,t,n,r,i,o,s){var a,l;switch(a=zn(t,n),cu(t,n),t){case"dialog":Jl("cancel",e),Jl("close",e);break;case"iframe":case"object":case"embed":Jl("load",e);break;case"video":case"audio":for(var u=0;u<$l.length;u++)Jl($l[u],e);break;case"source":Jl("error",e);break;case"img":case"image":case"link":Jl("error",e),Jl("load",e);break;case"details":Jl("toggle",e);break;case"input":jt(e,n),Jl("invalid",e);break;case"option":Wt(0,n);break;case"select":en(e,n),Jl("invalid",e);break;case"textarea":rn(e,n),Jl("invalid",e)}qn(t,n),l=new Set;for(var c=e.attributes,h=0;h<c.length;h++)switch(c[h].name.toLowerCase()){case"value":case"checked":case"selected":break;default:l.add(c[h].name)}var d,f=null;for(var p in n)if(n.hasOwnProperty(p)){var m=n[p];if(p===Au)"string"==typeof m?e.textContent!==m&&(!0!==n[bu]&&xu(e.textContent,m,o,s),f=[Au,m]):"number"==typeof m&&e.textContent!==""+m&&(!0!==n[bu]&&xu(e.textContent,m,o,s),f=[Au,""+m]);else if(W.hasOwnProperty(p))null!=m&&("function"!=typeof m&&fu(p,m),"onScroll"===p&&Jl("scroll",e));else if(s&&"boolean"==typeof a){var g=void 0,v=a&&U?null:ve(p);if(!0===n[bu]);else if(p===yu||p===bu||"value"===p||"checked"===p||"selected"===p);else if(p===vu){var y=e.innerHTML,b=m?m[Eu]:void 0;if(null!=b){var w=mu(e,b);w!==y&&hu(p,y,w)}}else if(p===_u){if(l.delete(p),pu){var A=Bn(m);A!==(g=e.getAttribute("style"))&&hu(p,g,A)}}else if(a&&!U)l.delete(p.toLowerCase()),m!==(g=Se(e,p,m))&&hu(p,g,m);else if(!pe(p,v,a)&&!ge(p,m,v,a)){var _=!1;if(null!==v)l.delete(v.attributeName),g=ke(e,p,m,v);else{var E=r;if(E===an&&(E=cn(t)),E===an)l.delete(p.toLowerCase());else{var M=(void 0,d=p.toLowerCase(),Hn.hasOwnProperty(d)&&Hn[d]||null);null!==M&&M!==p&&(_=!0,l.delete(M)),l.delete(p)}g=Se(e,p,m)}m===g||_||hu(p,g,m)}}}switch(s&&l.size>0&&!0!==n[bu]&&du(l),t){case"input":Tt(e),qt(e,n,!0);break;case"textarea":Tt(e),sn(e);break;case"select":case"option":break;default:"function"==typeof n.onClick&&Ou(e)}return f}(e,t,n,i.namespace,0,(o.mode&Xi)!==Ji,s)}function vc(e){for(var t=e.previousSibling,n=0;t;){if(t.nodeType===vn){var r=t.data;if(r===Wu||r===Gu||r===Yu){if(0===n)return t;n--}else r===$u&&n++}t=t.previousSibling}return null}var yc=Math.random().toString(36).slice(2),bc="__reactFiber$"+yc,wc="__reactProps$"+yc,Ac="__reactContainer$"+yc,_c="__reactEvents$"+yc,Ec="__reactListeners$"+yc,Mc="__reactHandles$"+yc;function kc(e,t){t[bc]=e}function Sc(e,t){t[Ac]=e}function xc(e){e[Ac]=null}function Cc(e){return!!e[Ac]}function Tc(e){var t=e[bc];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ac]||n[bc]){var r=t.alternate;if(null!==t.child||null!==r&&null!==r.child)for(var i=vc(e);null!==i;){var o=i[bc];if(o)return o;i=vc(i)}return t}n=(e=n).parentNode}return null}function Oc(e){var t=e[bc]||e[Ac];return!t||t.tag!==f&&t.tag!==p&&t.tag!==E&&t.tag!==h?null:t}function Rc(e){if(e.tag===f||e.tag===p)return e.stateNode;throw new Error("getNodeFromInstance: Invalid argument.")}function Pc(e){return e[wc]||null}function Nc(e,t){e[wc]=t}var Lc={},Ic=n.ReactDebugCurrentFrame;function Bc(e){if(e){var t=e._owner,n=lt(e.type,e._source,t?t.type:null);Ic.setExtraStackFrame(n)}else Ic.setExtraStackFrame(null)}function Dc(e,t,n,r,i){var s=Function.call.bind(Q);for(var a in e)if(s(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}l=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(Bc(i),o("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof l),Bc(null)),l instanceof Error&&!(l.message in Lc)&&(Lc[l.message]=!0,Bc(i),o("Failed %s type: %s",n,l.message),Bc(null))}}var jc,Fc=[];jc=[];var Uc,qc=-1;function zc(e){return{current:e}}function Hc(e,t){qc<0?o("Unexpected pop."):(t!==jc[qc]&&o("Unexpected Fiber popped."),e.current=Fc[qc],Fc[qc]=null,jc[qc]=null,qc--)}function Kc(e,t,n){qc++,Fc[qc]=e.current,jc[qc]=n,e.current=t}Uc={};var Vc={};Object.freeze(Vc);var Wc=zc(Vc),$c=zc(!1),Yc=Vc;function Gc(e,t,n){return n&&Xc(t)?Yc:Wc.current}function Zc(e,t,n){var r=e.stateNode;r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=n}function Qc(e,t){var n=e.type.contextTypes;if(!n)return Vc;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={};for(var o in n)i[o]=t[o];return Dc(n,i,"context",pt(e)||"Unknown"),r&&Zc(e,t,i),i}function Jc(){return $c.current}function Xc(e){return null!=e.childContextTypes}function eh(e){Hc($c,e),Hc(Wc,e)}function th(e){Hc($c,e),Hc(Wc,e)}function nh(e,t,n){if(Wc.current!==Vc)throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Kc(Wc,t,e),Kc($c,n,e)}function rh(e,t,n){var r=e.stateNode,i=t.childContextTypes;if("function"!=typeof r.getChildContext){var s=pt(e)||"Unknown";return Uc[s]||(Uc[s]=!0,o("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",s,s)),n}var a=r.getChildContext();for(var l in a)if(!(l in i))throw new Error((pt(e)||"Unknown")+'.getChildContext(): key "'+l+'" is not defined in childContextTypes.');return Dc(i,a,"child context",pt(e)||"Unknown"),Qe({},n,a)}function ih(e){var t=e.stateNode,n=t&&t.__reactInternalMemoizedMergedChildContext||Vc;return Yc=Wc.current,Kc(Wc,n,e),Kc($c,$c.current,e),!0}function oh(e,t,n){var r=e.stateNode;if(!r)throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(n){var i=rh(e,t,Yc);r.__reactInternalMemoizedMergedChildContext=i,Hc($c,e),Hc(Wc,e),Kc(Wc,i,e),Kc($c,n,e)}else Hc($c,e),Kc($c,n,e)}var sh=0,ah=1,lh=null,uh=!1,ch=!1;function hh(e){null===lh?lh=[e]:lh.push(e)}function dh(){uh&&fh()}function fh(){if(!ch&&null!==lh){ch=!0;var e=0,t=Ts();try{var n=lh;for(Os(Ms);e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}lh=null,uh=!1}catch(t){throw null!==lh&&(lh=lh.slice(e+1)),wi(Si,fh),t}finally{Os(t),ch=!1}}return null}var ph=[],mh=0,gh=null,vh=0,yh=[],bh=0,wh=null,Ah=1,_h="";function Eh(e,t){Ch(),ph[mh++]=vh,ph[mh++]=gh,gh=e,vh=t}function Mh(e,t,n){Ch(),yh[bh++]=Ah,yh[bh++]=_h,yh[bh++]=wh,wh=e;var r=Ah,i=_h,o=Sh(r)-1,s=r&~(1<<o),a=n+1,l=Sh(t)+o;if(l>30){var u=o-o%5,c=(s&(1<<u)-1).toString(32),h=s>>u,d=o-u,f=Sh(t)+d;Ah=1<<f|a<<d|h,_h=c+i}else Ah=1<<l|a<<o|s,_h=i}function kh(e){Ch(),null!==e.return&&(Eh(e,1),Mh(e,1,0))}function Sh(e){return 32-ro(e)}function xh(e){for(;e===gh;)gh=ph[--mh],ph[mh]=null,vh=ph[--mh],ph[mh]=null;for(;e===wh;)wh=yh[--bh],yh[bh]=null,_h=yh[--bh],yh[bh]=null,Ah=yh[--bh],yh[bh]=null}function Ch(){Gh()||o("Expected to be hydrating. This is a bug in React. Please file an issue.")}var Th=null,Oh=null,Rh=!1,Ph=!1,Nh=null;function Lh(){Rh&&o("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Ih(){Ph=!0}function Bh(e,t){switch(e.tag){case h:!function(e,t){t.nodeType===mn?Nu(e,t):t.nodeType===vn||Lu(e,t)}(e.stateNode.containerInfo,t);break;case f:var n=(e.mode&Xi)!==Ji;!function(e,t,n,r,i){(i||!0!==t[Vu])&&(r.nodeType===mn?Nu(n,r):r.nodeType===vn||Lu(n,r))}(e.type,e.memoizedProps,e.stateNode,t,n);break;case E:var r=e.memoizedState;null!==r.dehydrated&&function(e,t){var n=e.parentNode;null!==n&&(t.nodeType===mn?Nu(n,t):t.nodeType===vn||Lu(n,t))}(r.dehydrated,t)}}function Dh(e,t){Bh(e,t);var n,r=((n=Rw(f,null,null,Ji)).elementType="DELETED",n);r.stateNode=t,r.return=e;var i=e.deletions;null===i?(e.deletions=[r],e.flags|=Dr):i.push(r)}function jh(e,t){if(!Ph)switch(e.tag){case h:var n=e.stateNode.containerInfo;switch(t.tag){case f:var r=t.type;t.pendingProps,function(e,t,n){Iu(e,t)}(n,r);break;case p:!function(e,t){Bu(e,t)}(n,t.pendingProps)}break;case f:e.type;var i=e.memoizedProps,o=e.stateNode;switch(t.tag){case f:var s=t.type;t.pendingProps,function(e,t,n,r,i,o){(o||!0!==t[Vu])&&Iu(n,r)}(0,i,o,s,0,(e.mode&Xi)!==Ji);break;case p:!function(e,t,n,r,i){(i||!0!==t[Vu])&&Bu(n,r)}(0,i,o,t.pendingProps,(e.mode&Xi)!==Ji)}break;case E:var a=e.memoizedState.dehydrated;if(null!==a)switch(t.tag){case f:var l=t.type;t.pendingProps,function(e,t,n){var r=e.parentNode;null!==r&&Iu(r,t)}(a,l);break;case p:!function(e,t){var n=e.parentNode;null!==n&&Bu(n,t)}(a,t.pendingProps)}break;default:return}}function Fh(e,t){t.flags=t.flags&~Vr|Ir,jh(e,t)}function Uh(e,t){switch(e.tag){case f:var n=e.type;e.pendingProps;var r=function(e,t,n){return e.nodeType!==mn||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e}(t,n);return null!==r&&(e.stateNode=r,Th=e,Oh=pc(r.firstChild),!0);case p:var i=function(e,t){return""===t||e.nodeType!==gn?null:e}(t,e.pendingProps);return null!==i&&(e.stateNode=i,Th=e,Oh=null,!0);case E:var o=function(e){return e.nodeType!==vn?null:e}(t);if(null!==o){var s={dehydrated:o,treeContext:(Ch(),null!==wh?{id:Ah,overflow:_h}:null),retryLane:Ko};e.memoizedState=s;var a=function(e){var t=Rw(C,null,null,Ji);return t.stateNode=e,t}(o);return a.return=e,e.child=a,Th=e,Oh=null,!0}return!1;default:return!1}}function qh(e){return(e.mode&Xi)!==Ji&&(e.flags&Ur)===Nr}function zh(e){throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function Hh(e){if(Rh){var t=Oh;if(!t)return qh(e)&&(jh(Th,e),zh()),Fh(Th,e),Rh=!1,void(Th=e);var n=t;if(!Uh(e,t)){qh(e)&&(jh(Th,e),zh()),t=mc(n);var r=Th;if(!t||!Uh(e,t))return Fh(Th,e),Rh=!1,void(Th=e);Dh(r,n)}}}function Kh(e){for(var t=e.return;null!==t&&t.tag!==f&&t.tag!==h&&t.tag!==E;)t=t.return;Th=t}function Vh(e){if(e!==Th)return!1;if(!Rh)return Kh(e),Rh=!0,!1;if(e.tag!==h&&(e.tag!==f||"head"!==(n=e.type)&&"body"!==n&&!ec(e.type,e.memoizedProps))){var t=Oh;if(t)if(qh(e))Wh(e),zh();else for(;t;)Dh(e,t),t=mc(t)}var n;return Kh(e),Oh=e.tag===E?function(e){var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return function(e){for(var t=e.nextSibling,n=0;t;){if(t.nodeType===vn){var r=t.data;if(r===$u){if(0===n)return mc(t);n--}else r!==Wu&&r!==Gu&&r!==Yu||n++}t=t.nextSibling}return null}(n)}(e):Th?mc(e.stateNode):null,!0}function Wh(e){for(var t=Oh;t;)Bh(e,t),t=mc(t)}function $h(){Th=null,Oh=null,Rh=!1,Ph=!1}function Yh(){null!==Nh&&(xb(Nh),Nh=null)}function Gh(){return Rh}function Zh(e){null===Nh?Nh=[e]:Nh.push(e)}var Qh=n.ReactCurrentBatchConfig,Jh=null,Xh={recordUnsafeLifecycleWarnings:function(e,t){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(e,t){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},ed=function(e){var t=[];return e.forEach((function(e){t.push(e)})),t.sort().join(", ")},td=[],nd=[],rd=[],id=[],od=[],sd=[],ad=new Set;Xh.recordUnsafeLifecycleWarnings=function(e,t){ad.has(e.type)||("function"==typeof t.componentWillMount&&!0!==t.componentWillMount.__suppressDeprecationWarning&&td.push(e),e.mode&to&&"function"==typeof t.UNSAFE_componentWillMount&&nd.push(e),"function"==typeof t.componentWillReceiveProps&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&rd.push(e),e.mode&to&&"function"==typeof t.UNSAFE_componentWillReceiveProps&&id.push(e),"function"==typeof t.componentWillUpdate&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&od.push(e),e.mode&to&&"function"==typeof t.UNSAFE_componentWillUpdate&&sd.push(e))},Xh.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;td.length>0&&(td.forEach((function(t){e.add(pt(t)||"Component"),ad.add(t.type)})),td=[]);var t=new Set;nd.length>0&&(nd.forEach((function(e){t.add(pt(e)||"Component"),ad.add(e.type)})),nd=[]);var n=new Set;rd.length>0&&(rd.forEach((function(e){n.add(pt(e)||"Component"),ad.add(e.type)})),rd=[]);var r=new Set;id.length>0&&(id.forEach((function(e){r.add(pt(e)||"Component"),ad.add(e.type)})),id=[]);var s=new Set;od.length>0&&(od.forEach((function(e){s.add(pt(e)||"Component"),ad.add(e.type)})),od=[]);var a=new Set;sd.length>0&&(sd.forEach((function(e){a.add(pt(e)||"Component"),ad.add(e.type)})),sd=[]),t.size>0&&o("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s",ed(t)),r.size>0&&o("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s",ed(r)),a.size>0&&o("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s",ed(a)),e.size>0&&i("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",ed(e)),n.size>0&&i("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",ed(n)),s.size>0&&i("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s",ed(s))};var ld=new Map,ud=new Set;function cd(e,t){if(e&&e.defaultProps){var n=Qe({},t),r=e.defaultProps;for(var i in r)void 0===n[i]&&(n[i]=r[i]);return n}return t}Xh.recordLegacyContextWarning=function(e,t){var n=function(e){for(var t=null,n=e;null!==n;)n.mode&to&&(t=n),n=n.return;return t}(e);if(null!==n){if(!ud.has(e.type)){var r=ld.get(n);(null!=e.type.contextTypes||null!=e.type.childContextTypes||null!==t&&"function"==typeof t.getChildContext)&&(void 0===r&&(r=[],ld.set(n,r)),r.push(e))}}else o("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.")},Xh.flushLegacyContextWarning=function(){ld.forEach((function(e,t){if(0!==e.length){var n=e[0],r=new Set;e.forEach((function(e){r.add(pt(e)||"Component"),ud.add(e.type)}));var i=ed(r);try{At(n),o("Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context",i)}finally{wt()}}}))},Xh.discardPendingWarnings=function(){td=[],nd=[],rd=[],id=[],od=[],sd=[],ld=new Map};var hd,dd=zc(null);hd={};var fd=null,pd=null,md=null,gd=!1;function vd(){fd=null,pd=null,md=null,gd=!1}function yd(){gd=!0}function bd(){gd=!1}function wd(e,t,n){Kc(dd,t._currentValue,e),t._currentValue=n,void 0!==t._currentRenderer&&null!==t._currentRenderer&&t._currentRenderer!==hd&&o("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=hd}function Ad(e,t){var n=dd.current;Hc(dd,t),e._currentValue=n}function _d(e,t,n){for(var r=e;null!==r;){var i=r.alternate;if(us(r.childLanes,t)?null===i||us(i.childLanes,t)||(i.childLanes=cs(i.childLanes,t)):(r.childLanes=cs(r.childLanes,t),null!==i&&(i.childLanes=cs(i.childLanes,t))),r===n)break;r=r.return}r!==n&&o("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Ed(e,t,n){!function(e,t,n){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var i=void 0,o=r.dependencies;if(null!==o){i=r.child;for(var s=o.firstContext;null!==s;){if(s.context===t){if(r.tag===l){var a=os(n),u=qd(Wo,a);u.tag=Bd;var c=r.updateQueue;if(null===c);else{var h=c.shared,d=h.pending;null===d?u.next=u:(u.next=d.next,d.next=u),h.pending=u}}r.lanes=cs(r.lanes,n);var f=r.alternate;null!==f&&(f.lanes=cs(f.lanes,n)),_d(r.return,n,e),o.lanes=cs(o.lanes,n);break}s=s.next}}else if(r.tag===b)i=r.type===e.type?null:r.child;else if(r.tag===C){var p=r.return;if(null===p)throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");p.lanes=cs(p.lanes,n);var m=p.alternate;null!==m&&(m.lanes=cs(m.lanes,n)),_d(p,n,e),i=r.sibling}else i=r.child;if(null!==i)i.return=r;else for(i=r;null!==i;){if(i===e){i=null;break}var g=i.sibling;if(null!==g){g.return=i.return,i=g;break}i=i.return}r=i}}(e,t,n)}function Md(e,t){fd=e,pd=null,md=null;var n=e.dependencies;null!==n&&null!==n.firstContext&&(ls(n.lanes,t)&&tv(),n.firstContext=null)}function kd(e){gd&&o("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var t=e._currentValue;if(md===e);else{var n={context:e,memoizedValue:t,next:null};if(null===pd){if(null===fd)throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");pd=n,fd.dependencies={lanes:ao,firstContext:n}}else pd=pd.next=n}return t}var Sd=null;function xd(e){null===Sd?Sd=[e]:Sd.push(e)}function Cd(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,xd(t)):(n.next=i.next,i.next=n),t.interleaved=n,Rd(e,r)}function Td(e,t){return Rd(e,t)}var Od=Rd;function Rd(e,t){e.lanes=cs(e.lanes,t);var n=e.alternate;null!==n&&(n.lanes=cs(n.lanes,t)),null===n&&(e.flags&(Ir|Vr))!==Nr&&sw(e);for(var r=e,i=e.return;null!==i;)i.childLanes=cs(i.childLanes,t),null!==(n=i.alternate)?n.childLanes=cs(n.childLanes,t):(i.flags&(Ir|Vr))!==Nr&&sw(e),r=i,i=i.return;return r.tag===h?r.stateNode:null}var Pd,Nd,Ld=0,Id=1,Bd=2,Dd=3,jd=!1;function Fd(e){var t={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:ao},effects:null};e.updateQueue=t}function Ud(e,t){var n=t.updateQueue,r=e.updateQueue;if(n===r){var i={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects};t.updateQueue=i}}function qd(e,t){return{eventTime:e,lane:t,tag:Ld,payload:null,callback:null,next:null}}function zd(e,t,n){var r=e.updateQueue;if(null===r)return null;var i=r.shared;if(Nd!==i||Pd||(o("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),Pd=!0),(By&xy)!==ky){var s=i.pending;return null===s?t.next=t:(t.next=s.next,s.next=t),i.pending=t,Od(e,n)}return function(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,xd(t)):(n.next=i.next,i.next=n),t.interleaved=n,Rd(e,r)}(e,i,t,n)}function Hd(e,t,n){var r=t.updateQueue;if(null!==r){var i=r.shared;if(ns(n)){var o=i.lanes,s=cs(o=ds(o,e.pendingLanes),n);i.lanes=s,gs(e,s)}}}function Kd(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r){var i=r.updateQueue;if(n===i){var o=null,s=null,a=n.firstBaseUpdate;if(null!==a){var l=a;do{var u={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};null===s?o=s=u:(s.next=u,s=u),l=l.next}while(null!==l);null===s?o=s=t:(s.next=t,s=t)}else o=s=t;return n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}}var c=n.lastBaseUpdate;null===c?n.firstBaseUpdate=t:c.next=t,n.lastBaseUpdate=t}function Vd(e,t,n,r,i,o){switch(n.tag){case Id:var s=n.payload;if("function"==typeof s){yd();var a=s.call(o,r,i);if(e.mode&to){ji(!0);try{s.call(o,r,i)}finally{ji(!1)}}return bd(),a}return s;case Dd:e.flags=e.flags&~Qr|Ur;case Ld:var l,u=n.payload;if("function"==typeof u){if(yd(),l=u.call(o,r,i),e.mode&to){ji(!0);try{u.call(o,r,i)}finally{ji(!1)}}bd()}else l=u;return null==l?r:Qe({},r,l);case Bd:return jd=!0,r}return r}function Wd(e,t,n,r){var i=e.updateQueue;jd=!1,Nd=i.shared;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,u=l.next;l.next=null,null===s?o=u:s.next=u,s=l;var c=e.alternate;if(null!==c){var h=c.updateQueue,d=h.lastBaseUpdate;d!==s&&(null===d?h.firstBaseUpdate=u:d.next=u,h.lastBaseUpdate=l)}}if(null!==o){for(var f=i.baseState,p=ao,m=null,g=null,v=null,y=o;;){var b=y.lane,w=y.eventTime;if(us(r,b)){if(null!==v){var A={eventTime:w,lane:lo,tag:y.tag,payload:y.payload,callback:y.callback,next:null};v=v.next=A}if(f=Vd(e,0,y,f,t,n),null!==y.callback&&y.lane!==lo){e.flags|=Fr;var _=i.effects;null===_?i.effects=[y]:_.push(y)}}else{var E={eventTime:w,lane:b,tag:y.tag,payload:y.payload,callback:y.callback,next:null};null===v?(g=v=E,m=f):v=v.next=E,p=cs(p,b)}if(null===(y=y.next)){if(null===(a=i.shared.pending))break;var M=a,k=M.next;M.next=null,y=k,i.lastBaseUpdate=M,i.shared.pending=null}}null===v&&(m=f),i.baseState=m,i.firstBaseUpdate=g,i.lastBaseUpdate=v;var S=i.shared.interleaved;if(null!==S){var x=S;do{p=cs(p,x.lane),x=x.next}while(x!==S)}else null===o&&(i.shared.lanes=ao);Fb(p),e.lanes=p,e.memoizedState=f}Nd=null}function $d(e,t){if("function"!=typeof e)throw new Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function Yd(){jd=!1}function Gd(){return jd}function Zd(e,t,n){var r=t.effects;if(t.effects=null,null!==r)for(var i=0;i<r.length;i++){var o=r[i],s=o.callback;null!==s&&(o.callback=null,$d(s,n))}}Pd=!1,Nd=null;var Qd,Jd,Xd,ef,tf,nf,rf,of,sf,af,lf={},uf=(new e.Component).refs;Qd=new Set,Jd=new Set,Xd=new Set,ef=new Set,of=new Set,tf=new Set,sf=new Set,af=new Set;var cf=new Set;function hf(e,t,n,r){var i=e.memoizedState,o=n(r,i);if(e.mode&to){ji(!0);try{o=n(r,i)}finally{ji(!1)}}nf(t,o);var s=null==o?i:Qe({},i,o);e.memoizedState=s,e.lanes===ao&&(e.updateQueue.baseState=s)}rf=function(e,t){if(null!==e&&"function"!=typeof e){var n=t+"_"+e;cf.has(n)||(cf.add(n),o("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e))}},nf=function(e,t){if(void 0===t){var n=dt(e)||"Component";tf.has(n)||(tf.add(n),o("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",n))}},Object.defineProperty(lf,"_processChildContext",{enumerable:!1,value:function(){throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(lf);var df,ff,pf,mf,gf,vf,yf={isMounted:function(e){var t=ci.current;if(null!==t&&t.tag===l){var n=t,r=n.stateNode;r._warnedAboutRefsInRender||o("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",pt(n)||"A component"),r._warnedAboutRefsInRender=!0}var i=Pr(e);return!!i&&hi(i)===i},enqueueSetState:function(e,t,n){var r=Pr(e),i=Ab(),o=_b(r),s=qd(i,o);s.payload=t,null!=n&&(rf(n,"setState"),s.callback=n);var a=zd(r,s,o);null!==a&&(Eb(a,r,o,i),Hd(a,r,o)),Qi(r,o)},enqueueReplaceState:function(e,t,n){var r=Pr(e),i=Ab(),o=_b(r),s=qd(i,o);s.tag=Id,s.payload=t,null!=n&&(rf(n,"replaceState"),s.callback=n);var a=zd(r,s,o);null!==a&&(Eb(a,r,o,i),Hd(a,r,o)),Qi(r,o)},enqueueForceUpdate:function(e,t){var n=Pr(e),r=Ab(),i=_b(n),o=qd(r,i);o.tag=Bd,null!=t&&(rf(t,"forceUpdate"),o.callback=t);var s=zd(n,o,i);null!==s&&(Eb(s,n,i,r),Hd(s,n,i)),function(e,t){null!==Ii&&"function"==typeof Ii.markForceUpdateScheduled&&Ii.markForceUpdateScheduled(e,t)}(n,i)}};function bf(e,t,n,r,i,s,a){var l=e.stateNode;if("function"==typeof l.shouldComponentUpdate){var u=l.shouldComponentUpdate(r,s,a);if(e.mode&to){ji(!0);try{u=l.shouldComponentUpdate(r,s,a)}finally{ji(!1)}}return void 0===u&&o("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",dt(t)||"Component"),u}return!(t.prototype&&t.prototype.isPureReactComponent&&vl(n,r)&&vl(i,s))}function wf(e,t){var n;t.updater=yf,e.stateNode=t,n=e,t._reactInternals=n,t._reactInternalInstance=lf}function Af(e,t,n){var r=!1,i=Vc,s=Vc,a=t.contextType;if("contextType"in t&&null!==a&&(void 0===a||a.$$typeof!==Le||void 0!==a._context)&&!af.has(t)){af.add(t);var l;l=void 0===a?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":"object"!=typeof a?" However, it is set to a "+typeof a+".":a.$$typeof===Ne?" Did you accidentally pass the Context.Provider instead?":void 0!==a._context?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(a).join(", ")+"}.",o("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",dt(t)||"Component",l)}"object"==typeof a&&null!==a?s=kd(a):(i=Gc(0,t,!0),s=(r=null!=t.contextTypes)?Qc(e,i):Vc);var u=new t(n,s);if(e.mode&to){ji(!0);try{u=new t(n,s)}finally{ji(!1)}}var c=e.memoizedState=null!==u.state&&void 0!==u.state?u.state:null;if(wf(e,u),"function"==typeof t.getDerivedStateFromProps&&null===c){var h=dt(t)||"Component";Jd.has(h)||(Jd.add(h),o("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",h,null===u.state?"null":"undefined",h))}if("function"==typeof t.getDerivedStateFromProps||"function"==typeof u.getSnapshotBeforeUpdate){var d=null,f=null,p=null;if("function"==typeof u.componentWillMount&&!0!==u.componentWillMount.__suppressDeprecationWarning?d="componentWillMount":"function"==typeof u.UNSAFE_componentWillMount&&(d="UNSAFE_componentWillMount"),"function"==typeof u.componentWillReceiveProps&&!0!==u.componentWillReceiveProps.__suppressDeprecationWarning?f="componentWillReceiveProps":"function"==typeof u.UNSAFE_componentWillReceiveProps&&(f="UNSAFE_componentWillReceiveProps"),"function"==typeof u.componentWillUpdate&&!0!==u.componentWillUpdate.__suppressDeprecationWarning?p="componentWillUpdate":"function"==typeof u.UNSAFE_componentWillUpdate&&(p="UNSAFE_componentWillUpdate"),null!==d||null!==f||null!==p){var m=dt(t)||"Component",g="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";ef.has(m)||(ef.add(m),o("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles",m,g,null!==d?"\n "+d:"",null!==f?"\n "+f:"",null!==p?"\n "+p:""))}}return r&&Zc(e,i,s),u}function _f(e,t,n,r){var i=t.state;if("function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==i){var s=pt(e)||"Component";Qd.has(s)||(Qd.add(s),o("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",s)),yf.enqueueReplaceState(t,t.state,null)}}function Ef(e,t,n,r){!function(e,t,n){var r=e.stateNode,i=dt(t)||"Component";r.render||(t.prototype&&"function"==typeof t.prototype.render?o("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",i):o("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",i)),!r.getInitialState||r.getInitialState.isReactClassApproved||r.state||o("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",i),r.getDefaultProps&&!r.getDefaultProps.isReactClassApproved&&o("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",i),r.propTypes&&o("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",i),r.contextType&&o("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",i),r.contextTypes&&o("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",i),t.contextType&&t.contextTypes&&!sf.has(t)&&(sf.add(t),o("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",i)),"function"==typeof r.componentShouldUpdate&&o("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",i),t.prototype&&t.prototype.isPureReactComponent&&void 0!==r.shouldComponentUpdate&&o("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",dt(t)||"A pure component"),"function"==typeof r.componentDidUnmount&&o("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",i),"function"==typeof r.componentDidReceiveProps&&o("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",i),"function"==typeof r.componentWillRecieveProps&&o("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",i),"function"==typeof r.UNSAFE_componentWillRecieveProps&&o("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",i);var s=r.props!==n;void 0!==r.props&&s&&o("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",i,i),r.defaultProps&&o("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",i,i),"function"!=typeof r.getSnapshotBeforeUpdate||"function"==typeof r.componentDidUpdate||Xd.has(t)||(Xd.add(t),o("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",dt(t))),"function"==typeof r.getDerivedStateFromProps&&o("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof r.getDerivedStateFromError&&o("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",i),"function"==typeof t.getSnapshotBeforeUpdate&&o("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",i);var a=r.state;a&&("object"!=typeof a||Gt(a))&&o("%s.state: must be set to an object or null",i),"function"==typeof r.getChildContext&&"object"!=typeof t.childContextTypes&&o("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",i)}(e,t,n);var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=uf,Fd(e);var s=t.contextType;if("object"==typeof s&&null!==s)i.context=kd(s);else{var a=Gc(0,t,!0);i.context=Qc(e,a)}if(i.state===n){var l=dt(t)||"Component";of.has(l)||(of.add(l),o("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",l))}e.mode&to&&Xh.recordLegacyContextWarning(e,i),Xh.recordUnsafeLifecycleWarnings(e,i),i.state=e.memoizedState;var u=t.getDerivedStateFromProps;if("function"==typeof u&&(hf(e,t,u,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(function(e,t){var n=t.state;"function"==typeof t.componentWillMount&&t.componentWillMount(),"function"==typeof t.UNSAFE_componentWillMount&&t.UNSAFE_componentWillMount(),n!==t.state&&(o("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",pt(e)||"Component"),yf.enqueueReplaceState(t,t.state,null))}(e,i),Wd(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount){var c=Br;c|=ti,(e.mode&no)!==Ji&&(c|=ri),e.flags|=c}}function Mf(e,t,n){var r,i=n.ref;if(null!==i&&"function"!=typeof i&&"object"!=typeof i){if((e.mode&to||q)&&(!n._owner||!n._self||n._owner.stateNode===n._self)){var s=pt(e)||"Component";pf[s]||(o('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',i),pf[s]=!0)}if(n._owner){var a,u=n._owner;if(u){var c=u;if(c.tag!==l)throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");a=c.stateNode}if(!a)throw new Error("Missing owner for string ref "+i+". This error is likely caused by a bug in React. Please file an issue.");var h=a;"ref",X(r=i)&&(o("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.","ref",J(r)),ee(r));var d=""+i;if(null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===d)return t.ref;var f=function(e){var t=h.refs;t===uf&&(t=h.refs={}),null===e?delete t[d]:t[d]=e};return f._stringRef=d,f}if("string"!=typeof i)throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!n._owner)throw new Error("Element ref was specified as a string ("+i+") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.")}return i}function kf(e,t){var n=Object.prototype.toString.call(t);throw new Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}function Sf(e){var t=pt(e)||"Component";gf[t]||(gf[t]=!0,o("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it."))}function xf(e){var t=e._payload;return(0,e._init)(t)}function Cf(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=Dr):r.push(n)}}function n(n,r){if(!e)return null;for(var i=r;null!==i;)t(n,i),i=i.sibling;return null}function r(e,t){for(var n=new Map,r=t;null!==r;)null!==r.key?n.set(r.key,r):n.set(r.index,r),r=r.sibling;return n}function i(e,t){var n=Nw(e,t);return n.index=0,n.sibling=null,n}function s(t,n,r){if(t.index=r,!e)return t.flags|=Xr,n;var i=t.alternate;if(null!==i){var o=i.index;return o<n?(t.flags|=Ir,n):o}return t.flags|=Ir,n}function a(t){return e&&null===t.alternate&&(t.flags|=Ir),t}function l(e,t,n,r){if(null===t||t.tag!==p){var o=Fw(n,e.mode,r);return o.return=e,o}var s=i(t,n);return s.return=e,s}function u(e,t,n,r){var o=n.type;if(o===Oe)return h(e,t,n.props.children,r,n.key);if(null!==t&&(t.elementType===o||Aw(t,n)||"object"==typeof o&&null!==o&&o.$$typeof===Fe&&xf(o)===t.type)){var s=i(t,n.props);return s.ref=Mf(e,t,n),s.return=e,s._debugSource=n._source,s._debugOwner=n._owner,s}var a=Bw(n,e.mode,r);return a.ref=Mf(e,t,n),a.return=e,a}function c(e,t,n,r){if(null===t||t.tag!==d||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation){var o=Uw(n,e.mode,r);return o.return=e,o}var s=i(t,n.children||[]);return s.return=e,s}function h(e,t,n,r,o){if(null===t||t.tag!==m){var s=Dw(n,e.mode,r,o);return s.return=e,s}var a=i(t,n);return a.return=e,a}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t){var r=Fw(""+t,e.mode,n);return r.return=e,r}if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ce:var i=Bw(t,e.mode,n);return i.ref=Mf(e,null,t),i.return=e,i;case Te:var o=Uw(t,e.mode,n);return o.return=e,o;case Fe:var s=t._payload;return f(e,(0,t._init)(s),n)}if(Gt(t)||He(t)){var a=Dw(t,e.mode,n,null);return a.return=e,a}kf(0,t)}return"function"==typeof t&&Sf(e),null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ce:return n.key===i?u(e,t,n,r):null;case Te:return n.key===i?c(e,t,n,r):null;case Fe:var o=n._payload;return g(e,t,(0,n._init)(o),r)}if(Gt(n)||He(n))return null!==i?null:h(e,t,n,r,null);kf(0,n)}return"function"==typeof n&&Sf(e),null}function v(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ce:return u(t,e.get(null===r.key?n:r.key)||null,r,i);case Te:return c(t,e.get(null===r.key?n:r.key)||null,r,i);case Fe:var o=r._payload;return v(e,t,n,(0,r._init)(o),i)}if(Gt(r)||He(r))return h(t,e.get(n)||null,r,i,null);kf(0,r)}return"function"==typeof r&&Sf(t),null}function y(e,t,n){if("object"!=typeof e||null===e)return t;switch(e.$$typeof){case Ce:case Te:vf(e,n);var r=e.key;if("string"!=typeof r)break;if(null===t){(t=new Set).add(r);break}if(!t.has(r)){t.add(r);break}o("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",r);break;case Fe:var i=e._payload;y((0,e._init)(i),t,n)}return t}return function l(u,c,h,b){if("object"==typeof h&&null!==h&&h.type===Oe&&null===h.key&&(h=h.props.children),"object"==typeof h&&null!==h){switch(h.$$typeof){case Ce:return a(function(e,r,o,s){for(var a=o.key,l=r;null!==l;){if(l.key===a){var u=o.type;if(u===Oe){if(l.tag===m){n(e,l.sibling);var c=i(l,o.props.children);return c.return=e,c._debugSource=o._source,c._debugOwner=o._owner,c}}else if(l.elementType===u||Aw(l,o)||"object"==typeof u&&null!==u&&u.$$typeof===Fe&&xf(u)===l.type){n(e,l.sibling);var h=i(l,o.props);return h.ref=Mf(e,l,o),h.return=e,h._debugSource=o._source,h._debugOwner=o._owner,h}n(e,l);break}t(e,l),l=l.sibling}if(o.type===Oe){var d=Dw(o.props.children,e.mode,s,o.key);return d.return=e,d}var f=Bw(o,e.mode,s);return f.ref=Mf(e,r,o),f.return=e,f}(u,c,h,b));case Te:return a(function(e,r,o,s){for(var a=o.key,l=r;null!==l;){if(l.key===a){if(l.tag===d&&l.stateNode.containerInfo===o.containerInfo&&l.stateNode.implementation===o.implementation){n(e,l.sibling);var u=i(l,o.children||[]);return u.return=e,u}n(e,l);break}t(e,l),l=l.sibling}var c=Uw(o,e.mode,s);return c.return=e,c}(u,c,h,b));case Fe:var w=h._payload;return l(u,c,(0,h._init)(w),b)}if(Gt(h))return function(i,o,a,l){for(var u=null,c=0;c<a.length;c++)u=y(a[c],u,i);for(var h=null,d=null,p=o,m=0,b=0,w=null;null!==p&&b<a.length;b++){p.index>b?(w=p,p=null):w=p.sibling;var A=g(i,p,a[b],l);if(null===A){null===p&&(p=w);break}e&&p&&null===A.alternate&&t(i,p),m=s(A,m,b),null===d?h=A:d.sibling=A,d=A,p=w}if(b===a.length)return n(i,p),Gh()&&Eh(i,b),h;if(null===p){for(;b<a.length;b++){var _=f(i,a[b],l);null!==_&&(m=s(_,m,b),null===d?h=_:d.sibling=_,d=_)}return Gh()&&Eh(i,b),h}for(var E=r(0,p);b<a.length;b++){var M=v(E,i,b,a[b],l);null!==M&&(e&&null!==M.alternate&&E.delete(null===M.key?b:M.key),m=s(M,m,b),null===d?h=M:d.sibling=M,d=M)}return e&&E.forEach((function(e){return t(i,e)})),Gh()&&Eh(i,b),h}(u,c,h,b);if(He(h))return function(i,a,l,u){var c=He(l);if("function"!=typeof c)throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");"function"==typeof Symbol&&"Generator"===l[Symbol.toStringTag]&&(ff||o("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),ff=!0),l.entries===c&&(df||o("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),df=!0);var h=c.call(l);if(h)for(var d=null,p=h.next();!p.done;p=h.next())d=y(p.value,d,i);var m=c.call(l);if(null==m)throw new Error("An iterable object provided no iterator.");for(var b=null,w=null,A=a,_=0,E=0,M=null,k=m.next();null!==A&&!k.done;E++,k=m.next()){A.index>E?(M=A,A=null):M=A.sibling;var S=g(i,A,k.value,u);if(null===S){null===A&&(A=M);break}e&&A&&null===S.alternate&&t(i,A),_=s(S,_,E),null===w?b=S:w.sibling=S,w=S,A=M}if(k.done)return n(i,A),Gh()&&Eh(i,E),b;if(null===A){for(;!k.done;E++,k=m.next()){var x=f(i,k.value,u);null!==x&&(_=s(x,_,E),null===w?b=x:w.sibling=x,w=x)}return Gh()&&Eh(i,E),b}for(var C=r(0,A);!k.done;E++,k=m.next()){var T=v(C,i,E,k.value,u);null!==T&&(e&&null!==T.alternate&&C.delete(null===T.key?E:T.key),_=s(T,_,E),null===w?b=T:w.sibling=T,w=T)}return e&&C.forEach((function(e){return t(i,e)})),Gh()&&Eh(i,E),b}(u,c,h,b);kf(0,h)}return"string"==typeof h&&""!==h||"number"==typeof h?a(function(e,t,r,o){if(null!==t&&t.tag===p){n(e,t.sibling);var s=i(t,r);return s.return=e,s}n(e,t);var a=Fw(r,e.mode,o);return a.return=e,a}(u,c,""+h,b)):("function"==typeof h&&Sf(u),n(u,c))}}df=!1,ff=!1,pf={},mf={},gf={},vf=function(e,t){if(null!==e&&"object"==typeof e&&e._store&&!e._store.validated&&null==e.key){if("object"!=typeof e._store)throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");e._store.validated=!0;var n=pt(t)||"Component";mf[n]||(mf[n]=!0,o('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'))}};var Tf=Cf(!0),Of=Cf(!1);function Rf(e,t){for(var n=e.child;null!==n;)Lw(n,t),n=n.sibling}var Pf={},Nf=zc(Pf),Lf=zc(Pf),If=zc(Pf);function Bf(e){if(e===Pf)throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function Df(){return Bf(If.current)}function jf(e,t){Kc(If,t,e),Kc(Lf,e,e),Kc(Nf,Pf,e);var n=function(e){var t,n,r=e.nodeType;switch(r){case yn:case bn:t=r===yn?"#document":"#fragment";var i=e.documentElement;n=i?i.namespaceURI:hn(null,"");break;default:var o=r===vn?e.parentNode:e;n=hn(o.namespaceURI||null,t=o.tagName)}var s=t.toLowerCase();return{namespace:n,ancestorInfo:ju(null,s)}}(t);Hc(Nf,e),Kc(Nf,n,e)}function Ff(e){Hc(Nf,e),Hc(Lf,e),Hc(If,e)}function Uf(){return Bf(Nf.current)}function qf(e){Bf(If.current);var t,n,r,i=Bf(Nf.current),o=(t=i,n=e.type,{namespace:hn((r=t).namespace,n),ancestorInfo:ju(r.ancestorInfo,n)});i!==o&&(Kc(Lf,e,e),Kc(Nf,o,e))}function zf(e){Lf.current===e&&(Hc(Nf,e),Hc(Lf,e))}var Hf=1,Kf=1,Vf=2,Wf=zc(0);function $f(e,t){return 0!=(e&t)}function Yf(e){return e&Hf}function Gf(e,t){return e&Hf|t}function Zf(e,t){Kc(Wf,t,e)}function Qf(e){Hc(Wf,e)}function Jf(e,t){var n=e.memoizedState;return null!==n?null!==n.dehydrated:(e.memoizedProps,!0)}function Xf(e){for(var t=e;null!==t;){if(t.tag===E){var n=t.memoizedState;if(null!==n){var r=n.dehydrated;if(null===r||dc(r)||fc(r))return t}}else if(t.tag===T&&void 0!==t.memoizedProps.revealOrder){if((t.flags&Ur)!==Nr)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)return null;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ep=0,tp=1,np=2,rp=4,ip=8,op=[];function sp(){for(var e=0;e<op.length;e++)op[e]._workInProgressVersionPrimary=null;op.length=0}function ap(e,t){var n=(0,t._getVersion)(t._source);null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)}var lp,up,cp=n.ReactCurrentDispatcher,hp=n.ReactCurrentBatchConfig;lp=new Set;var dp=ao,fp=null,pp=null,mp=null,gp=!1,vp=!1,yp=0,bp=0,wp=25,Ap=null,_p=null,Ep=-1,Mp=!1;function kp(){var e=Ap;null===_p?_p=[e]:_p.push(e)}function Sp(){var e=Ap;null!==_p&&(Ep++,_p[Ep]!==e&&function(e){var t=pt(fp);if(!lp.has(t)&&(lp.add(t),null!==_p)){for(var n="",r=0;r<=Ep;r++){for(var i=_p[r],s=r===Ep?e:i,a=r+1+". "+i;a.length<30;)a+=" ";n+=a+=s+"\n"}o("React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",t,n)}}(e))}function xp(e){null==e||Gt(e)||o("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Ap,typeof e)}function Cp(){throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.")}function Tp(e,t){if(Mp)return!1;if(null===t)return o("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",Ap),!1;e.length!==t.length&&o("The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s",Ap,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!gl(e[n],t[n]))return!1;return!0}function Op(e,t,n,r,i,s){dp=s,fp=t,_p=null!==e?e._debugHookTypes:null,Ep=-1,Mp=null!==e&&e.type!==t.type,t.memoizedState=null,t.updateQueue=null,t.lanes=ao,null!==e&&null!==e.memoizedState?cp.current=Im:cp.current=null!==_p?Lm:Nm;var a=n(r,i);if(vp){var l=0;do{if(vp=!1,yp=0,l>=wp)throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");l+=1,Mp=!1,pp=null,mp=null,t.updateQueue=null,Ep=-1,cp.current=Bm,a=n(r,i)}while(vp)}cp.current=Pm,t._debugHookTypes=_p;var u=null!==pp&&null!==pp.next;if(dp=ao,fp=null,pp=null,mp=null,Ap=null,_p=null,Ep=-1,null!==e&&(e.flags&ui)!=(t.flags&ui)&&(e.mode&Xi)!==Ji&&o("Internal React error: Expected static flag was missing. Please notify the React team."),gp=!1,u)throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return a}function Rp(){var e=0!==yp;return yp=0,e}function Pp(e,t,n){t.updateQueue=e.updateQueue,(t.mode&no)!==Ji?t.flags&=~(ii|ri|Kr|Br):t.flags&=~(Kr|Br),e.lanes=hs(e.lanes,n)}function Np(){if(cp.current=Pm,gp){for(var e=fp.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}gp=!1}dp=ao,fp=null,pp=null,mp=null,_p=null,Ep=-1,Ap=null,Em=!1,vp=!1,yp=0}function Lp(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===mp?fp.memoizedState=mp=e:mp=mp.next=e,mp}function Ip(){var e,t;if(null===pp){var n=fp.alternate;e=null!==n?n.memoizedState:null}else e=pp.next;if(null!==(t=null===mp?fp.memoizedState:mp.next))t=(mp=t).next,pp=e;else{if(null===e)throw new Error("Rendered more hooks than during the previous render.");var r={memoizedState:(pp=e).memoizedState,baseState:pp.baseState,baseQueue:pp.baseQueue,queue:pp.queue,next:null};null===mp?fp.memoizedState=mp=r:mp=mp.next=r}return mp}function Bp(e,t){return"function"==typeof t?t(e):t}function Dp(e,t,n){var r,i=Lp();r=void 0!==n?n(t):t,i.memoizedState=i.baseState=r;var o={pending:null,interleaved:null,lanes:ao,dispatch:null,lastRenderedReducer:e,lastRenderedState:r};i.queue=o;var s=o.dispatch=Sm.bind(null,fp,o);return[i.memoizedState,s]}function jp(e,t,n){var r=Ip(),i=r.queue;if(null===i)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var s=pp,a=s.baseQueue,l=i.pending;if(null!==l){if(null!==a){var u=a.next,c=l.next;a.next=c,l.next=u}s.baseQueue!==a&&o("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),s.baseQueue=a=l,i.pending=null}if(null!==a){var h=a.next,d=s.baseState,f=null,p=null,m=null,g=h;do{var v=g.lane;if(us(dp,v)){if(null!==m){var y={lane:lo,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};m=m.next=y}d=g.hasEagerState?g.eagerState:e(d,g.action)}else{var b={lane:v,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};null===m?(p=m=b,f=d):m=m.next=b,fp.lanes=cs(fp.lanes,v),Fb(v)}g=g.next}while(null!==g&&g!==h);null===m?f=d:m.next=p,gl(d,r.memoizedState)||tv(),r.memoizedState=d,r.baseState=f,r.baseQueue=m,i.lastRenderedState=d}var w=i.interleaved;if(null!==w){var A=w;do{var _=A.lane;fp.lanes=cs(fp.lanes,_),Fb(_),A=A.next}while(A!==w)}else null===a&&(i.lanes=ao);var E=i.dispatch;return[r.memoizedState,E]}function Fp(e,t,n){var r=Ip(),i=r.queue;if(null===i)throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");i.lastRenderedReducer=e;var o=i.dispatch,s=i.pending,a=r.memoizedState;if(null!==s){i.pending=null;var l=s.next,u=l;do{a=e(a,u.action),u=u.next}while(u!==l);gl(a,r.memoizedState)||tv(),r.memoizedState=a,null===r.baseQueue&&(r.baseState=a),i.lastRenderedState=a}return[a,o]}function Up(e,t,n){var r,i=fp,s=Lp();if(Gh()){if(void 0===n)throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");r=n(),up||r!==n()&&(o("The result of getServerSnapshot should be cached to avoid an infinite loop"),up=!0)}else{if(r=t(),!up){var a=t();gl(r,a)||(o("The result of getSnapshot should be cached to avoid an infinite loop"),up=!0)}if(null===wb())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");ts(0,dp)||zp(i,t,r)}s.memoizedState=r;var l={value:r,getSnapshot:t};return s.queue=l,tm(Kp.bind(null,i,l,e),[e]),i.flags|=Kr,Zp(tp|ip,Hp.bind(null,i,l,r,t),void 0,null),r}function qp(e,t,n){var r=fp,i=Ip(),s=t();if(!up){var a=t();gl(s,a)||(o("The result of getSnapshot should be cached to avoid an infinite loop"),up=!0)}var l=i.memoizedState,u=!gl(l,s);u&&(i.memoizedState=s,tv());var c=i.queue;if(nm(Kp.bind(null,r,c,e),[e]),c.getSnapshot!==t||u||null!==mp&&mp.memoizedState.tag&tp){if(r.flags|=Kr,Zp(tp|ip,Hp.bind(null,r,c,s,t),void 0,null),null===wb())throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");ts(0,dp)||zp(r,t,s)}return s}function zp(e,t,n){e.flags|=$r;var r={getSnapshot:t,value:n},i=fp.updateQueue;if(null===i)i={lastEffect:null,stores:null},fp.updateQueue=i,i.stores=[r];else{var o=i.stores;null===o?i.stores=[r]:o.push(r)}}function Hp(e,t,n,r){t.value=n,t.getSnapshot=r,Vp(t)&&Wp(e)}function Kp(e,t,n){return n((function(){Vp(t)&&Wp(e)}))}function Vp(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!gl(n,r)}catch(e){return!0}}function Wp(e){var t=Td(e,uo);null!==t&&Eb(t,e,uo,Wo)}function $p(e){var t=Lp();"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e;var n={pending:null,interleaved:null,lanes:ao,dispatch:null,lastRenderedReducer:Bp,lastRenderedState:e};t.queue=n;var r=n.dispatch=xm.bind(null,fp,n);return[t.memoizedState,r]}function Yp(e){return jp(Bp)}function Gp(e){return Fp(Bp)}function Zp(e,t,n,r){var i={tag:e,create:t,destroy:n,deps:r,next:null},o=fp.updateQueue;if(null===o)o={lastEffect:null,stores:null},fp.updateQueue=o,o.lastEffect=i.next=i;else{var s=o.lastEffect;if(null===s)o.lastEffect=i.next=i;else{var a=s.next;s.next=i,i.next=a,o.lastEffect=i}}return i}function Qp(e){var t={current:e};return Lp().memoizedState=t,t}function Jp(e){return Ip().memoizedState}function Xp(e,t,n,r){var i=Lp(),o=void 0===r?null:r;fp.flags|=e,i.memoizedState=Zp(tp|t,n,void 0,o)}function em(e,t,n,r){var i=Ip(),o=void 0===r?null:r,s=void 0;if(null!==pp){var a=pp.memoizedState;if(s=a.destroy,null!==o&&Tp(o,a.deps))return void(i.memoizedState=Zp(t,n,s,o))}fp.flags|=e,i.memoizedState=Zp(tp|t,n,s,o)}function tm(e,t){return(fp.mode&no)!==Ji?Xp(ii|Kr|ni,ip,e,t):Xp(Kr|ni,ip,e,t)}function nm(e,t){return em(Kr,ip,e,t)}function rm(e,t){return Xp(Br,np,e,t)}function im(e,t){return em(Br,np,e,t)}function om(e,t){var n=Br;return n|=ti,(fp.mode&no)!==Ji&&(n|=ri),Xp(n,rp,e,t)}function sm(e,t){return em(Br,rp,e,t)}function am(e,t){if("function"==typeof t){var n=t,r=e();return n(r),function(){n(null)}}if(null!=t){var i=t;i.hasOwnProperty("current")||o("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(i).join(", ")+"}");var s=e();return i.current=s,function(){i.current=null}}}function lm(e,t,n){"function"!=typeof t&&o("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null,i=Br;return i|=ti,(fp.mode&no)!==Ji&&(i|=ri),Xp(i,rp,am.bind(null,t,e),r)}function um(e,t,n){"function"!=typeof t&&o("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",null!==t?typeof t:"null");var r=null!=n?n.concat([e]):null;return em(Br,rp,am.bind(null,t,e),r)}var cm=function(e,t){};function hm(e,t){var n=void 0===t?null:t;return Lp().memoizedState=[e,n],e}function dm(e,t){var n=Ip(),r=void 0===t?null:t,i=n.memoizedState;return null!==i&&null!==r&&Tp(r,i[1])?i[0]:(n.memoizedState=[e,r],e)}function fm(e,t){var n=Lp(),r=void 0===t?null:t,i=e();return n.memoizedState=[i,r],i}function pm(e,t){var n=Ip(),r=void 0===t?null:t,i=n.memoizedState;if(null!==i&&null!==r&&Tp(r,i[1]))return i[0];var o=e();return n.memoizedState=[o,r],o}function mm(e){return Lp().memoizedState=e,e}function gm(e){return ym(Ip(),pp.memoizedState,e)}function vm(e){var t=Ip();return null===pp?(t.memoizedState=e,e):ym(t,pp.memoizedState,e)}function ym(e,t,n){if((dp&(uo|ho|po))!==ao){if(!gl(n,t)){var r=rs();fp.lanes=cs(fp.lanes,r),Fb(r),e.baseState=!0}return t}return e.baseState&&(e.baseState=!1,tv()),e.memoizedState=n,n}function bm(e,t,n){var r,o,s=Ts();Os((o=ks,0!==(r=s)&&r<o?r:o)),e(!0);var a=hp.transition;hp.transition={};var l=hp.transition;hp.transition._updatedFibers=new Set;try{e(!1),t()}finally{Os(s),hp.transition=a,null===a&&l._updatedFibers&&(l._updatedFibers.size>10&&i("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),l._updatedFibers.clear())}}function wm(){var e=$p(!1),t=e[0],n=e[1],r=bm.bind(null,n);return Lp().memoizedState=r,[t,r]}function Am(){return[Yp()[0],Ip().memoizedState]}function _m(){return[Gp()[0],Ip().memoizedState]}var Em=!1;function Mm(){var e,t=Lp(),n=wb().identifierPrefix;if(Gh()){e=":"+n+"R"+function(){var e,t=_h;return(Ah&(e=Ah,~(1<<Sh(e)-1))).toString(32)+t}();var r=yp++;r>0&&(e+="H"+r.toString(32)),e+=":"}else e=":"+n+"r"+(bp++).toString(32)+":";return t.memoizedState=e,e}function km(){return Ip().memoizedState}function Sm(e,t,n){"function"==typeof arguments[3]&&o("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=_b(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cm(e))Tm(t,i);else{var s=Cd(e,t,i,r);null!==s&&(Eb(s,e,r,Ab()),Om(s,t,r))}Rm(e,r)}function xm(e,t,n){"function"==typeof arguments[3]&&o("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var r=_b(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cm(e))Tm(t,i);else{var s=e.alternate;if(e.lanes===ao&&(null===s||s.lanes===ao)){var a=t.lastRenderedReducer;if(null!==a){var l;l=cp.current,cp.current=jm;try{var u=t.lastRenderedState,c=a(u,n);if(i.hasEagerState=!0,i.eagerState=c,gl(c,u))return void function(e,t,n,r){var i=t.interleaved;null===i?(n.next=n,xd(t)):(n.next=i.next,i.next=n),t.interleaved=n}(0,t,i)}catch(e){}finally{cp.current=l}}}var h=Cd(e,t,i,r);null!==h&&(Eb(h,e,r,Ab()),Om(h,t,r))}Rm(e,r)}function Cm(e){var t=e.alternate;return e===fp||null!==t&&t===fp}function Tm(e,t){vp=gp=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Om(e,t,n){if(ns(n)){var r=t.lanes,i=cs(r=ds(r,e.pendingLanes),n);t.lanes=i,gs(e,i)}}function Rm(e,t,n){Qi(e,t)}var Pm={readContext:kd,useCallback:Cp,useContext:Cp,useEffect:Cp,useImperativeHandle:Cp,useInsertionEffect:Cp,useLayoutEffect:Cp,useMemo:Cp,useReducer:Cp,useRef:Cp,useState:Cp,useDebugValue:Cp,useDeferredValue:Cp,useTransition:Cp,useMutableSource:Cp,useSyncExternalStore:Cp,useId:Cp,unstable_isNewReconciler:B},Nm=null,Lm=null,Im=null,Bm=null,Dm=null,jm=null,Fm=null,Um=function(){o("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},qm=function(){o("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};Nm={readContext:function(e){return kd(e)},useCallback:function(e,t){return Ap="useCallback",kp(),xp(t),hm(e,t)},useContext:function(e){return Ap="useContext",kp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",kp(),xp(t),tm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",kp(),xp(n),lm(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",kp(),xp(t),rm(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",kp(),xp(t),om(e,t)},useMemo:function(e,t){Ap="useMemo",kp(),xp(t);var n=cp.current;cp.current=Dm;try{return fm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",kp();var r=cp.current;cp.current=Dm;try{return Dp(e,t,n)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",kp(),Qp(e)},useState:function(e){Ap="useState",kp();var t=cp.current;cp.current=Dm;try{return $p(e)}finally{cp.current=t}},useDebugValue:function(e,t){Ap="useDebugValue",kp()},useDeferredValue:function(e){return Ap="useDeferredValue",kp(),mm(e)},useTransition:function(){return Ap="useTransition",kp(),wm()},useMutableSource:function(e,t,n){Ap="useMutableSource",kp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",kp(),Up(e,t,n)},useId:function(){return Ap="useId",kp(),Mm()},unstable_isNewReconciler:B},Lm={readContext:function(e){return kd(e)},useCallback:function(e,t){return Ap="useCallback",Sp(),hm(e,t)},useContext:function(e){return Ap="useContext",Sp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",Sp(),tm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",Sp(),lm(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",Sp(),rm(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",Sp(),om(e,t)},useMemo:function(e,t){Ap="useMemo",Sp();var n=cp.current;cp.current=Dm;try{return fm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",Sp();var r=cp.current;cp.current=Dm;try{return Dp(e,t,n)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",Sp(),Qp(e)},useState:function(e){Ap="useState",Sp();var t=cp.current;cp.current=Dm;try{return $p(e)}finally{cp.current=t}},useDebugValue:function(e,t){Ap="useDebugValue",Sp()},useDeferredValue:function(e){return Ap="useDeferredValue",Sp(),mm(e)},useTransition:function(){return Ap="useTransition",Sp(),wm()},useMutableSource:function(e,t,n){Ap="useMutableSource",Sp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",Sp(),Up(e,t,n)},useId:function(){return Ap="useId",Sp(),Mm()},unstable_isNewReconciler:B},Im={readContext:function(e){return kd(e)},useCallback:function(e,t){return Ap="useCallback",Sp(),dm(e,t)},useContext:function(e){return Ap="useContext",Sp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",Sp(),nm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",Sp(),um(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",Sp(),im(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",Sp(),sm(e,t)},useMemo:function(e,t){Ap="useMemo",Sp();var n=cp.current;cp.current=jm;try{return pm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",Sp();var r=cp.current;cp.current=jm;try{return jp(e)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",Sp(),Jp()},useState:function(e){Ap="useState",Sp();var t=cp.current;cp.current=jm;try{return Yp()}finally{cp.current=t}},useDebugValue:function(e,t){return Ap="useDebugValue",Sp(),cm()},useDeferredValue:function(e){return Ap="useDeferredValue",Sp(),gm(e)},useTransition:function(){return Ap="useTransition",Sp(),Am()},useMutableSource:function(e,t,n){Ap="useMutableSource",Sp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",Sp(),qp(e,t)},useId:function(){return Ap="useId",Sp(),km()},unstable_isNewReconciler:B},Bm={readContext:function(e){return kd(e)},useCallback:function(e,t){return Ap="useCallback",Sp(),dm(e,t)},useContext:function(e){return Ap="useContext",Sp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",Sp(),nm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",Sp(),um(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",Sp(),im(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",Sp(),sm(e,t)},useMemo:function(e,t){Ap="useMemo",Sp();var n=cp.current;cp.current=Fm;try{return pm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",Sp();var r=cp.current;cp.current=Fm;try{return Fp(e)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",Sp(),Jp()},useState:function(e){Ap="useState",Sp();var t=cp.current;cp.current=Fm;try{return Gp()}finally{cp.current=t}},useDebugValue:function(e,t){return Ap="useDebugValue",Sp(),cm()},useDeferredValue:function(e){return Ap="useDeferredValue",Sp(),vm(e)},useTransition:function(){return Ap="useTransition",Sp(),_m()},useMutableSource:function(e,t,n){Ap="useMutableSource",Sp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",Sp(),qp(e,t)},useId:function(){return Ap="useId",Sp(),km()},unstable_isNewReconciler:B},Dm={readContext:function(e){return Um(),kd(e)},useCallback:function(e,t){return Ap="useCallback",qm(),kp(),hm(e,t)},useContext:function(e){return Ap="useContext",qm(),kp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",qm(),kp(),tm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",qm(),kp(),lm(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",qm(),kp(),rm(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",qm(),kp(),om(e,t)},useMemo:function(e,t){Ap="useMemo",qm(),kp();var n=cp.current;cp.current=Dm;try{return fm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",qm(),kp();var r=cp.current;cp.current=Dm;try{return Dp(e,t,n)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",qm(),kp(),Qp(e)},useState:function(e){Ap="useState",qm(),kp();var t=cp.current;cp.current=Dm;try{return $p(e)}finally{cp.current=t}},useDebugValue:function(e,t){Ap="useDebugValue",qm(),kp()},useDeferredValue:function(e){return Ap="useDeferredValue",qm(),kp(),mm(e)},useTransition:function(){return Ap="useTransition",qm(),kp(),wm()},useMutableSource:function(e,t,n){Ap="useMutableSource",qm(),kp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",qm(),kp(),Up(e,t,n)},useId:function(){return Ap="useId",qm(),kp(),Mm()},unstable_isNewReconciler:B},jm={readContext:function(e){return Um(),kd(e)},useCallback:function(e,t){return Ap="useCallback",qm(),Sp(),dm(e,t)},useContext:function(e){return Ap="useContext",qm(),Sp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",qm(),Sp(),nm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",qm(),Sp(),um(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",qm(),Sp(),im(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",qm(),Sp(),sm(e,t)},useMemo:function(e,t){Ap="useMemo",qm(),Sp();var n=cp.current;cp.current=jm;try{return pm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",qm(),Sp();var r=cp.current;cp.current=jm;try{return jp(e)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",qm(),Sp(),Jp()},useState:function(e){Ap="useState",qm(),Sp();var t=cp.current;cp.current=jm;try{return Yp()}finally{cp.current=t}},useDebugValue:function(e,t){return Ap="useDebugValue",qm(),Sp(),cm()},useDeferredValue:function(e){return Ap="useDeferredValue",qm(),Sp(),gm(e)},useTransition:function(){return Ap="useTransition",qm(),Sp(),Am()},useMutableSource:function(e,t,n){Ap="useMutableSource",qm(),Sp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",qm(),Sp(),qp(e,t)},useId:function(){return Ap="useId",qm(),Sp(),km()},unstable_isNewReconciler:B},Fm={readContext:function(e){return Um(),kd(e)},useCallback:function(e,t){return Ap="useCallback",qm(),Sp(),dm(e,t)},useContext:function(e){return Ap="useContext",qm(),Sp(),kd(e)},useEffect:function(e,t){return Ap="useEffect",qm(),Sp(),nm(e,t)},useImperativeHandle:function(e,t,n){return Ap="useImperativeHandle",qm(),Sp(),um(e,t,n)},useInsertionEffect:function(e,t){return Ap="useInsertionEffect",qm(),Sp(),im(e,t)},useLayoutEffect:function(e,t){return Ap="useLayoutEffect",qm(),Sp(),sm(e,t)},useMemo:function(e,t){Ap="useMemo",qm(),Sp();var n=cp.current;cp.current=jm;try{return pm(e,t)}finally{cp.current=n}},useReducer:function(e,t,n){Ap="useReducer",qm(),Sp();var r=cp.current;cp.current=jm;try{return Fp(e)}finally{cp.current=r}},useRef:function(e){return Ap="useRef",qm(),Sp(),Jp()},useState:function(e){Ap="useState",qm(),Sp();var t=cp.current;cp.current=jm;try{return Gp()}finally{cp.current=t}},useDebugValue:function(e,t){return Ap="useDebugValue",qm(),Sp(),cm()},useDeferredValue:function(e){return Ap="useDeferredValue",qm(),Sp(),vm(e)},useTransition:function(){return Ap="useTransition",qm(),Sp(),_m()},useMutableSource:function(e,t,n){Ap="useMutableSource",qm(),Sp()},useSyncExternalStore:function(e,t,n){return Ap="useSyncExternalStore",qm(),Sp(),qp(e,t)},useId:function(){return Ap="useId",qm(),Sp(),km()},unstable_isNewReconciler:B};var zm=t.unstable_now,Hm=0,Km=-1,Vm=-1,Wm=-1,$m=!1,Ym=!1;function Gm(){return $m}function Zm(){return Hm}function Qm(){Hm=zm()}function Jm(e){Vm=zm(),e.actualStartTime<0&&(e.actualStartTime=zm())}function Xm(e){Vm=-1}function eg(e,t){if(Vm>=0){var n=zm()-Vm;e.actualDuration+=n,t&&(e.selfBaseDuration=n),Vm=-1}}function tg(e){if(Km>=0){var t=zm()-Km;Km=-1;for(var n=e.return;null!==n;){switch(n.tag){case h:case _:return void(n.stateNode.effectDuration+=t)}n=n.return}}}function ng(e){if(Wm>=0){var t=zm()-Wm;Wm=-1;for(var n=e.return;null!==n;){switch(n.tag){case h:var r=n.stateNode;return void(null!==r&&(r.passiveEffectDuration+=t));case _:var i=n.stateNode;return void(null!==i&&(i.passiveEffectDuration+=t))}n=n.return}}}function rg(){Km=zm()}function ig(){Wm=zm()}function og(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function sg(e,t){return{value:e,source:t,stack:ct(t),digest:null}}function ag(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function lg(e,t){try{var n=t.value,r=t.source,i=t.stack,o=null!==i?i:"";if(null!=n&&n._suppressLogging){if(e.tag===l)return;console.error(n)}var s=r?pt(r):null,a=(s?"The above error occurred in the <"+s+"> component:":"The above error occurred in one of your React components:")+"\n"+o+"\n\n"+(e.tag===h?"Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.":"React will try to recreate this component tree from scratch using the error boundary you provided, "+(pt(e)||"Anonymous")+".");console.error(a)}catch(e){setTimeout((function(){throw e}))}}var ug="function"==typeof WeakMap?WeakMap:Map;function cg(e,t,n){var r=qd(Wo,n);r.tag=Dd,r.payload={element:null};var i=t.value;return r.callback=function(){Gb(i),lg(e,t)},r}function hg(e,t,n){var r=qd(Wo,n);r.tag=Dd;var i=e.type.getDerivedStateFromError;if("function"==typeof i){var s=t.value;r.payload=function(){return i(s)},r.callback=function(){_w(e),lg(e,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(r.callback=function(){_w(e),lg(e,t),"function"!=typeof i&&(this,null===ib?ib=new Set([this]):ib.add(this));var n=t.value,r=t.stack;this.componentDidCatch(n,{componentStack:null!==r?r:""}),"function"!=typeof i&&(ls(e.lanes,uo)||o("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",pt(e)||"Unknown"))}),r}function dg(e,t,n){var r,i=e.pingCache;if(null===i?(i=e.pingCache=new ug,r=new Set,i.set(t,r)):void 0===(r=i.get(t))&&(r=new Set,i.set(t,r)),!r.has(n)){r.add(n);var o=Jb.bind(null,e,t,n);Di&&uw(e,n),t.then(o,o)}}function fg(e){var t=e;do{if(t.tag===E&&Jf(t))return t;t=t.return}while(null!==t);return null}function pg(e,t,n,r,i){if((e.mode&Xi)===Ji){if(e===t)e.flags|=Qr;else{if(e.flags|=Ur,n.flags|=Jr,n.flags&=~(Yr|Zr),n.tag===l)if(null===n.alternate)n.tag=x;else{var o=qd(Wo,uo);o.tag=Bd,zd(n,o,uo)}n.lanes=cs(n.lanes,uo)}return e}return e.flags|=Qr,e.lanes=i,e}function mg(e,t,n,r,i){if(n.flags|=Zr,Di&&uw(e,i),null!==r&&"object"==typeof r&&"function"==typeof r.then){var o=r;!function(e,t){var n=e.tag;if((e.mode&Xi)===Ji&&(n===a||n===A||n===k)){var r=e.alternate;r?(e.updateQueue=r.updateQueue,e.memoizedState=r.memoizedState,e.lanes=r.lanes):(e.updateQueue=null,e.memoizedState=null)}}(n),Gh()&&n.mode&Xi&&Ih();var s=fg(t);if(null!==s)return s.flags&=~qr,pg(s,t,n,0,i),s.mode&Xi&&dg(e,o,i),void function(e,t,n,r){var i=e.updateQueue;if(null===i){var o=new Set;o.add(n),e.updateQueue=o}else i.add(n)}(s,0,o);if((i&uo)===ao)return dg(e,o,i),void Ub();r=new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.")}else if(Gh()&&n.mode&Xi){Ih();var u=fg(t);if(null!==u)return(u.flags&Qr)===Nr&&(u.flags|=qr),pg(u,t,n,0,i),void Zh(sg(r,n))}!function(e){zy!==Ny&&(zy=Ry),null===$y?$y=[e]:$y.push(e)}(r=sg(r,n));var c=t;do{switch(c.tag){case h:var d=r;c.flags|=Qr;var f=os(i);return c.lanes=cs(c.lanes,f),void Kd(c,cg(c,d,f));case l:var p=r,m=c.type,g=c.stateNode;if((c.flags&Ur)===Nr&&("function"==typeof m.getDerivedStateFromError||null!==g&&"function"==typeof g.componentDidCatch&&!Yb(g))){c.flags|=Qr;var v=os(i);return c.lanes=cs(c.lanes,v),void Kd(c,hg(c,p,v))}}c=c.return}while(null!==c)}var gg,vg,yg,bg,wg,Ag,_g,Eg,Mg=n.ReactCurrentOwner,kg=!1;function Sg(e,t,n,r){t.child=null===e?Of(t,null,n,r):Tf(t,e.child,n,r)}function xg(e,t,n,r,i){if(t.type!==t.elementType){var o=n.propTypes;o&&Dc(o,r,"prop",dt(n))}var s,a,l=n.render,u=t.ref;if(Md(t,i),zi(t),Mg.current=t,_t(!0),s=Op(e,t,l,r,u,i),a=Rp(),t.mode&to){ji(!0);try{s=Op(e,t,l,r,u,i),a=Rp()}finally{ji(!1)}}return _t(!1),Hi(),null===e||kg?(Gh()&&a&&kh(t),t.flags|=Lr,Sg(e,t,s,i),t.child):(Pp(e,t,i),rv(e,t,i))}function Cg(e,t,n,r,i){if(null===e){var o,s=n.type;if(function(e){return"function"==typeof e&&!Pw(e)&&void 0===e.defaultProps}(s)&&null===n.compare&&void 0===n.defaultProps)return o=yw(s),t.tag=k,t.type=o,Dg(t,s),Tg(e,t,o,r,i);var a=s.propTypes;a&&Dc(a,r,"prop",dt(s));var l=Iw(n.type,null,r,t,t.mode,i);return l.ref=t.ref,l.return=t,t.child=l,l}var u=n.type,c=u.propTypes;c&&Dc(c,r,"prop",dt(u));var h=e.child;if(!iv(e,i)){var d=h.memoizedProps,f=n.compare;if((f=null!==f?f:vl)(d,r)&&e.ref===t.ref)return rv(e,t,i)}t.flags|=Lr;var p=Nw(h,r);return p.ref=t.ref,p.return=t,t.child=p,p}function Tg(e,t,n,r,i){if(t.type!==t.elementType){var o=t.elementType;if(o.$$typeof===Fe){var s=o,a=s._payload,l=s._init;try{o=l(a)}catch(e){o=null}var u=o&&o.propTypes;u&&Dc(u,r,"prop",dt(o))}}if(null!==e){var c=e.memoizedProps;if(vl(c,r)&&e.ref===t.ref&&t.type===e.type){if(kg=!1,t.pendingProps=r=c,!iv(e,i))return t.lanes=e.lanes,rv(e,t,i);(e.flags&Jr)!==Nr&&(kg=!0)}}return Pg(e,t,n,r,i)}function Og(e,t,n){var r,i=t.pendingProps,o=i.children,s=null!==e?e.memoizedState:null;if("hidden"===i.mode||j)if((t.mode&Xi)===Ji){var a={baseLanes:ao,cachePool:null,transitions:null};t.memoizedState=a,Nb(t,n)}else{if(!ls(n,Ko)){var l;l=null!==s?cs(s.baseLanes,n):n,t.lanes=t.childLanes=Ko;var u={baseLanes:l,cachePool:null,transitions:null};return t.memoizedState=u,t.updateQueue=null,Nb(t,l),null}var c={baseLanes:ao,cachePool:null,transitions:null};t.memoizedState=c,Nb(t,null!==s?s.baseLanes:n)}else null!==s?(r=cs(s.baseLanes,n),t.memoizedState=null):r=n,Nb(t,r);return Sg(e,t,o,n),t.child}function Rg(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=zr,t.flags|=ei)}function Pg(e,t,n,r,i){if(t.type!==t.elementType){var o=n.propTypes;o&&Dc(o,r,"prop",dt(n))}var s,a,l;if(s=Qc(t,Gc(0,n,!0)),Md(t,i),zi(t),Mg.current=t,_t(!0),a=Op(e,t,n,r,s,i),l=Rp(),t.mode&to){ji(!0);try{a=Op(e,t,n,r,s,i),l=Rp()}finally{ji(!1)}}return _t(!1),Hi(),null===e||kg?(Gh()&&l&&kh(t),t.flags|=Lr,Sg(e,t,a,i),t.child):(Pp(e,t,i),rv(e,t,i))}function Ng(e,t,n,r,i){switch(cA(t)){case!1:var s=t.stateNode,a=new t.type(t.memoizedProps,s.context).state;s.updater.enqueueSetState(s,a,null);break;case!0:t.flags|=Ur,t.flags|=Qr;var l=new Error("Simulated error coming from DevTools"),u=os(i);t.lanes=cs(t.lanes,u),Kd(t,hg(t,sg(l,t),u))}if(t.type!==t.elementType){var c=n.propTypes;c&&Dc(c,r,"prop",dt(n))}var h,d;Xc(n)?(h=!0,ih(t)):h=!1,Md(t,i),null===t.stateNode?(nv(e,t),Af(t,n,r),Ef(t,n,r,i),d=!0):d=null===e?function(e,t,n,r){var i=e.stateNode,o=e.memoizedProps;i.props=o;var s,a=i.context,l=t.contextType;s="object"==typeof l&&null!==l?kd(l):Qc(e,Gc(0,t,!0));var u=t.getDerivedStateFromProps,c="function"==typeof u||"function"==typeof i.getSnapshotBeforeUpdate;c||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||o===n&&a===s||_f(e,i,n,s),Yd();var h=e.memoizedState,d=i.state=h;if(Wd(e,n,i,r),d=e.memoizedState,o===n&&h===d&&!Jc()&&!Gd()){if("function"==typeof i.componentDidMount){var f=Br;f|=ti,(e.mode&no)!==Ji&&(f|=ri),e.flags|=f}return!1}"function"==typeof u&&(hf(e,t,u,n),d=e.memoizedState);var p=Gd()||bf(e,t,o,n,h,d,s);if(p){if(c||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount){var m=Br;m|=ti,(e.mode&no)!==Ji&&(m|=ri),e.flags|=m}}else{if("function"==typeof i.componentDidMount){var g=Br;g|=ti,(e.mode&no)!==Ji&&(g|=ri),e.flags|=g}e.memoizedProps=n,e.memoizedState=d}return i.props=n,i.state=d,i.context=s,p}(t,n,r,i):function(e,t,n,r,i){var o=t.stateNode;Ud(e,t);var s=t.memoizedProps,a=t.type===t.elementType?s:cd(t.type,s);o.props=a;var l,u=t.pendingProps,c=o.context,h=n.contextType;l="object"==typeof h&&null!==h?kd(h):Qc(t,Gc(0,n,!0));var d=n.getDerivedStateFromProps,f="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||s===u&&c===l||_f(t,o,r,l),Yd();var p=t.memoizedState,m=o.state=p;if(Wd(t,r,o,i),m=t.memoizedState,s===u&&p===m&&!Jc()&&!Gd()&&!D)return"function"==typeof o.componentDidUpdate&&(s===e.memoizedProps&&p===e.memoizedState||(t.flags|=Br)),"function"==typeof o.getSnapshotBeforeUpdate&&(s===e.memoizedProps&&p===e.memoizedState||(t.flags|=Hr)),!1;"function"==typeof d&&(hf(t,n,d,r),m=t.memoizedState);var g=Gd()||bf(t,n,a,r,p,m,l)||D;return g?(f||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=Br),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=Hr)):("function"==typeof o.componentDidUpdate&&(s===e.memoizedProps&&p===e.memoizedState||(t.flags|=Br)),"function"==typeof o.getSnapshotBeforeUpdate&&(s===e.memoizedProps&&p===e.memoizedState||(t.flags|=Hr)),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,g}(e,t,n,r,i);var f=Lg(e,t,n,d,h,i),p=t.stateNode;return d&&p.props!==r&&(Ag||o("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",pt(t)||"a component"),Ag=!0),f}function Lg(e,t,n,r,i,o){Rg(e,t);var s=(t.flags&Ur)!==Nr;if(!r&&!s)return i&&oh(t,n,!1),rv(e,t,o);var a,l=t.stateNode;if(Mg.current=t,s&&"function"!=typeof n.getDerivedStateFromError)a=null,Xm();else{if(zi(t),_t(!0),a=l.render(),t.mode&to){ji(!0);try{l.render()}finally{ji(!1)}}_t(!1),Hi()}return t.flags|=Lr,null!==e&&s?function(e,t,n,r){t.child=Tf(t,e.child,null,r),t.child=Tf(t,null,n,r)}(e,t,a,o):Sg(e,t,a,o),t.memoizedState=l.state,i&&oh(t,n,!0),t.child}function Ig(e){var t=e.stateNode;t.pendingContext?nh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nh(e,t.context,!1),jf(e,t.containerInfo)}function Bg(e,t,n,r,i){return $h(),Zh(i),t.flags|=qr,Sg(e,t,n,r),t.child}function Dg(e,t){if(t&&t.childContextTypes&&o("%s(...): childContextTypes cannot be defined on a function component.",t.displayName||t.name||"Component"),null!==e.ref){var n="",r=yt();r&&(n+="\n\nCheck the render method of `"+r+"`.");var i=r||"",s=e._debugSource;s&&(i=s.fileName+":"+s.lineNumber),wg[i]||(wg[i]=!0,o("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",n))}if("function"==typeof t.getDerivedStateFromProps){var a=dt(t)||"Unknown";bg[a]||(o("%s: Function components do not support getDerivedStateFromProps.",a),bg[a]=!0)}if("object"==typeof t.contextType&&null!==t.contextType){var l=dt(t)||"Unknown";yg[l]||(o("%s: Function components do not support contextType.",l),yg[l]=!0)}}gg={},vg={},yg={},bg={},wg={},Ag=!1,_g={},Eg={};var jg={dehydrated:null,treeContext:null,retryLane:lo};function Fg(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ug(e,t,n){var r=t.pendingProps;hA(t)&&(t.flags|=Ur);var i=Wf.current,s=!1,a=(t.flags&Ur)!==Nr;if(a||function(e,t,n,r){return(null===t||null!==t.memoizedState)&&$f(e,Vf)}(i,e)?(s=!0,t.flags&=~Ur):null!==e&&null===e.memoizedState||(i|=Kf),Zf(t,i=Yf(i)),null===e){Hh(t);var l=t.memoizedState;if(null!==l){var u=l.dehydrated;if(null!==u)return function(e,t,n){return(e.mode&Xi)===Ji?(o("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),e.lanes=uo):fc(t)?e.lanes=fo:e.lanes=Ko,null}(t,u)}var c=r.children,h=r.fallback;if(s){var d=function(e,t,n,r){var i,o,s=e.mode,a=e.child,l={mode:"hidden",children:t};return(s&Xi)===Ji&&null!==a?((i=a).childLanes=ao,i.pendingProps=l,e.mode&eo&&(i.actualDuration=0,i.actualStartTime=-1,i.selfBaseDuration=0,i.treeBaseDuration=0),o=Dw(n,s,r,null)):(i=zg(l,s),o=Dw(n,s,r,null)),i.return=e,o.return=e,i.sibling=o,e.child=i,o}(t,c,h,n);return t.child.memoizedState=Fg(n),t.memoizedState=jg,d}return qg(t,c)}var f=e.memoizedState;if(null!==f){var p=f.dehydrated;if(null!==p)return function(e,t,n,r,i,o,s){if(n){if(t.flags&qr)return t.flags&=~qr,Kg(e,t,s,ag(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering.")));if(null!==t.memoizedState)return t.child=e.child,t.flags|=Ur,null;var a=function(e,t,n,r,i){var o=t.mode,s=zg({mode:"visible",children:n},o),a=Dw(r,o,i,null);return a.flags|=Ir,s.return=t,a.return=t,s.sibling=a,t.child=s,(t.mode&Xi)!==Ji&&Tf(t,e.child,null,i),a}(e,t,r.children,r.fallback,s);return t.child.memoizedState=Fg(s),t.memoizedState=jg,a}if(Lh(),(t.mode&Xi)===Ji)return Kg(e,t,s,null);if(fc(i)){var l,u,c,h=function(e){var t,n,r,i=e.nextSibling&&e.nextSibling.dataset;return i&&(t=i.dgst,n=i.msg,r=i.stck),{message:n,digest:t,stack:r}}(i);return l=h.digest,u=h.message,c=h.stack,Kg(e,t,s,ag(u?new Error(u):new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),l,c))}var d=ls(s,e.childLanes);if(kg||d){var f=wb();if(null!==f){var p=function(e,t){var n;switch(is(t)){case ho:n=co;break;case po:n=fo;break;case vo:case yo:case bo:case wo:case Ao:case _o:case Eo:case Mo:case ko:case So:case xo:case Co:case To:case Oo:case Ro:case Po:case Lo:case Io:case Bo:case Do:case jo:n=mo;break;case Ho:n=zo;break;default:n=lo}return(n&(e.suspendedLanes|t))!==lo?lo:n}(f,s);if(p!==lo&&p!==o.retryLane){o.retryLane=p;var m=Wo;Td(e,p),Eb(f,e,p,m)}}return Ub(),Kg(e,t,s,ag(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.")))}if(dc(i))return t.flags|=Ur,t.child=e.child,g=ew.bind(null,e),i._reactRetry=g,null;!function(e,t,n){Oh=pc(t.nextSibling),Th=e,Rh=!0,Nh=null,Ph=!1,null!==n&&function(e,t){Ch(),yh[bh++]=Ah,yh[bh++]=_h,yh[bh++]=wh,Ah=t.id,_h=t.overflow,wh=e}(e,n)}(t,i,o.treeContext);var g,v=qg(t,r.children);return v.flags|=Vr,v}(e,t,a,r,p,f,n)}if(s){var m=r.fallback,g=function(e,t,n,r,i){var o,s,a=t.mode,l=e.child,u=l.sibling,c={mode:"hidden",children:n};return(a&Xi)===Ji&&t.child!==l?((o=t.child).childLanes=ao,o.pendingProps=c,t.mode&eo&&(o.actualDuration=0,o.actualStartTime=-1,o.selfBaseDuration=l.selfBaseDuration,o.treeBaseDuration=l.treeBaseDuration),t.deletions=null):(o=Hg(l,c)).subtreeFlags=l.subtreeFlags&ui,null!==u?s=Nw(u,r):(s=Dw(r,a,i,null)).flags|=Ir,s.return=t,o.return=t,o.sibling=s,t.child=o,s}(e,t,r.children,m,n),v=t.child,y=e.child.memoizedState;return v.memoizedState=null===y?Fg(n):function(e,t){return{baseLanes:cs(e.baseLanes,t),cachePool:null,transitions:e.transitions}}(y,n),v.childLanes=function(e,t){return hs(e.childLanes,t)}(e,n),t.memoizedState=jg,g}var b=function(e,t,n,r){var i=e.child,o=i.sibling,s=Hg(i,{mode:"visible",children:n});if((t.mode&Xi)===Ji&&(s.lanes=r),s.return=t,s.sibling=null,null!==o){var a=t.deletions;null===a?(t.deletions=[o],t.flags|=Dr):a.push(o)}return t.child=s,s}(e,t,r.children,n);return t.memoizedState=null,b}function qg(e,t,n){var r=zg({mode:"visible",children:t},e.mode);return r.return=e,e.child=r,r}function zg(e,t,n){return jw(e,t,ao,null)}function Hg(e,t){return Nw(e,t)}function Kg(e,t,n,r){null!==r&&Zh(r),Tf(t,e.child,null,n);var i=qg(t,t.pendingProps.children);return i.flags|=Ir,t.memoizedState=null,i}function Vg(e,t,n){e.lanes=cs(e.lanes,t);var r=e.alternate;null!==r&&(r.lanes=cs(r.lanes,t)),_d(e.return,t,n)}function Wg(e,t){var n=Gt(e),r=!n&&"function"==typeof He(e);if(n||r){var i=n?"array":"iterable";return o("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",i,t,i),!1}return!0}function $g(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Yg(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail,a=r.children;!function(e){if(void 0!==e&&"forwards"!==e&&"backwards"!==e&&"together"!==e&&!_g[e])if(_g[e]=!0,"string"==typeof e)switch(e.toLowerCase()){case"together":case"forwards":case"backwards":o('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',e,e.toLowerCase());break;case"forward":case"backward":o('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',e,e.toLowerCase());break;default:o('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}else o('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',e)}(i),function(e,t){void 0===e||Eg[e]||("collapsed"!==e&&"hidden"!==e?(Eg[e]=!0,o('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',e)):"forwards"!==t&&"backwards"!==t&&(Eg[e]=!0,o('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',e)))}(s,i),function(e,t){if(("forwards"===t||"backwards"===t)&&null!=e&&!1!==e)if(Gt(e)){for(var n=0;n<e.length;n++)if(!Wg(e[n],n))return}else{var r=He(e);if("function"==typeof r){var i=r.call(e);if(i)for(var s=i.next(),a=0;!s.done;s=i.next()){if(!Wg(s.value,a))return;a++}}else o('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',t)}}(a,i),Sg(e,t,a,n);var l=Wf.current;if($f(l,Vf)?(l=Gf(l,Vf),t.flags|=Ur):(null!==e&&(e.flags&Ur)!==Nr&&function(e,t,n){for(var r=t;null!==r;){if(r.tag===E)null!==r.memoizedState&&Vg(r,n,e);else if(r.tag===T)Vg(r,n,e);else if(null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}(t,t.child,n),l=Yf(l)),Zf(t,l),(t.mode&Xi)===Ji)t.memoizedState=null;else switch(i){case"forwards":var u,c=function(e){for(var t=e,n=null;null!==t;){var r=t.alternate;null!==r&&null===Xf(r)&&(n=t),t=t.sibling}return n}(t.child);null===c?(u=t.child,t.child=null):(u=c.sibling,c.sibling=null),$g(t,!1,u,c,s);break;case"backwards":var h=null,d=t.child;for(t.child=null;null!==d;){var f=d.alternate;if(null!==f&&null===Xf(f)){t.child=d;break}var p=d.sibling;d.sibling=h,h=d,d=p}$g(t,!0,h,null,s);break;case"together":$g(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}var Gg,Zg,Qg,Jg,Xg=!1,ev=!1;function tv(){kg=!0}function nv(e,t){(t.mode&Xi)===Ji&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=Ir)}function rv(e,t,n){return null!==e&&(t.dependencies=e.dependencies),Xm(),Fb(t.lanes),ls(n,t.childLanes)?(function(e,t){if(null!==e&&t.child!==e.child)throw new Error("Resuming work not yet implemented.");if(null!==t.child){var n=t.child,r=Nw(n,n.pendingProps);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,(r=r.sibling=Nw(n,n.pendingProps)).return=t;r.sibling=null}}(e,t),t.child):null}function iv(e,t){return!!ls(e.lanes,t)}function ov(e,t,n){if(t._debugNeedsRemount&&null!==e)return function(e,t,n){var r=t.return;if(null===r)throw new Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,t===r.child)r.child=n;else{var i=r.child;if(null===i)throw new Error("Expected parent to have a child.");for(;i.sibling!==t;)if(null===(i=i.sibling))throw new Error("Expected to find the previous sibling.");i.sibling=n}var o=r.deletions;return null===o?(r.deletions=[e],r.flags|=Dr):o.push(e),n.flags|=Ir,n}(e,t,Iw(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes));if(null!==e)if(e.memoizedProps!==t.pendingProps||Jc()||t.type!==e.type)kg=!0;else{if(!iv(e,n)&&(t.flags&Ur)===Nr)return kg=!1,function(e,t,n){switch(t.tag){case h:Ig(t),t.stateNode,$h();break;case f:qf(t);break;case l:Xc(t.type)&&ih(t);break;case d:jf(t,t.stateNode.containerInfo);break;case b:var r=t.memoizedProps.value;wd(t,t.type._context,r);break;case _:ls(n,t.childLanes)&&(t.flags|=Br);var i=t.stateNode;i.effectDuration=0,i.passiveEffectDuration=0;break;case E:var o=t.memoizedState;if(null!==o){if(null!==o.dehydrated)return Zf(t,Yf(Wf.current)),t.flags|=Ur,null;if(ls(n,t.child.childLanes))return Ug(e,t,n);Zf(t,Yf(Wf.current));var s=rv(e,t,n);return null!==s?s.sibling:null}Zf(t,Yf(Wf.current));break;case T:var a=(e.flags&Ur)!==Nr,u=ls(n,t.childLanes);if(a){if(u)return Yg(e,t,n);t.flags|=Ur}var c=t.memoizedState;if(null!==c&&(c.rendering=null,c.tail=null,c.lastEffect=null),Zf(t,Wf.current),u)break;return null;case R:case P:return t.lanes=ao,Og(e,t,n)}return rv(e,t,n)}(e,t,n);kg=(e.flags&Jr)!==Nr}else if(kg=!1,Gh()&&function(e){return Ch(),(e.flags&Xr)!==Nr}(t)){var r=t.index;Mh(t,(Ch(),vh),r)}switch(t.lanes=ao,t.tag){case u:return function(e,t,n,r){nv(e,t);var i,s,u,c=t.pendingProps;if(i=Qc(t,Gc(0,n,!1)),Md(t,r),zi(t),n.prototype&&"function"==typeof n.prototype.render){var h=dt(n)||"Unknown";gg[h]||(o("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",h,h),gg[h]=!0)}if(t.mode&to&&Xh.recordLegacyContextWarning(t,null),_t(!0),Mg.current=t,s=Op(null,t,n,c,i,r),u=Rp(),_t(!1),Hi(),t.flags|=Lr,"object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof){var d=dt(n)||"Unknown";vg[d]||(o("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",d,d,d),vg[d]=!0)}if("object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof){var f=dt(n)||"Unknown";vg[f]||(o("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",f,f,f),vg[f]=!0),t.tag=l,t.memoizedState=null,t.updateQueue=null;var p=!1;return Xc(n)?(p=!0,ih(t)):p=!1,t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,Fd(t),wf(t,s),Ef(t,n,c,r),Lg(null,t,n,!0,p,r)}if(t.tag=a,t.mode&to){ji(!0);try{s=Op(null,t,n,c,i,r),u=Rp()}finally{ji(!1)}}return Gh()&&u&&kh(t),Sg(null,t,s,r),Dg(t,n),t.child}(e,t,t.type,n);case S:return function(e,t,n,r){nv(e,t);var i=t.pendingProps,o=n,s=o._payload,c=(0,o._init)(s);t.type=c;var h=t.tag=function(e){if("function"==typeof e)return Pw(e)?l:a;if(null!=e){var t=e.$$typeof;if(t===Ie)return A;if(t===je)return M}return u}(c),d=cd(c,i);switch(h){case a:return Dg(t,c),t.type=c=yw(c),Pg(null,t,c,d,r);case l:return t.type=c=bw(c),Ng(null,t,c,d,r);case A:return t.type=c=ww(c),xg(null,t,c,d,r);case M:if(t.type!==t.elementType){var f=c.propTypes;f&&Dc(f,d,"prop",dt(c))}return Cg(null,t,c,cd(c.type,d),r)}var p="";throw null!==c&&"object"==typeof c&&c.$$typeof===Fe&&(p=" Did you wrap a component in React.lazy() more than once?"),new Error("Element type is invalid. Received a promise that resolves to: "+c+". Lazy element type must resolve to a class or function."+p)}(e,t,t.elementType,n);case a:var i=t.type,s=t.pendingProps;return Pg(e,t,i,t.elementType===i?s:cd(i,s),n);case l:var c=t.type,y=t.pendingProps;return Ng(e,t,c,t.elementType===c?y:cd(c,y),n);case h:return function(e,t,n){if(Ig(t),null===e)throw new Error("Should have a current fiber. This is a bug in React.");var r=t.pendingProps,i=t.memoizedState,o=i.element;Ud(e,t),Wd(t,r,null,n);var s=t.memoizedState;t.stateNode;var a=s.element;if(i.isDehydrated){var l={element:a,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions};if(t.updateQueue.baseState=l,t.memoizedState=l,t.flags&qr)return Bg(e,t,a,n,sg(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),t));if(a!==o)return Bg(e,t,a,n,sg(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t));!function(e){var t=e.stateNode.containerInfo;Oh=pc(t.firstChild),Th=e,Rh=!0,Nh=null,Ph=!1}(t);var u=Of(t,null,a,n);t.child=u;for(var c=u;c;)c.flags=c.flags&~Ir|Vr,c=c.sibling}else{if($h(),a===o)return rv(e,t,n);Sg(e,t,a,n)}return t.child}(e,t,n);case f:return function(e,t,n){qf(t),null===e&&Hh(t);var r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children;return ec(r,i)?s=null:null!==o&&ec(r,o)&&(t.flags|=jr),Rg(e,t),Sg(e,t,s,n),t.child}(e,t,n);case p:return function(e,t){return null===e&&Hh(t),null}(e,t);case E:return Ug(e,t,n);case d:return function(e,t,n){jf(t,t.stateNode.containerInfo);var r=t.pendingProps;return null===e?t.child=Tf(t,null,r,n):Sg(e,t,r,n),t.child}(e,t,n);case A:var w=t.type,C=t.pendingProps;return xg(e,t,w,t.elementType===w?C:cd(w,C),n);case m:return function(e,t,n){return Sg(e,t,t.pendingProps,n),t.child}(e,t,n);case g:return function(e,t,n){return Sg(e,t,t.pendingProps.children,n),t.child}(e,t,n);case _:return function(e,t,n){t.flags|=Br;var r=t.stateNode;return r.effectDuration=0,r.passiveEffectDuration=0,Sg(e,t,t.pendingProps.children,n),t.child}(e,t,n);case b:return function(e,t,n){var r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value;"value"in i||Xg||(Xg=!0,o("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));var l=t.type.propTypes;if(l&&Dc(l,i,"prop","Context.Provider"),wd(t,r,a),null!==s){var u=s.value;if(gl(u,a)){if(s.children===i.children&&!Jc())return rv(e,t,n)}else Ed(t,r,n)}return Sg(e,t,i.children,n),t.child}(e,t,n);case v:return function(e,t,n){var r=t.type;void 0===r._context?r!==r.Consumer&&(ev||(ev=!0,o("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):r=r._context;var i=t.pendingProps.children;"function"!=typeof i&&o("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),Md(t,n);var s,a=kd(r);return zi(t),Mg.current=t,_t(!0),s=i(a),_t(!1),Hi(),t.flags|=Lr,Sg(e,t,s,n),t.child}(e,t,n);case M:var N=t.type,L=cd(N,t.pendingProps);if(t.type!==t.elementType){var I=N.propTypes;I&&Dc(I,L,"prop",dt(N))}return Cg(e,t,N,L=cd(N.type,L),n);case k:return Tg(e,t,t.type,t.pendingProps,n);case x:var B=t.type,D=t.pendingProps;return function(e,t,n,r,i){var o;return nv(e,t),t.tag=l,Xc(n)?(o=!0,ih(t)):o=!1,Md(t,i),Af(t,n,r),Ef(t,n,r,i),Lg(null,t,n,!0,o,i)}(e,t,B,t.elementType===B?D:cd(B,D),n);case T:return Yg(e,t,n);case O:break;case R:return Og(e,t,n)}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function sv(e){e.flags|=Br}function av(e){e.flags|=zr,e.flags|=ei}function lv(e,t){if(!Gh())switch(e.tailMode){case"hidden":for(var n=e.tail,r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":for(var i=e.tail,o=null;null!==i;)null!==i.alternate&&(o=i),i=i.sibling;null===o?t||null===e.tail?e.tail=null:e.tail.sibling=null:o.sibling=null}}function uv(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=ao,r=Nr;if(t){if((e.mode&eo)!==Ji){for(var i=e.selfBaseDuration,o=e.child;null!==o;)n=cs(n,cs(o.lanes,o.childLanes)),r|=o.subtreeFlags&ui,r|=o.flags&ui,i+=o.treeBaseDuration,o=o.sibling;e.treeBaseDuration=i}else for(var s=e.child;null!==s;)n=cs(n,cs(s.lanes,s.childLanes)),r|=s.subtreeFlags&ui,r|=s.flags&ui,s.return=e,s=s.sibling;e.subtreeFlags|=r}else{if((e.mode&eo)!==Ji){for(var a=e.actualDuration,l=e.selfBaseDuration,u=e.child;null!==u;)n=cs(n,cs(u.lanes,u.childLanes)),r|=u.subtreeFlags,r|=u.flags,a+=u.actualDuration,l+=u.treeBaseDuration,u=u.sibling;e.actualDuration=a,e.treeBaseDuration=l}else for(var c=e.child;null!==c;)n=cs(n,cs(c.lanes,c.childLanes)),r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;e.subtreeFlags|=r}return e.childLanes=n,t}function cv(e,t,n){if(Rh&&null!==Oh&&(t.mode&Xi)!==Ji&&(t.flags&Ur)===Nr)return Wh(t),$h(),t.flags|=qr|Zr|Qr,!1;var r=Vh(t);if(null!==n&&null!==n.dehydrated){if(null===e){if(!r)throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(function(e){var t=e.memoizedState,n=null!==t?t.dehydrated:null;if(!n)throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");!function(e,t){kc(t,e)}(n,e)}(t),uv(t),(t.mode&eo)!==Ji&&null!==n){var i=t.child;null!==i&&(t.treeBaseDuration-=i.treeBaseDuration)}return!1}if($h(),(t.flags&Ur)===Nr&&(t.memoizedState=null),t.flags|=Br,uv(t),(t.mode&eo)!==Ji&&null!==n){var o=t.child;null!==o&&(t.treeBaseDuration-=o.treeBaseDuration)}return!1}return Yh(),!0}function hv(e,t,n){var r=t.pendingProps;switch(xh(t),t.tag){case u:case S:case k:case a:case A:case m:case g:case _:case v:case M:return uv(t),null;case l:return Xc(t.type)&&eh(t),uv(t),null;case h:var i=t.stateNode;return Ff(t),th(t),sp(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(null===e||null===e.child)&&(Vh(t)?sv(t):null!==e&&(e.memoizedState.isDehydrated&&(t.flags&qr)===Nr||(t.flags|=Hr,Yh()))),Zg(e,t),uv(t),null;case f:zf(t);var o=Df(),s=t.type;if(null!==e&&null!=t.stateNode)Qg(e,t,s,r,o),e.ref!==t.ref&&av(t);else{if(!r){if(null===t.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return uv(t),null}var c=Uf();if(Vh(t))(function(e,t,n){var r=e.stateNode,i=!Ph,o=gc(r,e.type,e.memoizedProps,0,n,e,i);return e.updateQueue=o,null!==o})(t,0,c)&&sv(t);else{var y=Xu(s,r,o,c,t);Gg(y,t,!1,!1),t.stateNode=y,function(e,t,n,r,i){switch(Ru(e,t,n),t){case"button":case"input":case"select":case"textarea":return!!n.autoFocus;case"img":return!0;default:return!1}}(y,s,r)&&sv(t)}null!==t.ref&&av(t)}return uv(t),null;case p:var w=r;if(e&&null!=t.stateNode){var C=e.memoizedProps;Jg(e,t,C,w)}else{if("string"!=typeof w&&null===t.stateNode)throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var I=Df(),B=Uf();Vh(t)?function(e){var t=e.stateNode,n=e.memoizedProps,r=function(e,t,n,r){return kc(n,e),n.mode,function(e,t,n){return e.nodeValue!==t}(e,t)}(t,n,e);if(r){var i=Th;if(null!==i)switch(i.tag){case h:i.stateNode.containerInfo,function(e,t,n,r){xu(t.nodeValue,n,r,!0)}(0,t,n,(i.mode&Xi)!==Ji);break;case f:i.type;var o=i.memoizedProps;i.stateNode,function(e,t,n,r,i,o){!0!==t[Vu]&&xu(r.nodeValue,i,o,!0)}(0,o,0,t,n,(i.mode&Xi)!==Ji)}}return r}(t)&&sv(t):t.stateNode=function(e,t,n,r){Du(null,e,n.ancestorInfo);var i=function(e,t){return Cu(t).createTextNode(e)}(e,t);return kc(r,i),i}(w,I,B,t)}return uv(t),null;case E:Qf(t);var D=t.memoizedState;if((null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated)&&!cv(e,t,D))return t.flags&Qr?t:null;if((t.flags&Ur)!==Nr)return t.lanes=n,(t.mode&eo)!==Ji&&og(t),t;var U=null!==D;if(U!==(null!==e&&null!==e.memoizedState)&&U&&(t.child.flags|=Wr,(t.mode&Xi)!==Ji&&(null===e&&(!0!==t.memoizedProps.unstable_avoidThisFallback||!F)||$f(Wf.current,Kf)?zy===Ty&&(zy=Py):Ub())),null!==t.updateQueue&&(t.flags|=Br),uv(t),(t.mode&eo)!==Ji&&U){var q=t.child;null!==q&&(t.treeBaseDuration-=q.treeBaseDuration)}return null;case d:return Ff(t),Zg(e,t),null===e&&tu(t.stateNode.containerInfo),uv(t),null;case b:return Ad(t.type._context,t),uv(t),null;case x:return Xc(t.type)&&eh(t),uv(t),null;case T:Qf(t);var z=t.memoizedState;if(null===z)return uv(t),null;var H=(t.flags&Ur)!==Nr,K=z.rendering;if(null===K)if(H)lv(z,!1);else{if(zy!==Ty||null!==e&&(e.flags&Ur)!==Nr)for(var V=t.child;null!==V;){var W=Xf(V);if(null!==W){H=!0,t.flags|=Ur,lv(z,!1);var $=W.updateQueue;return null!==$&&(t.updateQueue=$,t.flags|=Br),t.subtreeFlags=Nr,Rf(t,n),Zf(t,Gf(Wf.current,Vf)),t.child}V=V.sibling}null!==z.tail&&Mi()>tb()&&(t.flags|=Ur,H=!0,lv(z,!1),t.lanes=Fo)}else{if(!H){var Y=Xf(K);if(null!==Y){t.flags|=Ur,H=!0;var G=Y.updateQueue;if(null!==G&&(t.updateQueue=G,t.flags|=Br),lv(z,!0),null===z.tail&&"hidden"===z.tailMode&&!K.alternate&&!Gh())return uv(t),null}else 2*Mi()-z.renderingStartTime>tb()&&n!==Ko&&(t.flags|=Ur,H=!0,lv(z,!1),t.lanes=Fo)}if(z.isBackwards)K.sibling=t.child,t.child=K;else{var Z=z.last;null!==Z?Z.sibling=K:t.child=K,z.last=K}}if(null!==z.tail){var Q=z.tail;z.rendering=Q,z.tail=Q.sibling,z.renderingStartTime=Mi(),Q.sibling=null;var J=Wf.current;return Zf(t,J=H?Gf(J,Vf):Yf(J)),Q}return uv(t),null;case O:break;case R:case P:Lb(t);var X=null!==t.memoizedState;return null!==e&&(null!==e.memoizedState===X||j||(t.flags|=Wr)),X&&(t.mode&Xi)!==Ji?ls(Uy,Ko)&&(uv(t),t.subtreeFlags&(Ir|Br)&&(t.flags|=Wr)):uv(t),null;case N:case L:return null}throw new Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function dv(e,t,n){switch(xh(t),t.tag){case l:Xc(t.type)&&eh(t);var r=t.flags;return r&Qr?(t.flags=r&~Qr|Ur,(t.mode&eo)!==Ji&&og(t),t):null;case h:t.stateNode,Ff(t),th(t),sp();var i=t.flags;return(i&Qr)!==Nr&&(i&Ur)===Nr?(t.flags=i&~Qr|Ur,t):null;case f:return zf(t),null;case E:Qf(t);var o=t.memoizedState;if(null!==o&&null!==o.dehydrated){if(null===t.alternate)throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");$h()}var s=t.flags;return s&Qr?(t.flags=s&~Qr|Ur,(t.mode&eo)!==Ji&&og(t),t):null;case T:return Qf(t),null;case d:return Ff(t),null;case b:return Ad(t.type._context,t),null;case R:case P:return Lb(t),null;default:return null}}function fv(e,t,n){switch(xh(t),t.tag){case l:null!=t.type.childContextTypes&&eh(t);break;case h:t.stateNode,Ff(t),th(t),sp();break;case f:zf(t);break;case d:Ff(t);break;case E:case T:Qf(t);break;case b:Ad(t.type._context,t);break;case R:case P:Lb(t)}}Gg=function(e,t,n,r){for(var i,o,s=t.child;null!==s;){if(s.tag===f||s.tag===p)i=e,o=s.stateNode,i.appendChild(o);else if(s.tag===d);else if(null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)return;for(;null===s.sibling;){if(null===s.return||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Zg=function(e,t){},Qg=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var s=function(e,t,n,r,i,o){var s=o;if(typeof r.children!=typeof n.children&&("string"==typeof r.children||"number"==typeof r.children)){var a=""+r.children,l=ju(s.ancestorInfo,t);Du(null,a,l)}return Pu(e,t,n,r)}(t.stateNode,n,o,r,0,Uf());t.updateQueue=s,s&&sv(t)}},Jg=function(e,t,n,r){n!==r&&sv(t)};var pv=null;pv=new Set;var mv=!1,gv=!1,vv="function"==typeof WeakSet?WeakSet:Set,yv=null,bv=null,wv=null,Av=function(e,t){if(t.props=e.memoizedProps,t.state=e.memoizedState,e.mode&eo)try{rg(),t.componentWillUnmount()}finally{tg(e)}else t.componentWillUnmount()};function _v(e,t){try{Pv(rp,e)}catch(n){Qb(e,t,n)}}function Ev(e,t,n){try{Av(e,n)}catch(n){Qb(e,t,n)}}function Mv(e,t){try{Bv(e)}catch(n){Qb(e,t,n)}}function kv(e,t){var n=e.ref;if(null!==n)if("function"==typeof n){var r;try{if(H&&K&&e.mode&eo)try{rg(),r=n(null)}finally{tg(e)}else r=n(null)}catch(n){Qb(e,t,n)}"function"==typeof r&&o("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",pt(e))}else n.current=null}function Sv(e,t,n){try{n()}catch(n){Qb(e,t,n)}}var xv=!1;function Cv(e,t){(function(e){var t;Qu=Xs,t=kl(),Ju={focusedElem:t,selectionRange:Sl(t)?xl(t):null},ea(!1)})(e.containerInfo),yv=t,function(){for(;null!==yv;){var e=yv,t=e.child;(e.subtreeFlags&oi)!==Nr&&null!==t?(t.return=e,yv=t):Tv()}}();var n=xv;return xv=!1,n}function Tv(){for(;null!==yv;){var e=yv;At(e);try{Ov(e)}catch(t){Qb(e,e.return,t)}wt();var t=e.sibling;if(null!==t)return t.return=e.return,void(yv=t);yv=e.return}}function Ov(e){var t,n=e.alternate;if((e.flags&Hr)!==Nr){switch(At(e),e.tag){case a:case A:case k:break;case l:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,s=e.stateNode;e.type!==e.elementType||Ag||(s.props!==e.memoizedProps&&o("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",pt(e)||"instance"),s.state!==e.memoizedState&&o("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",pt(e)||"instance"));var u=s.getSnapshotBeforeUpdate(e.elementType===e.type?r:cd(e.type,r),i),c=pv;void 0!==u||c.has(e.type)||(c.add(e.type),o("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",pt(e))),s.__reactInternalSnapshotBeforeUpdate=u}break;case h:(t=e.stateNode.containerInfo).nodeType===mn?t.textContent="":t.nodeType===yn&&t.documentElement&&t.removeChild(t.documentElement);break;case f:case p:case d:case x:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}wt()}}function Rv(e,t,n){var r,i=t.updateQueue,o=null!==i?i.lastEffect:null;if(null!==o){var s=o.next,a=s;do{if((a.tag&e)===e){var l=a.destroy;a.destroy=void 0,void 0!==l&&((e&ip)!==ep?(r=t,null!==Ii&&"function"==typeof Ii.markComponentPassiveEffectUnmountStarted&&Ii.markComponentPassiveEffectUnmountStarted(r)):(e&rp)!==ep&&Vi(t),(e&np)!==ep&&pw(!0),Sv(t,n,l),(e&np)!==ep&&pw(!1),(e&ip)!==ep?null!==Ii&&"function"==typeof Ii.markComponentPassiveEffectUnmountStopped&&Ii.markComponentPassiveEffectUnmountStopped():(e&rp)!==ep&&Wi())}a=a.next}while(a!==s)}}function Pv(e,t){var n,r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var s=i.next,a=s;do{if((a.tag&e)===e){(e&ip)!==ep?(n=t,null!==Ii&&"function"==typeof Ii.markComponentPassiveEffectMountStarted&&Ii.markComponentPassiveEffectMountStarted(n)):(e&rp)!==ep&&Ki(t);var l=a.create;(e&np)!==ep&&pw(!0),a.destroy=l(),(e&np)!==ep&&pw(!1),(e&ip)!==ep?null!==Ii&&"function"==typeof Ii.markComponentPassiveEffectMountStopped&&Ii.markComponentPassiveEffectMountStopped():(e&rp)!==ep&&null!==Ii&&"function"==typeof Ii.markComponentLayoutEffectMountStopped&&Ii.markComponentLayoutEffectMountStopped();var u=a.destroy;if(void 0!==u&&"function"!=typeof u){var c;o("%s must not return anything besides a function, which is used for clean-up.%s",c=(a.tag&rp)!==Nr?"useLayoutEffect":(a.tag&np)!==Nr?"useInsertionEffect":"useEffect",null===u?" You returned null. If your effect does not require clean up, return undefined (or nothing).":"function"==typeof u.then?"\n\nIt looks like you wrote "+c+"(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n"+c+"(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching":" You returned: "+u)}}a=a.next}while(a!==s)}}function Nv(e,t){if((t.flags&Br)!==Nr&&t.tag===_){var n=t.stateNode.passiveEffectDuration,r=t.memoizedProps,i=r.id,o=r.onPostCommit,s=Zm(),a=null===t.alternate?"mount":"update";Gm()&&(a="nested-update"),"function"==typeof o&&o(i,a,n,s);var l=t.return;e:for(;null!==l;){switch(l.tag){case h:case _:l.stateNode.passiveEffectDuration+=n;break e}l=l.return}}}function Lv(e,t,n,r){if((n.flags&ai)!==Nr)switch(n.tag){case a:case A:case k:if(!gv)if(n.mode&eo)try{rg(),Pv(rp|tp,n)}finally{tg(n)}else Pv(rp|tp,n);break;case l:var i=n.stateNode;if(n.flags&Br&&!gv)if(null===t)if(n.type!==n.elementType||Ag||(i.props!==n.memoizedProps&&o("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",pt(n)||"instance"),i.state!==n.memoizedState&&o("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",pt(n)||"instance")),n.mode&eo)try{rg(),i.componentDidMount()}finally{tg(n)}else i.componentDidMount();else{var s=n.elementType===n.type?t.memoizedProps:cd(n.type,t.memoizedProps),u=t.memoizedState;if(n.type!==n.elementType||Ag||(i.props!==n.memoizedProps&&o("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",pt(n)||"instance"),i.state!==n.memoizedState&&o("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",pt(n)||"instance")),n.mode&eo)try{rg(),i.componentDidUpdate(s,u,i.__reactInternalSnapshotBeforeUpdate)}finally{tg(n)}else i.componentDidUpdate(s,u,i.__reactInternalSnapshotBeforeUpdate)}var c=n.updateQueue;null!==c&&(n.type!==n.elementType||Ag||(i.props!==n.memoizedProps&&o("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",pt(n)||"instance"),i.state!==n.memoizedState&&o("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",pt(n)||"instance")),Zd(0,c,i));break;case h:var m=n.updateQueue;if(null!==m){var g=null;if(null!==n.child)switch(n.child.tag){case f:case l:g=n.child.stateNode}Zd(0,m,g)}break;case f:var v=n.stateNode;null===t&&n.flags&Br&&function(e,t,n,r){switch(t){case"button":case"input":case"select":case"textarea":return void(n.autoFocus&&e.focus());case"img":n.src&&(e.src=n.src)}}(v,n.type,n.memoizedProps);break;case p:case d:break;case _:var y=n.memoizedProps,b=y.onCommit,w=y.onRender,M=n.stateNode.effectDuration,S=Zm(),C=null===t?"mount":"update";Gm()&&(C="nested-update"),"function"==typeof w&&w(n.memoizedProps.id,C,n.actualDuration,n.treeBaseDuration,n.actualStartTime,S),"function"==typeof b&&b(n.memoizedProps.id,C,M,S),I=n,lb.push(I),ob||(ob=!0,hw(Ci,(function(){return $b(),null})));var N=n.return;e:for(;null!==N;){switch(N.tag){case h:case _:N.stateNode.effectDuration+=M;break e}N=N.return}break;case E:!function(e,t){if(null===t.memoizedState){var n=t.alternate;if(null!==n){var r=n.memoizedState;if(null!==r){var i=r.dehydrated;null!==i&&function(e){Qs(e)}(i)}}}}(0,n);break;case T:case x:case O:case R:case P:case L:break;default:throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}var I;gv||n.flags&zr&&Bv(n)}function Iv(e){switch(e.tag){case a:case A:case k:if(e.mode&eo)try{rg(),_v(e,e.return)}finally{tg(e)}else _v(e,e.return);break;case l:var t=e.stateNode;"function"==typeof t.componentDidMount&&function(e,t,n){try{n.componentDidMount()}catch(n){Qb(e,t,n)}}(e,e.return,t),Mv(e,e.return);break;case f:Mv(e,e.return)}}function Bv(e){var t=e.ref;if(null!==t){var n,r=e.stateNode;if(e.tag,n=r,"function"==typeof t){var i;if(e.mode&eo)try{rg(),i=t(n)}finally{tg(e)}else i=t(n);"function"==typeof i&&o("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",pt(e))}else t.hasOwnProperty("current")||o("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",pt(e)),t.current=n}}function Dv(e){var t=e.alternate;if(null!==t&&(e.alternate=null,Dv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===f){var n=e.stateNode;null!==n&&function(e){delete e[bc],delete e[wc],delete e[_c],delete e[Ec],delete e[Mc]}(n)}e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jv(e){return e.tag===f||e.tag===h||e.tag===d}function Fv(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||jv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==f&&t.tag!==p&&t.tag!==C;){if(t.flags&Ir)continue e;if(null===t.child||t.tag===d)continue e;t.child.return=t,t=t.child}if(!(t.flags&Ir))return t.stateNode}}function Uv(e){var t=function(e){for(var t=e.return;null!==t;){if(jv(t))return t;t=t.return}throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}(e);switch(t.tag){case f:var n=t.stateNode;t.flags&jr&&(ac(n),t.flags&=~jr),zv(e,Fv(e),n);break;case h:case d:var r=t.stateNode.containerInfo;qv(e,Fv(e),r);break;default:throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function qv(e,t,n){var r=e.tag;if(r===f||r===p){var i=e.stateNode;t?function(e,t,n){e.nodeType===vn?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)}(n,i,t):function(e,t){var n;e.nodeType===vn?(n=e.parentNode).insertBefore(t,e):(n=e).appendChild(t),null==e._reactRootContainer&&null===n.onclick&&Ou(n)}(n,i)}else if(r===d);else{var o=e.child;if(null!==o){qv(o,t,n);for(var s=o.sibling;null!==s;)qv(s,t,n),s=s.sibling}}}function zv(e,t,n){var r=e.tag;if(r===f||r===p){var i=e.stateNode;t?function(e,t,n){e.insertBefore(t,n)}(n,i,t):function(e,t){e.appendChild(t)}(n,i)}else if(r===d);else{var o=e.child;if(null!==o){zv(o,t,n);for(var s=o.sibling;null!==s;)zv(s,t,n),s=s.sibling}}}var Hv=null,Kv=!1;function Vv(e,t,n){var r,i,o=t;e:for(;null!==o;){switch(o.tag){case f:Hv=o.stateNode,Kv=!1;break e;case h:case d:Hv=o.stateNode.containerInfo,Kv=!0;break e}o=o.return}if(null===Hv)throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");$v(e,t,n),Hv=null,Kv=!1,null!==(i=(r=n).alternate)&&(i.return=null),r.return=null}function Wv(e,t,n){for(var r=n.child;null!==r;)$v(e,t,r),r=r.sibling}function $v(e,t,n){switch(function(e){if(Li&&"function"==typeof Li.onCommitFiberUnmount)try{Li.onCommitFiberUnmount(Ni,e)}catch(e){Bi||(Bi=!0,o("React instrumentation encountered an error: %s",e))}}(n),n.tag){case f:gv||kv(n,t);case p:var r=Hv,i=Kv;return Hv=null,Wv(e,t,n),Kv=i,void(null!==(Hv=r)&&(Kv?(E=Hv,S=n.stateNode,E.nodeType===vn?E.parentNode.removeChild(S):E.removeChild(S)):function(e,t){e.removeChild(t)}(Hv,n.stateNode)));case C:return void(null!==Hv&&(Kv?function(e,t){e.nodeType===vn?lc(e.parentNode,t):e.nodeType===mn&&lc(e,t),Qs(e)}(Hv,n.stateNode):lc(Hv,n.stateNode)));case d:var s=Hv,u=Kv;return Hv=n.stateNode.containerInfo,Kv=!0,Wv(e,t,n),Hv=s,void(Kv=u);case a:case A:case M:case k:if(!gv){var c=n.updateQueue;if(null!==c){var h=c.lastEffect;if(null!==h){var m=h.next,g=m;do{var v=g,y=v.destroy,b=v.tag;void 0!==y&&((b&np)!==ep?Sv(n,t,y):(b&rp)!==ep&&(Vi(n),n.mode&eo?(rg(),Sv(n,t,y),tg(n)):Sv(n,t,y),Wi())),g=g.next}while(g!==m)}}}return void Wv(e,t,n);case l:if(!gv){kv(n,t);var w=n.stateNode;"function"==typeof w.componentWillUnmount&&Ev(n,t,w)}return void Wv(e,t,n);case O:return void Wv(e,t,n);case R:if(n.mode&Xi){var _=gv;gv=_||null!==n.memoizedState,Wv(e,t,n),gv=_}else Wv(e,t,n);break;default:return void Wv(e,t,n)}var E,S}function Yv(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new vv),t.forEach((function(t){var r=tw.bind(null,e,t);if(!n.has(t)){if(n.add(t),Di){if(null===bv||null===wv)throw Error("Expected finished root and lanes to be set. This is a bug in React.");uw(wv,bv)}t.then(r,r)}}))}}function Gv(e,t,n){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{Vv(e,t,o)}catch(e){Qb(o,t,e)}}var s=gt;if(t.subtreeFlags&si)for(var a=t.child;null!==a;)At(a),Zv(a,e),a=a.sibling;At(s)}function Zv(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case a:case A:case M:case k:if(Gv(t,e),Qv(e),i&Br){try{Rv(np|tp,e,e.return),Pv(np|tp,e)}catch(t){Qb(e,e.return,t)}if(e.mode&eo){try{rg(),Rv(rp|tp,e,e.return)}catch(t){Qb(e,e.return,t)}tg(e)}else try{Rv(rp|tp,e,e.return)}catch(t){Qb(e,e.return,t)}}return;case l:return Gv(t,e),Qv(e),void(i&zr&&null!==r&&kv(r,r.return));case f:if(Gv(t,e),Qv(e),i&zr&&null!==r&&kv(r,r.return),e.flags&jr){var o=e.stateNode;try{ac(o)}catch(t){Qb(e,e.return,t)}}if(i&Br){var s=e.stateNode;if(null!=s){var u=e.memoizedProps,c=null!==r?r.memoizedProps:u,m=e.type,g=e.updateQueue;if(e.updateQueue=null,null!==g)try{!function(e,t,n,r,i,o){(function(e,t,n,r,i){switch("input"===n&&"radio"===i.type&&null!=i.name&&Ft(e,i),zn(n,r),function(e,t,n,r){for(var i=0;i<t.length;i+=2){var o=t[i],s=t[i+1];o===_u?Dn(e,s):o===vu?pn(e,s):o===Au?wn(e,s):xe(e,o,s,r)}}(e,t,0,zn(n,i)),n){case"input":Ut(e,i);break;case"textarea":on(e,i);break;case"select":!function(e,t){var n=e,r=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!t.multiple;var i=t.value;null!=i?Jt(n,!!t.multiple,i,!1):r!==!!t.multiple&&(null!=t.defaultValue?Jt(n,!!t.multiple,t.defaultValue,!0):Jt(n,!!t.multiple,t.multiple?[]:"",!1))}(e,i)}})(e,t,n,r,i),Nc(e,i)}(s,g,m,c,u)}catch(t){Qb(e,e.return,t)}}}return;case p:if(Gv(t,e),Qv(e),i&Br){if(null===e.stateNode)throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var v=e.stateNode,y=e.memoizedProps;null!==r&&r.memoizedProps;try{!function(e,t,n){e.nodeValue=n}(v,0,y)}catch(t){Qb(e,e.return,t)}}return;case h:if(Gv(t,e),Qv(e),i&Br&&null!==r&&r.memoizedState.isDehydrated)try{Qs(t.containerInfo)}catch(t){Qb(e,e.return,t)}return;case d:return Gv(t,e),void Qv(e);case E:Gv(t,e),Qv(e);var b=e.child;if(b.flags&Wr){var w=b.stateNode,_=null!==b.memoizedState;w.isHidden=_,_&&(null!==b.alternate&&null!==b.alternate.memoizedState||(Gy=Mi()))}if(i&Br){try{!function(e){e.memoizedState}(e)}catch(t){Qb(e,e.return,t)}Yv(e)}return;case R:var S=null!==r&&null!==r.memoizedState;if(e.mode&Xi){var x=gv;gv=x||S,Gv(t,e),gv=x}else Gv(t,e);if(Qv(e),i&Wr){var C=e.stateNode,N=null!==e.memoizedState,L=e;if(C.isHidden=N,N&&!S&&(L.mode&Xi)!==Ji){yv=L;for(var I=L.child;null!==I;)yv=I,ty(I),I=I.sibling}!function(e,t){for(var n=null,r=e;;){if(r.tag===f){if(null===n){n=r;try{var i=r.stateNode;t?uc(i):cc(r.stateNode,r.memoizedProps)}catch(t){Qb(e,e.return,t)}}}else if(r.tag===p){if(null===n)try{var o=r.stateNode;t?o.nodeValue="":hc(o,r.memoizedProps)}catch(t){Qb(e,e.return,t)}}else if((r.tag!==R&&r.tag!==P||null===r.memoizedState||r===e)&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===e)return;for(;null===r.sibling;){if(null===r.return||r.return===e)return;n===r&&(n=null),r=r.return}n===r&&(n=null),r.sibling.return=r.return,r=r.sibling}}(L,N)}return;case T:return Gv(t,e),Qv(e),void(i&Br&&Yv(e));case O:return;default:return Gv(t,e),void Qv(e)}}function Qv(e){var t=e.flags;if(t&Ir){try{Uv(e)}catch(t){Qb(e,e.return,t)}e.flags&=~Ir}t&Vr&&(e.flags&=~Vr)}function Jv(e,t,n){bv=n,wv=t,yv=e,Xv(e),bv=null,wv=null}function Xv(e,t,n){for(var r=(e.mode&Xi)!==Ji;null!==yv;){var i=yv,o=i.child;if(i.tag===R&&r){var s=null!==i.memoizedState||mv;if(s){ey(e);continue}var a=i.alternate,l=null!==a&&null!==a.memoizedState,u=mv,c=gv;mv=s,(gv=l||gv)&&!c&&(yv=i,ry(i));for(var h=o;null!==h;)yv=h,Xv(h),h=h.sibling;yv=i,mv=u,gv=c,ey(e)}else(i.subtreeFlags&ai)!==Nr&&null!==o?(o.return=i,yv=o):ey(e)}}function ey(e,t,n){for(;null!==yv;){var r=yv;if((r.flags&ai)!==Nr){var i=r.alternate;At(r);try{Lv(0,i,r)}catch(e){Qb(r,r.return,e)}wt()}if(r===e)return void(yv=null);var o=r.sibling;if(null!==o)return o.return=r.return,void(yv=o);yv=r.return}}function ty(e){for(;null!==yv;){var t=yv,n=t.child;switch(t.tag){case a:case A:case M:case k:if(t.mode&eo)try{rg(),Rv(rp,t,t.return)}finally{tg(t)}else Rv(rp,t,t.return);break;case l:kv(t,t.return);var r=t.stateNode;"function"==typeof r.componentWillUnmount&&Ev(t,t.return,r);break;case f:kv(t,t.return);break;case R:if(null!==t.memoizedState){ny(e);continue}}null!==n?(n.return=t,yv=n):ny(e)}}function ny(e){for(;null!==yv;){var t=yv;if(t===e)return void(yv=null);var n=t.sibling;if(null!==n)return n.return=t.return,void(yv=n);yv=t.return}}function ry(e){for(;null!==yv;){var t=yv,n=t.child;t.tag===R&&null!==t.memoizedState||null===n?iy(e):(n.return=t,yv=n)}}function iy(e){for(;null!==yv;){var t=yv;At(t);try{Iv(t)}catch(e){Qb(t,t.return,e)}if(wt(),t===e)return void(yv=null);var n=t.sibling;if(null!==n)return n.return=t.return,void(yv=n);yv=t.return}}function oy(e,t,n,r){for(;null!==yv;){var i=yv;if((i.flags&Kr)!==Nr){At(i);try{sy(0,i)}catch(e){Qb(i,i.return,e)}wt()}if(i===e)return void(yv=null);var o=i.sibling;if(null!==o)return o.return=i.return,void(yv=o);yv=i.return}}function sy(e,t,n,r){switch(t.tag){case a:case A:case k:if(t.mode&eo){ig();try{Pv(ip|tp,t)}finally{ng(t)}}else Pv(ip|tp,t)}}function ay(){for(;null!==yv;){var e=yv;(e.flags&Kr)!==Nr&&(At(e),ly(e),wt());var t=e.sibling;if(null!==t)return t.return=e.return,void(yv=t);yv=e.return}}function ly(e){switch(e.tag){case a:case A:case k:e.mode&eo?(ig(),Rv(ip|tp,e,e.return),ng(e)):Rv(ip|tp,e,e.return)}}function uy(e,t){for(;null!==yv;){var n=yv;At(n),hy(n,t),wt();var r=n.child;null!==r?(r.return=n,yv=r):cy(e)}}function cy(e){for(;null!==yv;){var t=yv,n=t.sibling,r=t.return;if(Dv(t),t===e)return void(yv=null);if(null!==n)return n.return=r,void(yv=n);yv=r}}function hy(e,t){switch(e.tag){case a:case A:case k:e.mode&eo?(ig(),Rv(ip,e,t),ng(e)):Rv(ip,e,t)}}function dy(e){switch(e.tag){case a:case A:case k:try{Pv(rp|tp,e)}catch(t){Qb(e,e.return,t)}break;case l:var t=e.stateNode;try{t.componentDidMount()}catch(t){Qb(e,e.return,t)}}}function fy(e){switch(e.tag){case a:case A:case k:try{Pv(ip|tp,e)}catch(t){Qb(e,e.return,t)}}}function py(e){switch(e.tag){case a:case A:case k:try{Rv(rp|tp,e,e.return)}catch(t){Qb(e,e.return,t)}break;case l:var t=e.stateNode;"function"==typeof t.componentWillUnmount&&Ev(e,e.return,t)}}function my(e){switch(e.tag){case a:case A:case k:try{Rv(ip|tp,e,e.return)}catch(t){Qb(e,e.return,t)}}}if("function"==typeof Symbol&&Symbol.for){var gy=Symbol.for;gy("selector.component"),gy("selector.has_pseudo_class"),gy("selector.role"),gy("selector.test_id"),gy("selector.text")}var vy=[],yy=n.ReactCurrentActQueue;function by(){var e="undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:void 0;return e||null===yy.current||o("The current testing environment is not configured to support act(...)"),e}var wy=Math.ceil,Ay=n.ReactCurrentDispatcher,_y=n.ReactCurrentOwner,Ey=n.ReactCurrentBatchConfig,My=n.ReactCurrentActQueue,ky=0,Sy=1,xy=2,Cy=4,Ty=0,Oy=1,Ry=2,Py=3,Ny=4,Ly=5,Iy=6,By=ky,Dy=null,jy=null,Fy=ao,Uy=ao,qy=zc(ao),zy=Ty,Hy=null,Ky=ao,Vy=ao,Wy=ao,$y=null,Yy=null,Gy=0,Zy=500,Qy=1/0,Jy=500,Xy=null;function eb(){Qy=Mi()+Jy}function tb(){return Qy}var nb=!1,rb=null,ib=null,ob=!1,sb=null,ab=ao,lb=[],ub=50,cb=0,hb=null,db=!1,fb=!1,pb=50,mb=0,gb=null,vb=Wo,yb=ao,bb=!1;function wb(){return Dy}function Ab(){return(By&(xy|Cy))!==ky?Mi():vb!==Wo?vb:vb=Mi()}function _b(e){if((e.mode&Xi)===Ji)return uo;if((By&xy)!==ky&&Fy!==ao)return os(Fy);if(Qh.transition!==Jh){if(null!==Ey.transition){var t=Ey.transition;t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e)}return yb===lo&&(yb=rs()),yb}var n,r=Ts();return r!==lo?r:void 0===(n=window.event)?Ss:sa(n.type)}function Eb(e,t,n,r){!function(){if(cb>ub)throw cb=0,hb=null,new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");mb>pb&&(mb=0,gb=null,o("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}(),bb&&o("useInsertionEffect must not schedule updates."),db&&(fb=!0),ps(e,n,r),(By&xy)!==ao&&e===Dy?function(e){if(vt&&!Em)switch(e.tag){case a:case A:case k:var t=jy&&pt(jy)||"Unknown",n=t;aw.has(n)||(aw.add(n),o("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",pt(e)||"Unknown",t,t));break;case l:lw||(o("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),lw=!0)}}(t):(Di&&vs(e,t,n),function(e){if(e.mode&Xi){if(!by())return}else{if(t="undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:void 0,"undefined"==typeof jest||!1===t)return;if(By!==ky)return;if(e.tag!==a&&e.tag!==A&&e.tag!==k)return}var t;if(null===My.current){var n=gt;try{At(e),o("An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act",pt(e))}finally{n?At(e):wt()}}}(t),e===Dy&&((By&xy)===ky&&(Vy=cs(Vy,n)),zy===Ny&&Cb(e,Fy)),Mb(e,r),n!==uo||By!==ky||(t.mode&Xi)!==Ji||My.isBatchingLegacy||(eb(),dh()))}function Mb(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.pendingLanes,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=n;s>0;){var a=ss(s),l=1<<a,u=o[a];u===Wo?(l&r)!==ao&&(l&i)===ao||(o[a]=Qo(l,t)):u<=t&&(e.expiredLanes|=l),s&=~l}}(e,t);var r=Zo(e,e===Dy?Fy:ao);if(r===ao)return null!==n&&dw(n),e.callbackNode=null,void(e.callbackPriority=lo);var i=is(r),s=e.callbackPriority;if(s!==i||null!==My.current&&n!==cw){var a,l;if(null!=n&&dw(n),i===uo)e.tag===sh?(null!==My.isBatchingLegacy&&(My.didScheduleLegacyUpdate=!0),l=Tb.bind(null,e),uh=!0,hh(l)):hh(Tb.bind(null,e)),null!==My.current?My.current.push(fh):oc((function(){(By&(xy|Cy))===ky&&fh()})),a=null;else{var u;switch(Ps(r)){case Ms:u=Si;break;case ks:u=xi;break;case Ss:u=Ci;break;case xs:u=Oi;break;default:u=Ci}a=hw(u,kb.bind(null,e))}e.callbackPriority=i,e.callbackNode=a}else null==n&&s!==uo&&o("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.")}function kb(e,t){if($m=!1,Ym=!1,vb=Wo,yb=ao,(By&(xy|Cy))!==ky)throw new Error("Should not already be working.");var n=e.callbackNode;if($b()&&e.callbackNode!==n)return null;var r=Zo(e,e===Dy?Fy:ao);if(r===ao)return null;var i=!ts(0,r)&&!function(e,t){return(t&e.expiredLanes)!==ao}(e,r)&&!t,o=i?function(e,t){var n=By;By|=xy;var r=Db();if(Dy!==e||Fy!==t){if(Di){var i=e.memoizedUpdaters;i.size>0&&(uw(e,Fy),i.clear()),ys(e,t)}Xy=null,eb(),Ib(e,t)}for(Gi(t);;)try{Hb();break}catch(t){Bb(e,t)}return vd(),jb(r),By=n,null!==jy?(null!==Ii&&"function"==typeof Ii.markRenderYielded&&Ii.markRenderYielded(),Ty):(Zi(),Dy=null,Fy=ao,zy)}(e,r):qb(e,r);if(o!==Ty){if(o===Ry){var s=Jo(e);s!==ao&&(r=s,o=Sb(e,s))}if(o===Oy){var a=Hy;throw Ib(e,ao),Cb(e,r),Mb(e,Mi()),a}if(o===Iy)Cb(e,r);else{var l=!ts(0,r),u=e.current.alternate;if(l&&!function(e){for(var t=e;;){if(t.flags&$r){var n=t.updateQueue;if(null!==n){var r=n.stores;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i],s=o.getSnapshot,a=o.value;try{if(!gl(s(),a))return!1}catch(e){return!1}}}}var l=t.child;if(t.subtreeFlags&$r&&null!==l)l.return=t,t=l;else{if(t===e)return!0;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(u)){if((o=qb(e,r))===Ry){var c=Jo(e);c!==ao&&(r=c,o=Sb(e,c))}if(o===Oy){var h=Hy;throw Ib(e,ao),Cb(e,r),Mb(e,Mi()),h}}e.finishedWork=u,e.finishedLanes=r,function(e,t,n){switch(t){case Ty:case Oy:throw new Error("Root did not complete. This is a bug in React.");case Ry:Wb(e,Yy,Xy);break;case Py:if(Cb(e,n),es(n)&&!fw()){var r=Gy+Zy-Mi();if(r>10){if(Zo(e,ao)!==ao)break;var i=e.suspendedLanes;if(!us(i,n)){Ab(),ms(e,i);break}e.timeoutHandle=tc(Wb.bind(null,e,Yy,Xy),r);break}}Wb(e,Yy,Xy);break;case Ny:if(Cb(e,n),function(e){return(e&go)===e}(n))break;if(!fw()){var o=function(e,t){for(var n=e.eventTimes,r=Wo;t>0;){var i=ss(t),o=1<<i,s=n[i];s>r&&(r=s),t&=~o}return r}(e,n),s=o,a=Mi()-s,l=((u=a)<120?120:u<480?480:u<1080?1080:u<1920?1920:u<3e3?3e3:u<4320?4320:1960*wy(u/1960))-a;if(l>10){e.timeoutHandle=tc(Wb.bind(null,e,Yy,Xy),l);break}}Wb(e,Yy,Xy);break;case Ly:Wb(e,Yy,Xy);break;default:throw new Error("Unknown root exit status.")}var u}(e,o,r)}}return Mb(e,Mi()),e.callbackNode===n?kb.bind(null,e):null}function Sb(e,t){var n=$y;Ns(e)&&(Ib(e,t).flags|=qr,o("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",e.containerInfo.nodeName.toLowerCase()));var r=qb(e,t);if(r!==Ry){var i=Yy;Yy=n,null!==i&&xb(i)}return r}function xb(e){null===Yy?Yy=e:Yy.push.apply(Yy,e)}function Cb(e,t){t=hs(t,Wy),function(e,t){e.suspendedLanes|=t,e.pingedLanes&=~t;for(var n=e.expirationTimes,r=t;r>0;){var i=ss(r),o=1<<i;n[i]=Wo,r&=~o}}(e,t=hs(t,Vy))}function Tb(e){if($m=Ym,Ym=!1,(By&(xy|Cy))!==ky)throw new Error("Should not already be working.");$b();var t=Zo(e,ao);if(!ls(t,uo))return Mb(e,Mi()),null;var n=qb(e,t);if(e.tag!==sh&&n===Ry){var r=Jo(e);r!==ao&&(t=r,n=Sb(e,r))}if(n===Oy){var i=Hy;throw Ib(e,ao),Cb(e,t),Mb(e,Mi()),i}if(n===Iy)throw new Error("Root did not complete. This is a bug in React.");var o=e.current.alternate;return e.finishedWork=o,e.finishedLanes=t,Wb(e,Yy,Xy),Mb(e,Mi()),null}function Ob(e,t){var n=By;By|=Sy;try{return e(t)}finally{(By=n)!==ky||My.isBatchingLegacy||(eb(),dh())}}function Rb(e){null!==sb&&sb.tag===sh&&(By&(xy|Cy))===ky&&$b();var t=By;By|=Sy;var n=Ey.transition,r=Ts();try{return Ey.transition=null,Os(Ms),e?e():void 0}finally{Os(r),Ey.transition=n,((By=t)&(xy|Cy))===ky&&fh()}}function Pb(){return(By&(xy|Cy))!==ky}function Nb(e,t){Kc(qy,Uy,e),Uy=cs(Uy,t)}function Lb(e){Uy=qy.current,Hc(qy,e)}function Ib(e,t){e.finishedWork=null,e.finishedLanes=ao;var n=e.timeoutHandle;if(n!==rc&&(e.timeoutHandle=rc,nc(n)),null!==jy)for(var r=jy.return;null!==r;)r.alternate,fv(0,r),r=r.return;Dy=e;var i=Nw(e.current,null);return jy=i,Fy=Uy=t,zy=Ty,Hy=null,Ky=ao,Vy=ao,Wy=ao,$y=null,Yy=null,function(){if(null!==Sd){for(var e=0;e<Sd.length;e++){var t=Sd[e],n=t.interleaved;if(null!==n){t.interleaved=null;var r=n.next,i=t.pending;if(null!==i){var o=i.next;i.next=r,n.next=o}t.pending=n}}Sd=null}}(),Xh.discardPendingWarnings(),i}function Bb(e,t){for(;;){var n=jy;try{if(vd(),Np(),wt(),_y.current=null,null===n||null===n.return)return zy=Oy,Hy=t,void(jy=null);H&&n.mode&eo&&eg(n,!0),z&&(Hi(),null!==t&&"object"==typeof t&&"function"==typeof t.then?Yi(n,t,Fy):$i(n,t,Fy)),mg(e,n.return,n,t,Fy),Vb(n)}catch(e){t=e,jy===n&&null!==n?(n=n.return,jy=n):n=jy;continue}return}}function Db(){var e=Ay.current;return Ay.current=Pm,null===e?Pm:e}function jb(e){Ay.current=e}function Fb(e){Ky=cs(e,Ky)}function Ub(){zy!==Ty&&zy!==Py&&zy!==Ry||(zy=Ny),null!==Dy&&(Xo(Ky)||Xo(Vy))&&Cb(Dy,Fy)}function qb(e,t){var n=By;By|=xy;var r=Db();if(Dy!==e||Fy!==t){if(Di){var i=e.memoizedUpdaters;i.size>0&&(uw(e,Fy),i.clear()),ys(e,t)}Xy=null,Ib(e,t)}for(Gi(t);;)try{zb();break}catch(t){Bb(e,t)}if(vd(),By=n,jb(r),null!==jy)throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return Zi(),Dy=null,Fy=ao,zy}function zb(){for(;null!==jy;)Kb(jy)}function Hb(){for(;null!==jy&&!_i();)Kb(jy)}function Kb(e){var t,n=e.alternate;At(e),(e.mode&eo)!==Ji?(Jm(e),t=iw(n,e,Uy),eg(e,!0)):t=iw(n,e,Uy),wt(),e.memoizedProps=e.pendingProps,null===t?Vb(e):jy=t,_y.current=null}function Vb(e){var t=e;do{var n=t.alternate,r=t.return;if((t.flags&Zr)===Nr){At(t);var i=void 0;if((t.mode&eo)===Ji?i=hv(n,t,Uy):(Jm(t),i=hv(n,t,Uy),eg(t,!1)),wt(),null!==i)return void(jy=i)}else{var o=dv(0,t);if(null!==o)return o.flags&=Gr,void(jy=o);if((t.mode&eo)!==Ji){eg(t,!1);for(var s=t.actualDuration,a=t.child;null!==a;)s+=a.actualDuration,a=a.sibling;t.actualDuration=s}if(null===r)return zy=Iy,void(jy=null);r.flags|=Zr,r.subtreeFlags=Nr,r.deletions=null}var l=t.sibling;if(null!==l)return void(jy=l);jy=t=r}while(null!==t);zy===Ty&&(zy=Ly)}function Wb(e,t,n){var r=Ts(),i=Ey.transition;try{Ey.transition=null,Os(Ms),function(e,t,n,r){do{$b()}while(null!==sb);if(Xh.flushLegacyContextWarning(),Xh.flushPendingUnsafeLifecycleWarnings(),(By&(xy|Cy))!==ky)throw new Error("Should not already be working.");var i=e.finishedWork,s=e.finishedLanes;if(function(e){null!==Ii&&"function"==typeof Ii.markCommitStarted&&Ii.markCommitStarted(e)}(s),null===i)return qi(),null;if(s===ao&&o("root.finishedLanes should not be empty during a commit. This is a bug in React."),e.finishedWork=null,e.finishedLanes=ao,i===e.current)throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=lo;var a=cs(i.lanes,i.childLanes);(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=ao,e.pingedLanes=ao,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t;for(var r=e.entanglements,i=e.eventTimes,o=e.expirationTimes,s=n;s>0;){var a=ss(s),l=1<<a;r[a]=ao,i[a]=Wo,o[a]=Wo,s&=~l}})(e,a),e===Dy&&(Dy=null,jy=null,Fy=ao),(i.subtreeFlags&li)===Nr&&(i.flags&li)===Nr||ob||(ob=!0,n,hw(Ci,(function(){return $b(),null})));var l=(i.subtreeFlags&(oi|si|ai|li))!==Nr,u=(i.flags&(oi|si|ai|li))!==Nr;if(l||u){var c=Ey.transition;Ey.transition=null;var h=Ts();Os(Ms);var d=By;By|=Cy,_y.current=null,Cv(e,i),Qm(),function(e,t,n){bv=n,wv=e,At(t),Zv(t,e),At(t),bv=null,wv=null}(e,i,s),e.containerInfo,function(e){var t,n,r,i,o=kl(),s=e.focusedElem,a=e.selectionRange;if(o!==s&&El(s)){null!==a&&Sl(s)&&(t=s,r=(n=a).start,void 0===(i=n.end)&&(i=r),"selectionStart"in t?(t.selectionStart=r,t.selectionEnd=Math.min(i,t.value.length)):function(e,t){var n=e.ownerDocument||document,r=n&&n.defaultView||window;if(r.getSelection){var i=r.getSelection(),o=e.textContent.length,s=Math.min(t.start,o),a=void 0===t.end?s:Math.min(t.end,o);if(!i.extend&&s>a){var l=a;a=s,s=l}var u=wl(e,s),c=wl(e,a);if(u&&c){if(1===i.rangeCount&&i.anchorNode===u.node&&i.anchorOffset===u.offset&&i.focusNode===c.node&&i.focusOffset===c.offset)return;var h=n.createRange();h.setStart(u.node,u.offset),i.removeAllRanges(),s>a?(i.addRange(h),i.extend(c.node,c.offset)):(h.setEnd(c.node,c.offset),i.addRange(h))}}}(t,n));for(var l=[],u=s;u=u.parentNode;)u.nodeType===mn&&l.push({element:u,left:u.scrollLeft,top:u.scrollTop});"function"==typeof s.focus&&s.focus();for(var c=0;c<l.length;c++){var h=l[c];h.element.scrollLeft=h.left,h.element.scrollTop=h.top}}}(Ju),ea(Qu),Qu=null,Ju=null,e.current=i,function(e){null!==Ii&&"function"==typeof Ii.markLayoutEffectsStarted&&Ii.markLayoutEffectsStarted(e)}(s),Jv(i,e,s),null!==Ii&&"function"==typeof Ii.markLayoutEffectsStopped&&Ii.markLayoutEffectsStopped(),Ei(),By=d,Os(h),Ey.transition=c}else e.current=i,Qm();var f=ob;if(ob?(ob=!1,sb=e,ab=s):(mb=0,gb=null),(a=e.pendingLanes)===ao&&(ib=null),f||nw(e.current,!1),function(e,t){if(Li&&"function"==typeof Li.onCommitFiberRoot)try{var n=(e.current.flags&Ur)===Ur;if(H){var r;switch(t){case Ms:r=Si;break;case ks:r=xi;break;case Ss:r=Ci;break;case xs:r=Oi;break;default:r=Ci}Li.onCommitFiberRoot(Ni,e,r,n)}}catch(e){Bi||(Bi=!0,o("React instrumentation encountered an error: %s",e))}}(i.stateNode,r),Di&&e.memoizedUpdaters.clear(),vy.forEach((function(e){return e()})),Mb(e,Mi()),null!==t)for(var p=e.onRecoverableError,m=0;m<t.length;m++){var g=t[m],v=g.stack,y=g.digest;p(g.value,{componentStack:v,digest:y})}if(nb){nb=!1;var b=rb;throw rb=null,b}ls(ab,uo)&&e.tag!==sh&&$b(),ls(a=e.pendingLanes,uo)?(Ym=!0,e===hb?cb++:(cb=0,hb=e)):cb=0,fh(),qi()}(e,t,n,r)}finally{Ey.transition=i,Os(r)}return null}function $b(){if(null!==sb){var e=(i=Ps(ab),0===(r=Ss)||r>i?r:i),t=Ey.transition,n=Ts();try{return Ey.transition=null,Os(e),function(){if(null===sb)return!1;null;var e=sb,t=ab;if(sb=null,ab=ao,(By&(xy|Cy))!==ky)throw new Error("Cannot flush passive effects while already rendering.");db=!0,fb=!1,function(e){null!==Ii&&"function"==typeof Ii.markPassiveEffectsStarted&&Ii.markPassiveEffectsStarted(e)}(t);var n=By;By|=Cy,function(e){yv=e,function(){for(;null!==yv;){var e=yv,t=e.child;if((yv.flags&Dr)!==Nr){var n=e.deletions;if(null!==n){for(var r=0;r<n.length;r++){var i=n[r];yv=i,uy(i,e)}var o=e.alternate;if(null!==o){var s=o.child;if(null!==s){o.child=null;do{var a=s.sibling;s.sibling=null,s=a}while(null!==s)}}yv=e}}(e.subtreeFlags&li)!==Nr&&null!==t?(t.return=e,yv=t):ay()}}()}(e.current),function(e,t,n,r){yv=t,function(e,t,n,r){for(;null!==yv;){var i=yv,o=i.child;(i.subtreeFlags&li)!==Nr&&null!==o?(o.return=i,yv=o):oy(e)}}(t)}(0,e.current);var r=lb;lb=[];for(var i=0;i<r.length;i++)Nv(0,r[i]);null!==Ii&&"function"==typeof Ii.markPassiveEffectsStopped&&Ii.markPassiveEffectsStopped(),nw(e.current,!0),By=n,fh(),fb?e===gb?mb++:(mb=0,gb=e):mb=0,db=!1,fb=!1,function(e){if(Li&&"function"==typeof Li.onPostCommitFiberRoot)try{Li.onPostCommitFiberRoot(Ni,e)}catch(e){Bi||(Bi=!0,o("React instrumentation encountered an error: %s",e))}}(e);var s=e.current.stateNode;return s.effectDuration=0,s.passiveEffectDuration=0,!0}()}finally{Os(n),Ey.transition=t}}var r,i;return!1}function Yb(e){return null!==ib&&ib.has(e)}var Gb=function(e){nb||(nb=!0,rb=e)};function Zb(e,t,n){var r=zd(e,cg(e,sg(n,t),uo),uo),i=Ab();null!==r&&(ps(r,uo,i),Mb(r,i))}function Qb(e,t,n){if(function(e){Or(null,(function(){throw e})),Rr()}(n),pw(!1),e.tag!==h){var r=null;for(r=t;null!==r;){if(r.tag===h)return void Zb(r,e,n);if(r.tag===l){var i=r.type,s=r.stateNode;if("function"==typeof i.getDerivedStateFromError||"function"==typeof s.componentDidCatch&&!Yb(s)){var a=zd(r,hg(r,sg(n,e),uo),uo),u=Ab();return void(null!==a&&(ps(a,uo,u),Mb(a,u)))}}r=r.return}o("Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s",n)}else Zb(e,e,n)}function Jb(e,t,n){var r=e.pingCache;null!==r&&r.delete(t);var i=Ab();ms(e,n),function(e){e.tag!==sh&&by()&&null===My.current&&o("A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act")}(e),Dy===e&&us(Fy,n)&&(zy===Ny||zy===Py&&es(Fy)&&Mi()-Gy<Zy?Ib(e,ao):Wy=cs(Wy,n)),Mb(e,i)}function Xb(e,t){t===lo&&(t=function(e){var t;return(e.mode&Xi)===Ji?uo:(t=Yo,((Yo<<=1)&No)===ao&&(Yo=Lo),t)}(e));var n=Ab(),r=Td(e,t);null!==r&&(ps(r,t,n),Mb(r,n))}function ew(e){var t=e.memoizedState,n=lo;null!==t&&(n=t.retryLane),Xb(e,n)}function tw(e,t){var n,r=lo;switch(e.tag){case E:n=e.stateNode;var i=e.memoizedState;null!==i&&(r=i.retryLane);break;case T:n=e.stateNode;break;default:throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}null!==n&&n.delete(t),Xb(e,r)}function nw(e,t){At(e),rw(e,ri,py),t&&rw(e,ii,my),rw(e,ri,dy),t&&rw(e,ii,fy),wt()}function rw(e,t,n){for(var r=e,i=null;null!==r;){var o=r.subtreeFlags&t;r!==i&&null!==r.child&&o!==Nr?r=r.child:((r.flags&t)!==Nr&&n(r),r=null!==r.sibling?r.sibling:i=r.return)}}var iw,ow=null;function sw(e){if((By&xy)===ky&&e.mode&Xi){var t=e.tag;if(t===u||t===h||t===l||t===a||t===A||t===M||t===k){var n=pt(e)||"ReactComponent";if(null!==ow){if(ow.has(n))return;ow.add(n)}else ow=new Set([n]);var r=gt;try{At(e),o("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{r?At(e):wt()}}}}iw=function(e,t,n){var r=qw(null,t);try{return ov(e,t,n)}catch(o){if(Ph||null!==o&&"object"==typeof o&&"function"==typeof o.then)throw o;if(vd(),Np(),fv(0,t),qw(t,r),t.mode&eo&&Jm(t),Or(null,ov,null,e,t,n),kr){var i=Rr();"object"==typeof i&&null!==i&&i._suppressLogging&&"object"==typeof o&&null!==o&&!o._suppressLogging&&(o._suppressLogging=!0)}throw o}};var aw,lw=!1;function uw(e,t){Di&&e.memoizedUpdaters.forEach((function(n){vs(e,n,t)}))}aw=new Set;var cw={};function hw(e,t){var n=My.current;return null!==n?(n.push(t),cw):wi(e,t)}function dw(e){if(e!==cw)return Ai(e)}function fw(){return null!==My.current}function pw(e){bb=e}var mw=null,gw=null,vw=function(e){mw=e};function yw(e){if(null===mw)return e;var t=mw(e);return void 0===t?e:t.current}function bw(e){return yw(e)}function ww(e){if(null===mw)return e;var t=mw(e);if(void 0===t){if(null!=e&&"function"==typeof e.render){var n=yw(e.render);if(e.render!==n){var r={$$typeof:Ie,render:n};return void 0!==e.displayName&&(r.displayName=e.displayName),r}}return e}return t.current}function Aw(e,t){if(null===mw)return!1;var n=e.elementType,r=t.type,i=!1,o="object"==typeof r&&null!==r?r.$$typeof:null;switch(e.tag){case l:"function"==typeof r&&(i=!0);break;case a:("function"==typeof r||o===Fe)&&(i=!0);break;case A:(o===Ie||o===Fe)&&(i=!0);break;case M:case k:(o===je||o===Fe)&&(i=!0);break;default:return!1}if(i){var s=mw(n);if(void 0!==s&&s===mw(r))return!0}return!1}function _w(e){null!==mw&&"function"==typeof WeakSet&&(null===gw&&(gw=new WeakSet),gw.add(e))}var Ew=function(e,t){if(null!==mw){var n=t.staleFamilies,r=t.updatedFamilies;$b(),Rb((function(){kw(e.current,r,n)}))}},Mw=function(e,t){e.context===Vc&&($b(),Rb((function(){Zw(t,e,null,null)})))};function kw(e,t,n){var r=e.alternate,i=e.child,o=e.sibling,s=e.tag,u=e.type,c=null;switch(s){case a:case k:case l:c=u;break;case A:c=u.render}if(null===mw)throw new Error("Expected resolveFamily to be set during hot reload.");var h=!1,d=!1;if(null!==c){var f=mw(c);void 0!==f&&(n.has(f)?d=!0:t.has(f)&&(s===l?d=!0:h=!0))}if(null!==gw&&(gw.has(e)||null!==r&&gw.has(r))&&(d=!0),d&&(e._debugNeedsRemount=!0),d||h){var p=Td(e,uo);null!==p&&Eb(p,e,uo,Wo)}null===i||d||kw(i,t,n),null!==o&&kw(o,t,n)}var Sw,xw=function(e,t){var n=new Set,r=new Set(t.map((function(e){return e.current})));return Cw(e.current,r,n),n};function Cw(e,t,n){var r=e.child,i=e.sibling,o=e.tag,s=e.type,u=null;switch(o){case a:case k:case l:u=s;break;case A:u=s.render}var c=!1;null!==u&&t.has(u)&&(c=!0),c?function(e,t){var n=function(e,t){for(var n=e,r=!1;;){if(n.tag===f)r=!0,t.add(n.stateNode);else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)return r;for(;null===n.sibling;){if(null===n.return||n.return===e)return r;n=n.return}n.sibling.return=n.return,n=n.sibling}return!1}(e,t);if(!n)for(var r=e;;){switch(r.tag){case f:return void t.add(r.stateNode);case d:case h:return void t.add(r.stateNode.containerInfo)}if(null===r.return)throw new Error("Expected to reach root first.");r=r.return}}(e,n):null!==r&&Cw(r,t,n),null!==i&&Cw(i,t,n)}Sw=!1;try{var Tw=Object.preventExtensions({});new Map([[Tw,null]]),new Set([Tw])}catch(e){Sw=!0}function Ow(e,t,n,r){this.tag=e,this.key=n,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=r,this.flags=Nr,this.subtreeFlags=Nr,this.deletions=null,this.lanes=ao,this.childLanes=ao,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Sw||"function"!=typeof Object.preventExtensions||Object.preventExtensions(this)}var Rw=function(e,t,n,r){return new Ow(e,t,n,r)};function Pw(e){var t=e.prototype;return!(!t||!t.isReactComponent)}function Nw(e,t){var n=e.alternate;null===n?((n=Rw(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugSource=e._debugSource,n._debugOwner=e._debugOwner,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=Nr,n.subtreeFlags=Nr,n.deletions=null,n.actualDuration=0,n.actualStartTime=-1),n.flags=e.flags&ui,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue;var r=e.dependencies;switch(n.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case u:case a:case k:n.type=yw(e.type);break;case l:n.type=bw(e.type);break;case A:n.type=ww(e.type)}return n}function Lw(e,t){e.flags&=ui|Ir;var n=e.alternate;if(null===n)e.childLanes=ao,e.lanes=t,e.child=null,e.subtreeFlags=Nr,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0;else{e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=Nr,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type;var r=n.dependencies;e.dependencies=null===r?null:{lanes:r.lanes,firstContext:r.firstContext},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration}return e}function Iw(e,t,n,r,i,s){var a=u,c=e;if("function"==typeof e)Pw(e)?(a=l,c=bw(c)):c=yw(c);else if("string"==typeof e)a=f;else e:switch(e){case Oe:return Dw(n.children,i,s,t);case Re:a=g,((i|=to)&Xi)!==Ji&&(i|=no);break;case Pe:return function(e,t,n,r){"string"!=typeof e.id&&o('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id);var i=Rw(_,e,r,t|eo);return i.elementType=Pe,i.lanes=n,i.stateNode={effectDuration:0,passiveEffectDuration:0},i}(n,i,s,t);case Be:return function(e,t,n,r){var i=Rw(E,e,r,t);return i.elementType=Be,i.lanes=n,i}(n,i,s,t);case De:return function(e,t,n,r){var i=Rw(T,e,r,t);return i.elementType=De,i.lanes=n,i}(n,i,s,t);case Ue:return jw(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ne:a=b;break e;case Le:a=v;break e;case Ie:a=A,c=ww(c);break e;case je:a=M;break e;case Fe:a=S,c=null;break e}var h="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=r?pt(r):null;throw d&&(h+="\n\nCheck the render method of `"+d+"`."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(null==e?e:typeof e)+"."+h)}var p=Rw(a,n,t,i);return p.elementType=e,p.type=c,p.lanes=s,p._debugOwner=r,p}function Bw(e,t,n){var r;r=e._owner;var i=Iw(e.type,e.key,e.props,r,t,n);return i._debugSource=e._source,i._debugOwner=e._owner,i}function Dw(e,t,n,r){var i=Rw(m,e,r,t);return i.lanes=n,i}function jw(e,t,n,r){var i=Rw(R,e,r,t);return i.elementType=Ue,i.lanes=n,i.stateNode={isHidden:!1},i}function Fw(e,t,n){var r=Rw(p,e,null,t);return r.lanes=n,r}function Uw(e,t,n){var r=null!==e.children?e.children:[],i=Rw(d,r,e.key,t);return i.lanes=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function qw(e,t){return null===e&&(e=Rw(u,null,null,Ji)),e.tag=t.tag,e.key=t.key,e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.return=t.return,e.child=t.child,e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e.pendingProps=t.pendingProps,e.memoizedProps=t.memoizedProps,e.updateQueue=t.updateQueue,e.memoizedState=t.memoizedState,e.dependencies=t.dependencies,e.mode=t.mode,e.flags=t.flags,e.subtreeFlags=t.subtreeFlags,e.deletions=t.deletions,e.lanes=t.lanes,e.childLanes=t.childLanes,e.alternate=t.alternate,e.actualDuration=t.actualDuration,e.actualStartTime=t.actualStartTime,e.selfBaseDuration=t.selfBaseDuration,e.treeBaseDuration=t.treeBaseDuration,e._debugSource=t._debugSource,e._debugOwner=t._debugOwner,e._debugNeedsRemount=t._debugNeedsRemount,e._debugHookTypes=t._debugHookTypes,e}function zw(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=rc,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=lo,this.eventTimes=fs(ao),this.expirationTimes=fs(Wo),this.pendingLanes=ao,this.suspendedLanes=ao,this.pingedLanes=ao,this.expiredLanes=ao,this.mutableReadLanes=ao,this.finishedLanes=ao,this.entangledLanes=ao,this.entanglements=fs(ao),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0,this.memoizedUpdaters=new Set;for(var o=this.pendingUpdatersLaneMap=[],s=0;s<so;s++)o.push(new Set);switch(t){case ah:this._debugRootType=n?"hydrateRoot()":"createRoot()";break;case sh:this._debugRootType=n?"hydrate()":"render()"}}function Hw(e,t,n,r,i,o,s,a,l,u){var c=new zw(e,t,n,a,l),d=function(e,t,n){var r;return e===ah?(r=Xi,!0===t&&(r|=to,r|=no)):r=Ji,Di&&(r|=eo),Rw(h,null,null,r)}(t,o);c.current=d,d.stateNode=c;var f={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};return d.memoizedState=f,Fd(d),c}var Kw,Vw,Ww="18.2.0";function $w(e){if(!e)return Vc;var t=Pr(e),n=function(e){if(!function(e){return hi(e)===e}(e)||e.tag!==l)throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var t=e;do{switch(t.tag){case h:return t.stateNode.context;case l:if(Xc(t.type))return t.stateNode.__reactInternalMemoizedMergedChildContext}t=t.return}while(null!==t);throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}(t);if(t.tag===l){var r=t.type;if(Xc(r))return rh(t,r,n)}return n}function Yw(e,t,n,r,i,o,s,a){return Hw(e,t,!1,null,0,r,0,o,s)}function Gw(e,t,n,r,i,o,s,a,l,u){var c=Hw(n,r,!0,e,0,o,0,a,l);c.context=$w(null);var h=c.current,d=Ab(),f=_b(h),p=qd(d,f);return p.callback=null!=t?t:null,zd(h,p,f),function(e,t,n){e.current.lanes=t,ps(e,t,n),Mb(e,n)}(c,f,d),c}function Zw(e,t,n,r){!function(e,t){if(Li&&"function"==typeof Li.onScheduleFiberRoot)try{Li.onScheduleFiberRoot(Ni,e,t)}catch(e){Bi||(Bi=!0,o("React instrumentation encountered an error: %s",e))}}(t,e);var i=t.current,s=Ab(),a=_b(i);!function(e){null!==Ii&&"function"==typeof Ii.markRenderScheduled&&Ii.markRenderScheduled(e)}(a);var l=$w(n);null===t.context?t.context=l:t.pendingContext=l,vt&&null!==gt&&!Kw&&(Kw=!0,o("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",pt(gt)||"Unknown"));var u=qd(s,a);u.payload={element:e},null!==(r=void 0===r?null:r)&&("function"!=typeof r&&o("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",r),u.callback=r);var c=zd(i,u,a);return null!==c&&(Eb(c,i,a,s),Hd(c,i,a)),a}function Qw(e){var t=e.current;return t.child?(t.child.tag,t.child.stateNode):null}function Jw(e,t){var n,r,i=e.memoizedState;null!==i&&null!==i.dehydrated&&(i.retryLane=(r=t,(n=i.retryLane)!==lo&&n<r?n:r))}function Xw(e,t){Jw(e,t);var n=e.alternate;n&&Jw(n,t)}function eA(e){var t=yi(e);return null===t?null:t.stateNode}Kw=!1,Vw={};var tA,nA,rA,iA,oA,sA,aA,lA,uA,cA=function(e){return null},hA=function(e){return!1},dA=function(e,t,n){var r=t[n],i=Gt(e)?e.slice():Qe({},e);return n+1===t.length?(Gt(i)?i.splice(r,1):delete i[r],i):(i[r]=dA(e[r],t,n+1),i)},fA=function(e,t){return dA(e,t,0)},pA=function(e,t,n,r){var i=t[r],o=Gt(e)?e.slice():Qe({},e);return r+1===t.length?(o[n[r]]=o[i],Gt(o)?o.splice(i,1):delete o[i]):o[i]=pA(e[i],t,n,r+1),o},mA=function(e,t,n){if(t.length===n.length){for(var r=0;r<n.length-1;r++)if(t[r]!==n[r])return void i("copyWithRename() expects paths to be the same except for the deepest key");return pA(e,t,n,0)}i("copyWithRename() expects paths of the same length")},gA=function(e,t,n,r){if(n>=t.length)return r;var i=t[n],o=Gt(e)?e.slice():Qe({},e);return o[i]=gA(e[i],t,n+1,r),o},vA=function(e,t,n){return gA(e,t,0,n)},yA=function(e,t){for(var n=e.memoizedState;null!==n&&t>0;)n=n.next,t--;return n};function bA(e){var t=gi(e);return null===t?null:t.stateNode}function wA(e){return null}function AA(){return gt}tA=function(e,t,n,r){var i=yA(e,t);if(null!==i){var o=vA(i.memoizedState,n,r);i.memoizedState=o,i.baseState=o,e.memoizedProps=Qe({},e.memoizedProps);var s=Td(e,uo);null!==s&&Eb(s,e,uo,Wo)}},nA=function(e,t,n){var r=yA(e,t);if(null!==r){var i=fA(r.memoizedState,n);r.memoizedState=i,r.baseState=i,e.memoizedProps=Qe({},e.memoizedProps);var o=Td(e,uo);null!==o&&Eb(o,e,uo,Wo)}},rA=function(e,t,n,r){var i=yA(e,t);if(null!==i){var o=mA(i.memoizedState,n,r);i.memoizedState=o,i.baseState=o,e.memoizedProps=Qe({},e.memoizedProps);var s=Td(e,uo);null!==s&&Eb(s,e,uo,Wo)}},iA=function(e,t,n){e.pendingProps=vA(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=Td(e,uo);null!==r&&Eb(r,e,uo,Wo)},oA=function(e,t){e.pendingProps=fA(e.memoizedProps,t),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var n=Td(e,uo);null!==n&&Eb(n,e,uo,Wo)},sA=function(e,t,n){e.pendingProps=mA(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps);var r=Td(e,uo);null!==r&&Eb(r,e,uo,Wo)},aA=function(e){var t=Td(e,uo);null!==t&&Eb(t,e,uo,Wo)},lA=function(e){cA=e},uA=function(e){hA=e};var _A="function"==typeof reportError?reportError:function(e){console.error(e)};function EA(e){this._internalRoot=e}function MA(e){this._internalRoot=e}function kA(e){return!(!e||e.nodeType!==mn&&e.nodeType!==yn&&e.nodeType!==bn)}function SA(e){return!(!e||e.nodeType!==mn&&e.nodeType!==yn&&e.nodeType!==bn&&(e.nodeType!==vn||" react-mount-point-unstable "!==e.nodeValue))}function xA(e){e.nodeType===mn&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&o("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Cc(e)&&(e._reactRootContainer?o("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):o("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}MA.prototype.render=EA.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw new Error("Cannot update an unmounted root.");"function"==typeof arguments[1]?o("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):kA(arguments[1])?o("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):void 0!==arguments[1]&&o("You passed a second argument to root.render(...) but it only accepts one argument.");var n=t.containerInfo;if(n.nodeType!==vn){var r=eA(t.current);r&&r.parentNode!==n&&o("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}Zw(e,t,null,null)},MA.prototype.unmount=EA.prototype.unmount=function(){"function"==typeof arguments[0]&&o("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Pb()&&o("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Rb((function(){Zw(null,e,null,null)})),xc(t)}},MA.prototype.unstable_scheduleHydration=function(e){e&&function(e){for(var t=_s(),n={blockedOn:null,target:e,priority:t},r=0;r<zs.length&&Rs(t,zs[r].priority);r++);zs.splice(r,0,n),0===r&&Ws(n)}(e)};var CA,TA,OA,RA=n.ReactCurrentOwner;function PA(e){return e?e.nodeType===yn?e.documentElement:e.firstChild:null}function NA(){}function LA(e,t,n,r,i){CA(n),function(e,t){null!==e&&"function"!=typeof e&&o("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.","render",e)}(void 0===i?null:i);var s,a=n._reactRootContainer;if(a){if("function"==typeof i){var l=i;i=function(){var e=Qw(s);l.call(e)}}Zw(t,s=a,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Qw(s);o.call(e)}}var s=Gw(t,r,e,sh,0,!1,0,"",NA);return e._reactRootContainer=s,Sc(s.current,e),tu(e.nodeType===vn?e.parentNode:e),Rb(),s}for(var a;a=e.lastChild;)e.removeChild(a);if("function"==typeof r){var l=r;r=function(){var e=Qw(u);l.call(e)}}var u=Yw(e,sh,0,!1,0,"",NA);return e._reactRootContainer=u,Sc(u.current,e),tu(e.nodeType===vn?e.parentNode:e),Rb((function(){Zw(t,u,n,r)})),u}(n,t,e,i,r);return Qw(s)}CA=function(e){if(e._reactRootContainer&&e.nodeType!==vn){var t=eA(e._reactRootContainer.current);t&&t.parentNode!==e&&o("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,r=PA(e);!(!r||!Oc(r))&&!n&&o("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===mn&&e.tagName&&"BODY"===e.tagName.toUpperCase()&&o("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")},TA=function(e){switch(e.tag){case h:var t=e.stateNode;if(Ns(t)){var n=function(e){return Go(e.pendingLanes)}(t);!function(e,t){t!==ao&&(gs(e,cs(t,uo)),Mb(e,Mi()),(By&(xy|Cy))===ky&&(eb(),fh()))}(t,n)}break;case E:Rb((function(){var t=Td(e,uo);if(null!==t){var n=Ab();Eb(t,e,uo,n)}})),Xw(e,uo)}},bs=TA,ws=function(e){if(e.tag===E){var t=Uo,n=Td(e,t);null!==n&&Eb(n,e,t,Ab()),Xw(e,t)}},As=function(e){if(e.tag===E){var t=_b(e),n=Td(e,t);null!==n&&Eb(n,e,t,Ab()),Xw(e,t)}},function(e){_s=e}(Ts),Es=function(e,t){var n=Cs;try{return Cs=e,t()}finally{Cs=n}},"function"==typeof Map&&null!=Map.prototype&&"function"==typeof Map.prototype.forEach&&"function"==typeof Set&&null!=Set.prototype&&"function"==typeof Set.prototype.clear&&"function"==typeof Set.prototype.forEach||o("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),OA=function(e,t,n){switch(t){case"input":return void function(e,t){var n=e;Ut(n,t),function(e,t){var n=t.name;if("radio"===t.type&&null!=n){for(var r=e;r.parentNode;)r=r.parentNode;te(n,"name");for(var i=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),o=0;o<i.length;o++){var s=i[o];if(s!==e&&s.form===e.form){var a=Pc(s);if(!a)throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Ot(s),Ut(s,a)}}}}(n,t)}(e,n);case"textarea":return void function(e,t){on(e,t)}(e,n);case"select":return void function(e,t){var n=e,r=t.value;null!=r&&Jt(n,!!t.multiple,r,!1)}(e,n)}},lr=OA,pr=Ob,mr=Rb;var IA={usingClientEntryPoint:!1,Events:[Oc,Rc,Pc,dr,fr,Ob]},BA=function(e){var t=e.findFiberByHostInstance,r=n.ReactCurrentDispatcher;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return o("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{z&&(e=Qe({},e,{getLaneLabelMap:Ui,injectProfilingHooks:Fi})),Ni=t.inject(e),Li=t}catch(e){o("React instrumentation encountered an error: %s.",e)}return!!t.checkDCE}({bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:tA,overrideHookStateDeletePath:nA,overrideHookStateRenamePath:rA,overrideProps:iA,overridePropsDeletePath:oA,overridePropsRenamePath:sA,setErrorHandler:lA,setSuspenseHandler:uA,scheduleUpdate:aA,currentDispatcherRef:r,findHostInstanceByFiber:bA,findFiberByHostInstance:t||wA,findHostInstancesForRefresh:xw,scheduleRefresh:Ew,scheduleRoot:Mw,setRefreshHandler:vw,getCurrentFiber:AA,reconcilerVersion:Ww})}({findFiberByHostInstance:Tc,bundleType:1,version:Ww,rendererPackageName:"react-dom"});if(!BA&&Z&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&-1===navigator.userAgent.indexOf("Edge")||navigator.userAgent.indexOf("Firefox")>-1)){var DA=window.location.protocol;/^(https?|file):$/.test(DA)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+("file:"===DA?"\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq":""),"font-weight:bold")}w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IA,w.createPortal=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!kA(t))throw new Error("Target container is not a DOM element.");return function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return X(r=i)&&(o("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",J(r)),ee(r)),{$$typeof:Te,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},w.createRoot=function(e,t){return IA.usingClientEntryPoint||o('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),function(e,t){if(!kA(e))throw new Error("createRoot(...): Target container is not a DOM element.");xA(e);var n=!1,r="",s=_A;null!=t&&(t.hydrate?i("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):"object"==typeof t&&null!==t&&t.$$typeof===Ce&&o("You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"),!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(s=t.onRecoverableError),void 0!==t.transitionCallbacks&&t.transitionCallbacks);var a=Yw(e,ah,0,n,0,r,s);return Sc(a.current,e),tu(e.nodeType===vn?e.parentNode:e),new EA(a)}(e,t)},w.findDOMNode=function(e){var t=RA.current;return null!==t&&null!==t.stateNode&&(t.stateNode._warnedAboutRefsInRender||o("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",dt(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0),null==e?null:e.nodeType===mn?e:function(e,t){var n=Pr(e);if(void 0===n){if("function"==typeof e.render)throw new Error("Unable to find node on an unmounted component.");var r=Object.keys(e).join(",");throw new Error("Argument appears to not be a ReactComponent. Keys: "+r)}var i=gi(n);if(null===i)return null;if(i.mode&to){var s=pt(n)||"Component";if(!Vw[s]){Vw[s]=!0;var a=gt;try{At(i),n.mode&to?o("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,s):o("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",t,t,s)}finally{a?At(a):wt()}}}return i.stateNode}(e,"findDOMNode")},w.flushSync=function(e){return Pb()&&o("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),Rb(e)},w.hydrate=function(e,t,n){if(o("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!SA(t))throw new Error("Target container is not a DOM element.");return Cc(t)&&void 0===t._reactRootContainer&&o("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?"),LA(null,e,t,!0,n)},w.hydrateRoot=function(e,t,n){return IA.usingClientEntryPoint||o('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),function(e,t,n){if(!kA(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");xA(e),void 0===t&&o("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=null!=n&&n.hydratedSources||null,i=!1,s="",a=_A;null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError));var l=Gw(t,null,e,ah,0,i,0,s,a);if(Sc(l.current,e),tu(e),r)for(var u=0;u<r.length;u++)ap(l,r[u]);return new MA(l)}(e,t,n)},w.render=function(e,t,n){if(o("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!SA(t))throw new Error("Target container is not a DOM element.");return Cc(t)&&void 0===t._reactRootContainer&&o("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?"),LA(null,e,t,!1,n)},w.unmountComponentAtNode=function(e){if(!SA(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");if(Cc(e)&&void 0===e._reactRootContainer&&o("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?"),e._reactRootContainer){var t=PA(e);return t&&!Oc(t)&&o("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React."),Rb((function(){LA(null,null,e,!1,(function(){e._reactRootContainer=null,xc(e)}))})),!0}var n=PA(e),r=!(!n||!Oc(n)),i=e.nodeType===mn&&SA(e.parentNode)&&!!e.parentNode._reactRootContainer;return r&&o("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",i?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component."),!1},w.unstable_batchedUpdates=Ob,w.unstable_renderSubtreeIntoContainer=function(e,t,n,r){return function(e,t,n,r){if(o("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!SA(n))throw new Error("Target container is not a DOM element.");if(null==e||void 0===e._reactInternals)throw new Error("parentComponent must be a valid React Component");return LA(e,t,n,!1,r)}(e,t,n,r)},w.version=Ww,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),w);var A,_=f.exports;if("production"===Vb.env.NODE_ENV)A=_.createRoot,_.hydrateRoot;else{var E=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;A=function(e,t){E.usingClientEntryPoint=!0;try{return _.createRoot(e,t)}finally{E.usingClientEntryPoint=!1}}}var M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},M.apply(this,arguments)};function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S={flexContainer:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row"},flexItem:{flex:1,justifyContent:"center",alignItems:"center"},flexItem11:{flex:11,justifyContent:"center",alignItems:"center"},flexItem1:{flex:1,justifyContent:"center",alignItems:"center"},tab:{padding:8,cursor:"pointer",backgroundColor:"#F2F4F6",fontSize:12,textAlign:"center",color:"#24292E"},tabcontainer:{padding:"4px",backgroundColor:"#F2F4F6",borderRadius:"8px",marginBottom:30,marginTop:30},tabactive:{backgroundColor:"white",WebkitTransition:"background-color 300ms linear",msTransition:"background-color 300ms linear",transition:"background-color 300ms linear",borderRadius:"8px"},item:{fontSize:"12px",marginBottom:16,borderRadius:"8px",padding:"10px",border:"2px #F2F4F6 solid",color:"#24292E"},notice:{fontSize:12,marginLeft:10,marginRight:10,color:"grey"},button:{marginTop:"41.5px",marginBottom:"20px",width:"100%",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"12px 20px",background:"#037DD6",borderRadius:"32px",color:"white",border:"0",fontSize:"14px",cursor:"pointer"},backdrop:{visibility:"visible",position:"fixed",top:"0",left:"0",right:"0",bottom:"0",width:"100%",zIndex:99998,background:"rgba(0, 0, 0, 0.87)",opacity:.3},modal:{visibility:"visible",position:"fixed",left:"50%",transform:"translate(-50%, -50%)",zIndex:99999,background:"#fff",padding:"20px",borderRadius:"8px",top:"50%",maxWidth:"100%",width:460,minWidth:300,boxShadow:"rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0, 0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px",WebkitFontSmoothing:"antialiased"},closeButton:{color:"#BBC0C5",cursor:"pointer"},closeButtonContainer:{},logoContainer:{marginHorizontal:24,marginTop:24,display:"flex",alignItems:"center",justifyContent:"center"},connectMobileText:{fontSize:14,color:"black",marginTop:28,marginBottom:28,lineHeight:2},blue:{color:"#037DD6",fontWeight:700},installExtensionText:{marginLeft:10},center:{display:"flex",alignItems:"center",justifyContent:"center"},right:{display:"flex",alignItems:"center",justifyContent:"right"}},x=function(e){var t=e.Icon,n=e.text;return h.createElement("div",{style:M(M({padding:6},S.flexContainer),{flexDirection:"row"})},h.createElement("div",{style:S.flexItem1},h.createElement(t,null)),h.createElement("div",{style:S.flexItem11},h.createElement("span",{style:{lineHeight:"2",color:"black"}},n)))},C=function(){return h.createElement("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("rect",{width:"16",height:"16",fill:"white"}),h.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.40554 2.40554C2.94627 1.86482 3.82296 1.86482 4.36369 2.40554L8 6.04186L11.6363 2.40554C12.177 1.86482 13.0537 1.86482 13.5945 2.40554C14.1352 2.94627 14.1352 3.82296 13.5945 4.36369L9.95814 8L13.5945 11.6363C14.1352 12.177 14.1352 13.0537 13.5945 13.5945C13.0537 14.1352 12.177 14.1352 11.6363 13.5945L8 9.95814L4.36369 13.5945C3.82296 14.1352 2.94627 14.1352 2.40554 13.5945C1.86482 13.0537 1.86482 12.177 2.40554 11.6363L6.04186 8L2.40554 4.36369C1.86482 3.82296 1.86482 2.94627 2.40554 2.40554Z",fill:"#BBC0C5"}))},T=function(){return h.createElement("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M14.44 0.0999756C12.63 0.0999756 11.01 0.979976 10 2.32998C8.99 0.979976 7.37 0.0999756 5.56 0.0999756C2.49 0.0999756 0 2.59998 0 5.68998C0 6.87998 0.19 7.97998 0.52 8.99998C2.1 14 6.97 16.99 9.38 17.81C9.72 17.93 10.28 17.93 10.62 17.81C13.03 16.99 17.9 14 19.48 8.99998C19.81 7.97998 20 6.87998 20 5.68998C20 2.59998 17.51 0.0999756 14.44 0.0999756Z",fill:"#037DD6"}))},O=function(){return h.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M16.4405 8.8999C20.0405 9.2099 21.5105 11.0599 21.5105 15.1099V15.2399C21.5105 19.7099 19.7205 21.4999 15.2505 21.4999H8.74047C4.27047 21.4999 2.48047 19.7099 2.48047 15.2399V15.1099C2.48047 11.0899 3.93047 9.2399 7.47047 8.9099",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12 2V14.88",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M15.3504 12.6499L12.0004 15.9999L8.65039 12.6499",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},R=function(){return h.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M16.28 7.53V6.28C16.28 3.58 15.63 0 10 0C4.37 0 3.72 3.58 3.72 6.28V7.53C0.92 7.88 0 9.3 0 12.79V14.65C0 18.75 1.25 20 5.35 20H14.65C18.75 20 20 18.75 20 14.65V12.79C20 9.3 19.08 7.88 16.28 7.53ZM10 16.74C8.33 16.74 6.98 15.38 6.98 13.72C6.98 12.05 8.34 10.7 10 10.7C11.66 10.7 13.02 12.06 13.02 13.72C13.02 15.39 11.67 16.74 10 16.74ZM5.35 7.44C5.27 7.44 5.2 7.44 5.12 7.44V6.28C5.12 3.35 5.95 1.4 10 1.4C14.05 1.4 14.88 3.35 14.88 6.28V7.45C14.8 7.45 14.73 7.45 14.65 7.45H5.35V7.44Z",fill:"#037DD6"}))},P=function(){return h.createElement("svg",{width:"273",height:"51",viewBox:"0 0 273 51",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M240.882 25.9263C239.472 24.997 237.916 24.3361 236.443 23.5101C235.489 22.9731 234.473 22.4982 233.643 21.8167C232.233 20.6602 232.524 18.3885 233.996 17.3973C236.112 15.993 239.617 16.7777 239.99 19.6483C239.99 19.7102 240.052 19.7515 240.114 19.7515H243.308C243.391 19.7515 243.454 19.6896 243.433 19.607C243.267 17.6244 242.5 15.9723 241.089 14.9191C239.741 13.9072 238.206 13.3702 236.568 13.3702C228.127 13.3702 227.359 22.271 231.901 25.0796C232.42 25.41 236.879 27.6404 238.455 28.611C240.032 29.5816 240.529 31.3576 239.845 32.7619C239.223 34.0423 237.605 34.9303 235.987 34.8271C234.224 34.7238 232.855 33.7738 232.378 32.2869C232.295 32.0185 232.254 31.5022 232.254 31.275C232.254 31.2131 232.192 31.1511 232.129 31.1511H228.666C228.604 31.1511 228.541 31.2131 228.541 31.275C228.541 33.7738 229.164 35.1575 230.864 36.4172C232.461 37.615 234.203 38.1106 236.008 38.1106C240.737 38.1106 243.184 35.4466 243.682 32.6793C244.117 29.974 243.308 27.5371 240.882 25.9263Z",fill:"#24292E"}),h.createElement("path",{d:"M90.4943 13.8246H88.9595H87.2795C87.2173 13.8246 87.1758 13.8659 87.1551 13.9072L84.3137 23.2416C84.2722 23.3655 84.1063 23.3655 84.0648 23.2416L81.2234 13.9072C81.2026 13.8452 81.1612 13.8246 81.0989 13.8246H79.419H77.8842H75.8102C75.748 13.8246 75.6857 13.8865 75.6857 13.9485V37.7802C75.6857 37.8422 75.748 37.9041 75.8102 37.9041H79.2738C79.336 37.9041 79.3982 37.8422 79.3982 37.7802V19.6689C79.3982 19.5244 79.6056 19.5037 79.6471 19.6276L82.5093 29.024L82.7167 29.6849C82.7374 29.7468 82.7789 29.7675 82.8411 29.7675H85.4959C85.5581 29.7675 85.5996 29.7262 85.6203 29.6849L85.8277 29.024L88.6899 19.6276C88.7313 19.4831 88.9387 19.5244 88.9387 19.6689V37.7802C88.9387 37.8422 89.001 37.9041 89.0632 37.9041H92.5268C92.589 37.9041 92.6513 37.8422 92.6513 37.7802V13.9485C92.6513 13.8865 92.589 13.8246 92.5268 13.8246H90.4943Z",fill:"#24292E"}),h.createElement("path",{d:"M187.849 13.8246C187.787 13.8246 187.745 13.8659 187.725 13.9072L184.883 23.2416C184.842 23.3655 184.676 23.3655 184.634 23.2416L181.793 13.9072C181.772 13.8452 181.731 13.8246 181.668 13.8246H176.4C176.338 13.8246 176.276 13.8865 176.276 13.9485V37.7802C176.276 37.8422 176.338 37.9041 176.4 37.9041H179.864C179.926 37.9041 179.988 37.8422 179.988 37.7802V19.6689C179.988 19.5244 180.196 19.5037 180.237 19.6276L183.099 29.024L183.307 29.6849C183.328 29.7468 183.369 29.7675 183.431 29.7675H186.086C186.148 29.7675 186.19 29.7262 186.211 29.6849L186.418 29.024L189.28 19.6276C189.322 19.4831 189.529 19.5244 189.529 19.6689V37.7802C189.529 37.8422 189.591 37.9041 189.653 37.9041H193.117C193.179 37.9041 193.241 37.8422 193.241 37.7802V13.9485C193.241 13.8865 193.179 13.8246 193.117 13.8246H187.849Z",fill:"#24292E"}),h.createElement("path",{d:"M143.174 13.8246H136.724H133.261H126.81C126.748 13.8246 126.686 13.8865 126.686 13.9485V16.9223C126.686 16.9843 126.748 17.0462 126.81 17.0462H133.136V37.7802C133.136 37.8422 133.198 37.9041 133.261 37.9041H136.724C136.786 37.9041 136.849 37.8422 136.849 37.7802V17.0462H143.174C143.237 17.0462 143.299 16.9843 143.299 16.9223V13.9485C143.299 13.8865 143.257 13.8246 143.174 13.8246Z",fill:"#24292E"}),h.createElement("path",{d:"M163.604 37.9041H166.756C166.839 37.9041 166.901 37.8215 166.881 37.7389L160.368 13.8245C160.347 13.7626 160.306 13.7419 160.244 13.7419H159.041H156.925H155.722C155.66 13.7419 155.619 13.7832 155.598 13.8245L149.085 37.7389C149.065 37.8215 149.127 37.9041 149.21 37.9041H152.362C152.425 37.9041 152.466 37.8628 152.487 37.8215L154.374 30.862C154.395 30.8 154.436 30.7794 154.499 30.7794H161.467C161.53 30.7794 161.571 30.8207 161.592 30.862L163.479 37.8215C163.5 37.8628 163.562 37.9041 163.604 37.9041ZM155.328 27.3719L157.859 18.0581C157.9 17.9342 158.066 17.9342 158.107 18.0581L160.638 27.3719C160.659 27.4545 160.596 27.5371 160.513 27.5371H155.453C155.37 27.5371 155.308 27.4545 155.328 27.3719Z",fill:"#24292E"}),h.createElement("path",{d:"M217.362 37.9041H220.515C220.598 37.9041 220.66 37.8215 220.639 37.7389L214.127 13.8245C214.106 13.7626 214.065 13.7419 214.002 13.7419H212.8H210.684H209.481C209.419 13.7419 209.377 13.7832 209.357 13.8245L202.844 37.7389C202.823 37.8215 202.886 37.9041 202.969 37.9041H206.121C206.183 37.9041 206.225 37.8628 206.246 37.8215L208.133 30.862C208.154 30.8 208.195 30.7794 208.257 30.7794H215.226C215.288 30.7794 215.33 30.8207 215.351 30.862L217.238 37.8215C217.259 37.8628 217.3 37.9041 217.362 37.9041ZM209.087 27.3719L211.617 18.0581C211.659 17.9342 211.825 17.9342 211.866 18.0581L214.397 27.3719C214.417 27.4545 214.355 27.5371 214.272 27.5371H209.211C209.129 27.5371 209.066 27.4545 209.087 27.3719Z",fill:"#24292E"}),h.createElement("path",{d:"M106.713 34.3727V26.9795C106.713 26.9176 106.775 26.8556 106.837 26.8556H116.067C116.129 26.8556 116.191 26.7936 116.191 26.7317V23.7579C116.191 23.6959 116.129 23.634 116.067 23.634H106.837C106.775 23.634 106.713 23.572 106.713 23.5101V17.1907C106.713 17.1288 106.775 17.0668 106.837 17.0668H117.332C117.394 17.0668 117.457 17.0049 117.457 16.9429V13.9691C117.457 13.9072 117.394 13.8452 117.332 13.8452H106.713H103.125C103.063 13.8452 103.001 13.9072 103.001 13.9691V17.0668V23.6546V26.8763V34.5173V37.7802C103.001 37.8422 103.063 37.9041 103.125 37.9041H106.713H117.768C117.83 37.9041 117.892 37.8422 117.892 37.7802V34.6412C117.892 34.5792 117.83 34.5173 117.768 34.5173H106.817C106.755 34.4966 106.713 34.4553 106.713 34.3727Z",fill:"#24292E"}),h.createElement("path",{d:"M272.532 37.6976L260.544 25.3687C260.502 25.3274 260.502 25.2448 260.544 25.2035L271.329 14.0517C271.412 13.9691 271.349 13.8452 271.246 13.8452H266.828C266.787 13.8452 266.766 13.8659 266.745 13.8865L257.599 23.3449C257.516 23.4275 257.391 23.3655 257.391 23.2623V13.9691C257.391 13.9072 257.329 13.8452 257.267 13.8452H253.803C253.741 13.8452 253.679 13.9072 253.679 13.9691V37.8009C253.679 37.8628 253.741 37.9248 253.803 37.9248H257.267C257.329 37.9248 257.391 37.8628 257.391 37.8009V27.3099C257.391 27.2067 257.536 27.1447 257.599 27.2273L267.969 37.8835C267.989 37.9041 268.031 37.9248 268.052 37.9248H272.469C272.552 37.9041 272.615 37.7596 272.532 37.6976Z",fill:"#24292E"}),h.createElement("path",{d:"M52.021 1L31.0526 16.4886L34.9517 7.36063L52.021 1Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M3.65491 1L24.4366 16.6331L20.7241 7.36063L3.65491 1Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M44.4716 36.9127L38.8925 45.4211L50.8389 48.7047L54.261 37.0986L44.4716 36.9127Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M1.43555 37.0986L4.83695 48.7047L16.7626 45.4211L11.2042 36.9127L1.43555 37.0986Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M16.1197 22.5395L12.8013 27.5371L24.6232 28.074L24.2292 15.3734L16.1197 22.5395Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M39.5561 22.5394L31.3222 15.2288L31.0526 28.0739L42.8746 27.537L39.5561 22.5394Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M16.7626 45.4212L23.918 41.9724L17.7582 37.1813L16.7626 45.4212Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M31.7578 41.9724L38.8925 45.4212L37.9177 37.1813L31.7578 41.9724Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M38.8923 45.4212L31.7577 41.9724L32.3384 46.5983L32.2762 48.5602L38.8923 45.4212Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M16.7625 45.4212L23.3994 48.5602L23.3579 46.5983L23.9179 41.9724L16.7625 45.4212Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M23.5239 34.1249L17.5922 32.3902L21.7818 30.4696L23.5239 34.1249Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M32.1517 34.1249L33.8939 30.4696L38.1042 32.3902L32.1517 34.1249Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M16.7626 45.4212L17.7996 36.9128L11.2042 37.0987L16.7626 45.4212Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M37.8761 36.9128L38.8924 45.4212L44.4715 37.0987L37.8761 36.9128Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M42.8745 27.5371L31.0526 28.074L32.1518 34.1249L33.894 30.4696L38.1042 32.3902L42.8745 27.5371Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M17.5922 32.3902L21.7817 30.4696L23.5239 34.1249L24.6232 28.074L12.8012 27.5371L17.5922 32.3902Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.8013 27.5371L17.7582 37.1813L17.5923 32.3902L12.8013 27.5371Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M38.1044 32.3902L37.9177 37.1813L42.8746 27.5371L38.1044 32.3902Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M24.6232 28.0741L23.524 34.125L24.9136 41.2703L25.2247 31.8533L24.6232 28.0741Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M31.0526 28.0741L30.4719 31.8327L30.7623 41.2703L32.1519 34.125L31.0526 28.0741Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M32.1519 34.1249L30.7623 41.2702L31.7578 41.9724L37.9177 37.1813L38.1043 32.3901L32.1519 34.1249Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M17.5922 32.3901L17.7581 37.1813L23.918 41.9724L24.9135 41.2702L23.5239 34.1249L17.5922 32.3901Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M32.2763 48.5602L32.3385 46.5983L31.7993 46.1439H23.8765L23.358 46.5983L23.3995 48.5602L16.7626 45.4211L19.0855 47.3211L23.7935 50.5633H31.8615L36.5903 47.3211L38.8924 45.4211L32.2763 48.5602Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M31.7578 41.9724L30.7622 41.2703H24.9135L23.918 41.9724L23.358 46.5983L23.8765 46.144H31.7993L32.3385 46.5983L31.7578 41.9724Z",fill:"#24292E",stroke:"#24292E",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M52.9128 17.5005L54.6757 8.95079L52.021 1L31.7578 15.9723L39.5561 22.5394L50.5692 25.7404L52.9958 22.9111L51.938 22.147L53.618 20.6188L52.3321 19.6276L54.0121 18.3472L52.9128 17.5005Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M1 8.95079L2.78366 17.5005L1.64295 18.3472L3.34365 19.6276L2.05775 20.6188L3.73771 22.147L2.67996 22.9111L5.10657 25.7404L16.1196 22.5394L23.918 15.9723L3.65475 1L1 8.95079Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M50.5692 25.7404L39.5561 22.5394L42.8746 27.5371L37.9177 37.1813L44.4716 37.0987H54.261L50.5692 25.7404Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M16.1196 22.5394L5.10651 25.7404L1.43549 37.0987H11.2041L17.7581 37.1813L12.8011 27.5371L16.1196 22.5394Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M31.0526 28.0741L31.7578 15.9724L34.9518 7.36072H20.7239L23.9179 15.9724L24.6231 28.0741L24.8927 31.8739L24.9135 41.2703H30.7622L30.783 31.8739L31.0526 28.0741Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"}))},N=function(){return h.createElement("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M20.0002 7.9702V10.0302C20.0002 10.5802 19.5602 11.0302 19.0002 11.0502H17.0402C15.9602 11.0502 14.9702 10.2602 14.8802 9.1802C14.8202 8.5502 15.0602 7.9602 15.4802 7.5502C15.8502 7.1702 16.3602 6.9502 16.9202 6.9502H19.0002C19.5602 6.9702 20.0002 7.4202 20.0002 7.9702Z",fill:"#037DD6"}),h.createElement("path",{d:"M18.47 12.55H17.04C15.14 12.55 13.54 11.12 13.38 9.3C13.29 8.26 13.67 7.22 14.43 6.48C15.07 5.82 15.96 5.45 16.92 5.45H18.47C18.76 5.45 19 5.21 18.97 4.92C18.75 2.49 17.14 0.83 14.75 0.55C14.51 0.51 14.26 0.5 14 0.5H5C4.72 0.5 4.45 0.52 4.19 0.56C1.64 0.88 0 2.78 0 5.5V12.5C0 15.26 2.24 17.5 5 17.5H14C16.8 17.5 18.73 15.75 18.97 13.08C19 12.79 18.76 12.55 18.47 12.55ZM11 6.75H5C4.59 6.75 4.25 6.41 4.25 6C4.25 5.59 4.59 5.25 5 5.25H11C11.41 5.25 11.75 5.59 11.75 6C11.75 6.41 11.41 6.75 11 6.75Z",fill:"#037DD6"}))};function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function I(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var B=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,D=I((function(e){return B.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),j=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy?"production"===Vb.env.NODE_ENV:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if("production"!==Vb.env.NODE_ENV){var n=64===e.charCodeAt(0)&&105===e.charCodeAt(1);n&&this._alreadyInsertedOrderInsensitiveRule&&console.error("You're attempting to insert the following rule:\n"+e+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!n}if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(t){"production"===Vb.env.NODE_ENV||/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(e)||console.error('There was a problem inserting the following rule: "'+e+'"',t)}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0,"production"!==Vb.env.NODE_ENV&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),F="-ms-",U="-moz-",q="-webkit-",z="comm",H="rule",K="decl",V="@keyframes",W=Math.abs,$=String.fromCharCode,Y=Object.assign;function G(e){return e.trim()}function Z(e,t,n){return e.replace(t,n)}function Q(e,t){return e.indexOf(t)}function J(e,t){return 0|e.charCodeAt(t)}function X(e,t,n){return e.slice(t,n)}function ee(e){return e.length}function te(e){return e.length}function ne(e,t){return t.push(e),e}var re=1,ie=1,oe=0,se=0,ae=0,le="";function ue(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:re,column:ie,length:s,return:""}}function ce(e,t){return Y(ue("",null,null,"",null,null,0),e,{length:-e.length},t)}function he(){return ae=se<oe?J(le,se++):0,ie++,10===ae&&(ie=1,re++),ae}function de(){return J(le,se)}function fe(){return se}function pe(e,t){return X(le,e,t)}function me(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ge(e){return re=ie=1,oe=ee(le=e),se=0,[]}function ve(e){return le="",e}function ye(e){return G(pe(se-1,Ae(91===e?e+2:40===e?e+1:e)))}function be(e){for(;(ae=de())&&ae<33;)he();return me(e)>2||me(ae)>3?"":" "}function we(e,t){for(;--t&&he()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return pe(e,fe()+(t<6&&32==de()&&32==he()))}function Ae(e){for(;he();)switch(ae){case e:return se;case 34:case 39:34!==e&&39!==e&&Ae(ae);break;case 40:41===e&&Ae(e);break;case 92:he()}return se}function _e(e,t){for(;he()&&e+ae!==57&&(e+ae!==84||47!==de()););return"/*"+pe(t,se-1)+"*"+$(47===e?e:he())}function Ee(e){for(;!me(de());)he();return pe(e,se)}function Me(e){return ve(ke("",null,null,null,[""],e=ge(e),0,[0],e))}function ke(e,t,n,r,i,o,s,a,l){for(var u=0,c=0,h=s,d=0,f=0,p=0,m=1,g=1,v=1,y=0,b="",w=i,A=o,_=r,E=b;g;)switch(p=y,y=he()){case 40:if(108!=p&&58==J(E,h-1)){-1!=Q(E+=Z(ye(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=ye(y);break;case 9:case 10:case 13:case 32:E+=be(p);break;case 92:E+=we(fe()-1,7);continue;case 47:switch(de()){case 42:case 47:ne(xe(_e(he(),fe()),t,n),l);break;default:E+="/"}break;case 123*m:a[u++]=ee(E)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(E=Z(E,/\f/g,"")),f>0&&ee(E)-h&&ne(f>32?Ce(E+";",r,n,h-1):Ce(Z(E," ","")+";",r,n,h-2),l);break;case 59:E+=";";default:if(ne(_=Se(E,t,n,u,c,i,a,b,w=[],A=[],h),o),123===y)if(0===c)ke(E,t,_,_,w,o,h,a,A);else switch(99===d&&110===J(E,3)?100:d){case 100:case 108:case 109:case 115:ke(e,_,_,r&&ne(Se(e,_,_,0,0,i,a,b,i,w=[],h),A),i,A,h,a,r?w:A);break;default:ke(E,_,_,_,[""],A,0,a,A)}}u=c=f=0,m=v=1,b=E="",h=s;break;case 58:h=1+ee(E),f=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(ae=se>0?J(le,--se):0,ie--,10===ae&&(ie=1,re--),ae))continue;switch(E+=$(y),y*m){case 38:v=c>0?1:(E+="\f",-1);break;case 44:a[u++]=(ee(E)-1)*v,v=1;break;case 64:45===de()&&(E+=ye(he())),d=de(),c=h=ee(b=E+=Ee(fe())),y++;break;case 45:45===p&&2==ee(E)&&(m=0)}}return o}function Se(e,t,n,r,i,o,s,a,l,u,c){for(var h=i-1,d=0===i?o:[""],f=te(d),p=0,m=0,g=0;p<r;++p)for(var v=0,y=X(e,h+1,h=W(m=s[p])),b=e;v<f;++v)(b=G(m>0?d[v]+" "+y:Z(y,/&\f/g,d[v])))&&(l[g++]=b);return ue(e,t,n,0===i?H:a,l,u,c)}function xe(e,t,n){return ue(e,t,n,z,$(ae),X(e,2,-2),0)}function Ce(e,t,n,r){return ue(e,t,n,K,X(e,0,r),X(e,r+1,-1),r)}function Te(e,t){for(var n="",r=te(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Oe(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case K:return e.return=e.return||e.value;case z:return"";case V:return e.return=e.value+"{"+Te(e.children,r)+"}";case H:e.value=e.props.join(",")}return ee(n=Te(e.children,r))?e.return=e.value+"{"+n+"}":""}function Re(e){var t=te(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}var Pe=function(e,t,n){for(var r=0,i=0;r=i,i=de(),38===r&&12===i&&(t[n]=1),!me(i);)he();return pe(e,se)},Ne=new WeakMap,Le=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Ne.get(n))&&!r){Ne.set(e,!0);for(var i=[],o=function(e,t){return ve(function(e,t){var n=-1,r=44;do{switch(me(r)){case 0:38===r&&12===de()&&(t[n]=1),e[n]+=Pe(se-1,t,n);break;case 2:e[n]+=ye(r);break;case 4:if(44===r){e[++n]=58===de()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=$(r)}}while(r=he());return e}(ge(e),t))}(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[u]):s[u]+" "+o[a]}}},Ie=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},Be=function(e){return"comm"===e.type&&e.children.indexOf("emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason")>-1},De=function(e){return 105===e.type.charCodeAt(1)&&64===e.type.charCodeAt(0)},je=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},Fe=function(e,t,n){De(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),je(e)):function(e,t){for(var n=e-1;n>=0;n--)if(!De(t[n]))return!0;return!1}(t,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),je(e)))};function Ue(e,t){switch(function(e,t){return 45^J(e,0)?(((t<<2^J(e,0))<<2^J(e,1))<<2^J(e,2))<<2^J(e,3):0}(e,t)){case 5103:return q+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return q+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return q+e+U+e+F+e+e;case 6828:case 4268:return q+e+F+e+e;case 6165:return q+e+F+"flex-"+e+e;case 5187:return q+e+Z(e,/(\w+).+(:[^]+)/,q+"box-$1$2"+F+"flex-$1$2")+e;case 5443:return q+e+F+"flex-item-"+Z(e,/flex-|-self/,"")+e;case 4675:return q+e+F+"flex-line-pack"+Z(e,/align-content|flex-|-self/,"")+e;case 5548:return q+e+F+Z(e,"shrink","negative")+e;case 5292:return q+e+F+Z(e,"basis","preferred-size")+e;case 6060:return q+"box-"+Z(e,"-grow","")+q+e+F+Z(e,"grow","positive")+e;case 4554:return q+Z(e,/([^-])(transform)/g,"$1"+q+"$2")+e;case 6187:return Z(Z(Z(e,/(zoom-|grab)/,q+"$1"),/(image-set)/,q+"$1"),e,"")+e;case 5495:case 3959:return Z(e,/(image-set\([^]*)/,q+"$1$`$1");case 4968:return Z(Z(e,/(.+:)(flex-)?(.*)/,q+"box-pack:$3"+F+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+q+e+e;case 4095:case 3583:case 4068:case 2532:return Z(e,/(.+)-inline(.+)/,q+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ee(e)-1-t>6)switch(J(e,t+1)){case 109:if(45!==J(e,t+4))break;case 102:return Z(e,/(.+:)(.+)-([^]+)/,"$1"+q+"$2-$3$1"+U+(108==J(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Q(e,"stretch")?Ue(Z(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==J(e,t+1))break;case 6444:switch(J(e,ee(e)-3-(~Q(e,"!important")&&10))){case 107:return Z(e,":",":"+q)+e;case 101:return Z(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+q+(45===J(e,14)?"inline-":"")+"box$3$1"+q+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(J(e,t+11)){case 114:return q+e+F+Z(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return q+e+F+Z(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return q+e+F+Z(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return q+e+F+e+e}return e}var qe,ze,He,Ke,Ve="undefined"!=typeof document,We=Ve?void 0:(qe=function(){return I((function(){var e={};return function(t){return e[t]}}))},ze=new WeakMap,function(e){if(ze.has(e))return ze.get(e);var t=qe();return ze.set(e,t),t}),$e=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case K:e.return=Ue(e.value,e.length);break;case V:return Te([ce(e,{value:Z(e.value,"@","@"+q)})],r);case H:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Te([ce(e,{props:[Z(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Te([ce(e,{props:[Z(t,/:(plac\w+)/,":"+q+"input-$1")]}),ce(e,{props:[Z(t,/:(plac\w+)/,":-moz-$1")]}),ce(e,{props:[Z(t,/:(plac\w+)/,F+"input-$1")]})],r)}return""}))}}],Ye=function(e){var t=e.key;if("production"!==Vb.env.NODE_ENV&&!t)throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\nIf multiple caches share the same key they might \"fight\" for each other's style elements.");if(Ve&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||$e;if("production"!==Vb.env.NODE_ENV&&/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var i,o,s={},a=[];Ve&&(i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)})));var l,u=[Le,Ie];if("production"!==Vb.env.NODE_ENV&&u.push(function(e){return function(t,n,r){if("rule"===t.type&&!e.compat){var i=t.value.match(/(:first|:nth|:nth-last)-child/g);if(i){for(var o=t.parent?t.parent.children:r,s=o.length-1;s>=0;s--){var a=o[s];if(a.line<t.line)break;if(a.column<t.column){if(Be(a))return;break}}i.forEach((function(e){console.error('The pseudo class "'+e+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+e.split("-child")[0]+'-of-type".')}))}}}}({get compat(){return g.compat}}),Fe),Ve){var c,h=[Oe,"production"!==Vb.env.NODE_ENV?function(e){e.root||(e.return?c.insert(e.return):e.value&&e.type!==z&&c.insert(e.value+"{}"))}:(l=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],d=Re(u.concat(r,h));o=function(e,t,n,r){c=n,"production"!==Vb.env.NODE_ENV&&void 0!==t.map&&(c={insert:function(e){n.insert(e+t.map)}}),function(e){Te(Me(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(g.inserted[t.name]=!0)}}else{var f=[Oe],p=Re(u.concat(r,f)),m=We(r)(t);o=function(e,t,n,r){var i=t.name,o=function(e,t){var n=t.name;return void 0===m[n]&&(m[n]=function(e){return Te(Me(e),p)}(e?e+"{"+t.styles+"}":t.styles)),m[n]}(e,t);return void 0===g.compat?(r&&(g.inserted[i]=!0),"development"===Vb.env.NODE_ENV&&void 0!==t.map?o+t.map:o):r?void(g.inserted[i]=o):o}}var g={key:t,sheet:new j({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return g.sheet.hydrate(a),g},Ge={exports:{}},Ze={},Qe={};"production"===Vb.env.NODE_ENV?Ge.exports=function(){if(He)return Ze;He=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:switch(e=e.type){case l:case u:case r:case o:case i:case h:return e;default:switch(e=e&&e.$$typeof){case a:case c:case p:case f:case s:return e;default:return d}}case n:return d}}}function w(e){return b(e)===u}return Ze.AsyncMode=l,Ze.ConcurrentMode=u,Ze.ContextConsumer=a,Ze.ContextProvider=s,Ze.Element=t,Ze.ForwardRef=c,Ze.Fragment=r,Ze.Lazy=p,Ze.Memo=f,Ze.Portal=n,Ze.Profiler=o,Ze.StrictMode=i,Ze.Suspense=h,Ze.isAsyncMode=function(e){return w(e)||b(e)===l},Ze.isConcurrentMode=w,Ze.isContextConsumer=function(e){return b(e)===a},Ze.isContextProvider=function(e){return b(e)===s},Ze.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ze.isForwardRef=function(e){return b(e)===c},Ze.isFragment=function(e){return b(e)===r},Ze.isLazy=function(e){return b(e)===p},Ze.isMemo=function(e){return b(e)===f},Ze.isPortal=function(e){return b(e)===n},Ze.isProfiler=function(e){return b(e)===o},Ze.isStrictMode=function(e){return b(e)===i},Ze.isSuspense=function(e){return b(e)===h},Ze.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===h||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===m)},Ze.typeOf=b,Ze}():Ge.exports=(Ke||(Ke=1,"production"!==Vb.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var m=e.type;switch(m){case l:case u:case r:case o:case i:case h:return m;default:var g=m&&m.$$typeof;switch(g){case a:case c:case p:case f:case s:return g;default:return d}}case n:return d}}}var w=l,A=u,_=a,E=s,M=t,k=c,S=r,x=p,C=f,T=n,O=o,R=i,P=h,N=!1;function L(e){return b(e)===u}Qe.AsyncMode=w,Qe.ConcurrentMode=A,Qe.ContextConsumer=_,Qe.ContextProvider=E,Qe.Element=M,Qe.ForwardRef=k,Qe.Fragment=S,Qe.Lazy=x,Qe.Memo=C,Qe.Portal=T,Qe.Profiler=O,Qe.StrictMode=R,Qe.Suspense=P,Qe.isAsyncMode=function(e){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(e)||b(e)===l},Qe.isConcurrentMode=L,Qe.isContextConsumer=function(e){return b(e)===a},Qe.isContextProvider=function(e){return b(e)===s},Qe.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Qe.isForwardRef=function(e){return b(e)===c},Qe.isFragment=function(e){return b(e)===r},Qe.isLazy=function(e){return b(e)===p},Qe.isMemo=function(e){return b(e)===f},Qe.isPortal=function(e){return b(e)===n},Qe.isProfiler=function(e){return b(e)===o},Qe.isStrictMode=function(e){return b(e)===i},Qe.isSuspense=function(e){return b(e)===h},Qe.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===h||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===a||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===m)},Qe.typeOf=b}()),Qe);var Je=Ge.exports,Xe={};Xe[Je.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Xe[Je.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var et="undefined"!=typeof document;function tt(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var nt=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===et&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},rt=function(e,t,n){nt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",o=t;do{var s=e.insert(t===o?"."+r:"",o,e.sheet,!0);et||void 0===s||(i+=s),o=o.next}while(void 0!==o);if(!et&&0!==i.length)return i}};function it(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}var ot={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},st="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",at=/[A-Z]|^ms/g,lt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ut=function(e){return 45===e.charCodeAt(1)},ct=function(e){return null!=e&&"boolean"!=typeof e},ht=I((function(e){return ut(e)?e:e.replace(at,"-$&").toLowerCase()})),dt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(lt,(function(e,t,n){return _t={name:t,styles:n,next:_t},t}))}return 1===ot[e]||ut(e)||"number"!=typeof t||0===t?t:t+"px"};if("production"!==Vb.env.NODE_ENV){var ft=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,pt=["normal","none","initial","inherit","unset"],mt=dt,gt=/^-ms-/,vt=/-(.)/g,yt={};dt=function(e,t){if("content"===e&&("string"!=typeof t||-1===pt.indexOf(t)&&!ft.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=mt(e,t);return""===n||ut(e)||-1===e.indexOf("-")||void 0!==yt[e]||(yt[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(gt,"ms-").replace(vt,(function(e,t){return t.toUpperCase()}))+"?")),n}}var bt="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function wt(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles){if("production"!==Vb.env.NODE_ENV&&"NO_COMPONENT_SELECTOR"===n.toString())throw new Error(bt);return n}switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return _t={name:n.name,styles:n.styles,next:_t},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)_t={name:r.name,styles:r.styles,next:_t},r=r.next;var i=n.styles+";";return"production"!==Vb.env.NODE_ENV&&void 0!==n.map&&(i+=n.map),i}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=wt(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":ct(s)&&(r+=ht(o)+":"+dt(o,s)+";");else{if("NO_COMPONENT_SELECTOR"===o&&"production"!==Vb.env.NODE_ENV)throw new Error(bt);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=wt(e,t,s);switch(o){case"animation":case"animationName":r+=ht(o)+":"+a+";";break;default:"production"!==Vb.env.NODE_ENV&&"undefined"===o&&console.error("You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."),r+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)ct(s[l])&&(r+=ht(o)+":"+dt(o,s[l])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var o=_t,s=n(e);return _t=o,wt(e,t,s)}"production"!==Vb.env.NODE_ENV&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":if("production"!==Vb.env.NODE_ENV){var a=[],l=n.replace(lt,(function(e,t,n){var r="animation"+a.length;return a.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"}));a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+l+"`")}}if(null==t)return n;var u=t[n];return void 0!==u?u:n}var At,_t,Et=/label:\s*([^\s;\n{]+)\s*(;|$)/g;"production"!==Vb.env.NODE_ENV&&(At=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var Mt=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";_t=void 0;var o,s=e[0];null==s||void 0===s.raw?(r=!1,i+=wt(n,t,s)):("production"!==Vb.env.NODE_ENV&&void 0===s[0]&&console.error(st),i+=s[0]);for(var a=1;a<e.length;a++)i+=wt(n,t,e[a]),r&&("production"!==Vb.env.NODE_ENV&&void 0===s[a]&&console.error(st),i+=s[a]);"production"!==Vb.env.NODE_ENV&&(i=i.replace(At,(function(e){return o=e,""}))),Et.lastIndex=0;for(var l,u="";null!==(l=Et.exec(i));)u+="-"+l[1];var c=it(i)+u;return"production"!==Vb.env.NODE_ENV?{name:c,styles:i,map:o,next:_t,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:c,styles:i,next:_t}},kt="undefined"!=typeof document,St=!!d.useInsertionEffect&&d.useInsertionEffect,xt=kt&&St||function(e){return e()},Ct=St||c.useLayoutEffect,Tt="undefined"!=typeof document,Ot={}.hasOwnProperty,Rt=c.createContext("undefined"!=typeof HTMLElement?Ye({key:"css"}):null);"production"!==Vb.env.NODE_ENV&&(Rt.displayName="EmotionCacheContext"),Rt.Provider;var Pt=function(e){return c.forwardRef((function(t,n){var r=c.useContext(Rt);return e(t,r,n)}))};Tt||(Pt=function(e){return function(t){var n=c.useContext(Rt);return null===n?(n=Ye({key:"css"}),c.createElement(Rt.Provider,{value:n},e(t,n))):e(t,n)}});var Nt=c.createContext({});"production"!==Vb.env.NODE_ENV&&(Nt.displayName="EmotionThemeContext");var Lt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",It="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",Bt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;nt(t,n,r);var i=xt((function(){return rt(t,n,r)}));if(!Tt&&void 0!==i){for(var o,s=n.name,a=n.next;void 0!==a;)s+=" "+a.name,a=a.next;return c.createElement("style",((o={})["data-emotion"]=t.key+" "+s,o.dangerouslySetInnerHTML={__html:i},o.nonce=t.sheet.nonce,o))}return null},Dt=Pt((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Lt],o=[r],s="";"string"==typeof e.className?s=tt(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=Mt(o,void 0,c.useContext(Nt));if("production"!==Vb.env.NODE_ENV&&-1===a.name.indexOf("-")){var l=e[It];l&&(a=Mt([a,"label:"+l+";"]))}s+=t.key+"-"+a.name;var u={};for(var h in e)!Ot.call(e,h)||"css"===h||h===Lt||"production"!==Vb.env.NODE_ENV&&h===It||(u[h]=e[h]);return u.ref=n,u.className=s,c.createElement(c.Fragment,null,c.createElement(Bt,{cache:t,serialized:a,isStringTag:"string"==typeof i}),c.createElement(i,u))}));"production"!==Vb.env.NODE_ENV&&(Dt.displayName="EmotionCssPropInternal");var jt=!1,Ft=Pt((function(e,t){"production"===Vb.env.NODE_ENV||jt||!e.className&&!e.css||(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),jt=!0);var n=e.styles,r=Mt([n],void 0,c.useContext(Nt));if(!Tt){for(var i,o=r.name,s=r.styles,a=r.next;void 0!==a;)o+=" "+a.name,s+=a.styles,a=a.next;var l=!0===t.compat,u=t.insert("",{name:o,styles:s},t.sheet,l);return l?null:c.createElement("style",((i={})["data-emotion"]=t.key+"-global "+o,i.dangerouslySetInnerHTML={__html:u},i.nonce=t.sheet.nonce,i))}var h=c.useRef();return Ct((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,o=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(i=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),h.current=[n,i],function(){n.flush()}}),[t]),Ct((function(){var e=h.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&rt(t,r.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));"production"!==Vb.env.NODE_ENV&&(Ft.displayName="EmotionGlobal");var Ut=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var s=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))s=e(o);else for(var a in"production"!==Vb.env.NODE_ENV&&void 0!==o.styles&&void 0!==o.name&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(i&&(i+=" "),i+=s)}}return i},qt=function(e){var t,n=e.cache,r=e.serializedArr,i=xt((function(){for(var e="",t=0;t<r.length;t++){var i=rt(n,r[t],!1);Tt||void 0===i||(e+=i)}if(!Tt)return e}));return Tt||0===i.length?null:c.createElement("style",((t={})["data-emotion"]=n.key+" "+r.map((function(e){return e.name})).join(" "),t.dangerouslySetInnerHTML={__html:i},t.nonce=n.sheet.nonce,t))},zt=Pt((function(e,t){var n=!1,r=[],i=function(){if(n&&"production"!==Vb.env.NODE_ENV)throw new Error("css can only be used during render");for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];var s=Mt(i,t.registered);return r.push(s),nt(t,s,!1),t.key+"-"+s.name},o={css:i,cx:function(){if(n&&"production"!==Vb.env.NODE_ENV)throw new Error("cx can only be used during render");for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return function(e,t,n){var r=[],i=tt(e,r,n);return r.length<2?n:i+t(r)}(t.registered,i,Ut(r))},theme:c.useContext(Nt)},s=e.children(o);return n=!0,c.createElement(c.Fragment,null,c.createElement(qt,{cache:t,serializedArr:r}),s)}));if("production"!==Vb.env.NODE_ENV&&(zt.displayName="EmotionClassNames"),"production"!==Vb.env.NODE_ENV){var Ht="undefined"!=typeof document,Kt="undefined"!=typeof jest||"undefined"!=typeof vi;if(Ht&&!Kt){var Vt="undefined"!=typeof globalThis?globalThis:Ht?window:Wb,Wt="__EMOTION_REACT_"+"11.11.0".split(".")[0]+"__";Vt[Wt]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),Vt[Wt]=!0}}var $t="undefined"!=typeof document,Yt=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===$t&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Gt="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",Zt=/[A-Z]|^ms/g,Qt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Jt=function(e){return 45===e.charCodeAt(1)},Xt=function(e){return null!=e&&"boolean"!=typeof e},en=I((function(e){return Jt(e)?e:e.replace(Zt,"-$&").toLowerCase()})),tn=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Qt,(function(e,t,n){return dn={name:t,styles:n,next:dn},t}))}return 1===ot[e]||Jt(e)||"number"!=typeof t||0===t?t:t+"px"};if("production"!==Vb.env.NODE_ENV){var nn=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,rn=["normal","none","initial","inherit","unset"],on=tn,sn=/^-ms-/,an=/-(.)/g,ln={};tn=function(e,t){if("content"===e&&("string"!=typeof t||-1===rn.indexOf(t)&&!nn.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0))))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+t+"\"'`");var n=on(e,t);return""===n||Jt(e)||-1===e.indexOf("-")||void 0!==ln[e]||(ln[e]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+e.replace(sn,"ms-").replace(an,(function(e,t){return t.toUpperCase()}))+"?")),n}}var un="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function cn(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles){if("production"!==Vb.env.NODE_ENV&&"NO_COMPONENT_SELECTOR"===n.toString())throw new Error(un);return n}switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return dn={name:n.name,styles:n.styles,next:dn},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)dn={name:r.name,styles:r.styles,next:dn},r=r.next;var i=n.styles+";";return"production"!==Vb.env.NODE_ENV&&void 0!==n.map&&(i+=n.map),i}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=cn(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":Xt(s)&&(r+=en(o)+":"+tn(o,s)+";");else{if("NO_COMPONENT_SELECTOR"===o&&"production"!==Vb.env.NODE_ENV)throw new Error(un);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=cn(e,t,s);switch(o){case"animation":case"animationName":r+=en(o)+":"+a+";";break;default:"production"!==Vb.env.NODE_ENV&&"undefined"===o&&console.error("You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."),r+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)Xt(s[l])&&(r+=en(o)+":"+tn(o,s[l])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var o=dn,s=n(e);return dn=o,cn(e,t,s)}"production"!==Vb.env.NODE_ENV&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break;case"string":if("production"!==Vb.env.NODE_ENV){var a=[],l=n.replace(Qt,(function(e,t,n){var r="animation"+a.length;return a.push("const "+r+" = keyframes`"+n.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+r+"}"}));a.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(a,["`"+l+"`"]).join("\n")+"\n\nYou should wrap it with `css` like this:\n\ncss`"+l+"`")}}if(null==t)return n;var u=t[n];return void 0!==u?u:n}var hn,dn,fn=/label:\s*([^\s;\n{]+)\s*(;|$)/g;"production"!==Vb.env.NODE_ENV&&(hn=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var pn=D,mn=function(e){return"theme"!==e},gn=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?pn:mn},vn=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},yn="You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences",bn="undefined"!=typeof document,wn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;Yt(t,n,r);var i=xt((function(){return function(e,t,n){Yt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i="",o=t;do{var s=e.insert(t===o?"."+r:"",o,e.sheet,!0);$t||void 0===s||(i+=s),o=o.next}while(void 0!==o);if(!$t&&0!==i.length)return i}}(t,n,r)}));if(!bn&&void 0!==i){for(var o,s=n.name,a=n.next;void 0!==a;)s+=" "+a.name,a=a.next;return c.createElement("style",((o={})["data-emotion"]=t.key+" "+s,o.dangerouslySetInnerHTML={__html:i},o.nonce=t.sheet.nonce,o))}return null},An=function e(t,n){if("production"!==Vb.env.NODE_ENV&&void 0===t)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var r,i,o=t.__emotion_real===t,s=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var a=vn(t,n,o),l=a||gn(s),u=!l("as");return function(){var h=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==h[0]||void 0===h[0].raw)d.push.apply(d,h);else{"production"!==Vb.env.NODE_ENV&&void 0===h[0][0]&&console.error(yn),d.push(h[0][0]);for(var f=h.length,p=1;p<f;p++)"production"!==Vb.env.NODE_ENV&&void 0===h[0][p]&&console.error(yn),d.push(h[p],h[0][p])}var m=Pt((function(e,t,n){var r,o,h,f,p=u&&e.as||s,m="",g=[],v=e;if(null==e.theme){for(var y in v={},e)v[y]=e[y];v.theme=c.useContext(Nt)}"string"==typeof e.className?(r=t.registered,o=g,h=e.className,f="",h.split(" ").forEach((function(e){void 0!==r[e]?o.push(r[e]+";"):f+=e+" "})),m=f):null!=e.className&&(m=e.className+" ");var b=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";dn=void 0;var o,s=e[0];null==s||void 0===s.raw?(r=!1,i+=cn(n,t,s)):("production"!==Vb.env.NODE_ENV&&void 0===s[0]&&console.error(Gt),i+=s[0]);for(var a=1;a<e.length;a++)i+=cn(n,t,e[a]),r&&("production"!==Vb.env.NODE_ENV&&void 0===s[a]&&console.error(Gt),i+=s[a]);"production"!==Vb.env.NODE_ENV&&(i=i.replace(hn,(function(e){return o=e,""}))),fn.lastIndex=0;for(var l,u="";null!==(l=fn.exec(i));)u+="-"+l[1];var c=it(i)+u;return"production"!==Vb.env.NODE_ENV?{name:c,styles:i,map:o,next:dn,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:c,styles:i,next:dn}}(d.concat(g),t.registered,v);m+=t.key+"-"+b.name,void 0!==i&&(m+=" "+i);var w=u&&void 0===a?gn(p):l,A={};for(var _ in e)u&&"as"===_||w(_)&&(A[_]=e[_]);return A.className=m,A.ref=n,c.createElement(c.Fragment,null,c.createElement(wn,{cache:t,serialized:b,isStringTag:"string"==typeof p}),c.createElement(p,A))}));return m.displayName=void 0!==r?r:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=s,m.__emotion_styles=d,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return void 0===i&&"production"!==Vb.env.NODE_ENV?"NO_COMPONENT_SELECTOR":"."+i}}),m.withComponent=function(t,r){return e(t,L({},n,r,{shouldForwardProp:vn(m,r,!0)})).apply(void 0,d)},m}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){An[e]=An(e)}));var _n,En,Mn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Mt(t)}(_n||(_n=k(["\n html,\n body,\n div,\n span,\n applet,\n object,\n iframe,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p,\n blockquote,\n pre,\n a,\n abbr,\n acronym,\n address,\n big,\n cite,\n code,\n del,\n dfn,\n em,\n img,\n ins,\n kbd,\n q,\n s,\n samp,\n small,\n strike,\n strong,\n sub,\n sup,\n tt,\n var,\n b,\n u,\n i,\n center,\n dl,\n dt,\n dd,\n ol,\n ul,\n li,\n fieldset,\n form,\n label,\n legend,\n table,\n caption,\n tbody,\n tfoot,\n thead,\n tr,\n th,\n td,\n article,\n aside,\n canvas,\n details,\n embed,\n figure,\n figcaption,\n footer,\n header,\n hgroup,\n menu,\n nav,\n output,\n ruby,\n section,\n summary,\n time,\n mark,\n audio,\n video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n }\n article,\n aside,\n details,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n menu,\n nav,\n section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol,\n ul {\n list-style: none;\n }\n blockquote,\n q {\n quotes: none;\n }\n blockquote:before,\n blockquote:after,\n q:before,\n q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n"],["\n html,\n body,\n div,\n span,\n applet,\n object,\n iframe,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p,\n blockquote,\n pre,\n a,\n abbr,\n acronym,\n address,\n big,\n cite,\n code,\n del,\n dfn,\n em,\n img,\n ins,\n kbd,\n q,\n s,\n samp,\n small,\n strike,\n strong,\n sub,\n sup,\n tt,\n var,\n b,\n u,\n i,\n center,\n dl,\n dt,\n dd,\n ol,\n ul,\n li,\n fieldset,\n form,\n label,\n legend,\n table,\n caption,\n tbody,\n tfoot,\n thead,\n tr,\n th,\n td,\n article,\n aside,\n canvas,\n details,\n embed,\n figure,\n figcaption,\n footer,\n header,\n hgroup,\n menu,\n nav,\n output,\n ruby,\n section,\n summary,\n time,\n mark,\n audio,\n video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n }\n article,\n aside,\n details,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n menu,\n nav,\n section {\n display: block;\n }\n body {\n line-height: 1;\n }\n ol,\n ul {\n list-style: none;\n }\n blockquote,\n q {\n quotes: none;\n }\n blockquote:before,\n blockquote:after,\n q:before,\n q:after {\n content: '';\n content: none;\n }\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n"]))),kn=An.div(En||(En=k(["\n ","\n font-family: Roboto,sans-serif;\n"],["\n ","\n font-family: Roboto,sans-serif;\n"])),Mn),Sn=function(e){var t=c.useState(1),n=t[0],r=t[1],i=c.useRef(null);return c.useEffect((function(){i.current&&new(YS())({width:270,height:270,type:"svg",data:e.link,image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA2CAYAAACbZ/oUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAb1SURBVHgB3Vrdcds4EN4FJVo/fnAqOKWCOBVEqcBKBbbeLvLNWFeBnQpiz+SUe4tTwckVWK4gTgVRB9ZD9BNaBG4XJGiIon4oUYrtb0YiCIIEFvuD3QUQLPxslI8cUG98wJvdVv8SnihUc29v5HknVKyAKz8Uz0dd8wxNYfhnoaKE+GG916WHHRDya/HTqAOPHJrI8WgflHOqlKqaekTsFP/pv43uTYG5K0B9CasvENSB4hkK0JVKXTg7qm3P1mPA8K9CVUmnpkAdEjF7XMdEEtE9Ktb0vStfmnEL86KDcGgal1r9Jkj5Vin4Gj6uCMSPyhM/hsfla54cnlH4TeC+h43S6eC49E1JcU01JyGxPVDqb+boL9etR+1/Yc2UNYdtcUbAetHS32GjcETzcmpxO/gIfZxmq70tkWci+96o5qBzaItsBMTvUnlHu637W1PFzOG2tlhrgm1xttkfvUgTIlGcYSgFCaD2eIWuf561yCeJ7DTwQktl4rssAQDE8Rcvznu9gMNmJgAui61BfVbng+NiExSewsyOA5XwSRVc8G591+nBqvDEoQRo4ry+eKKFrM+SsDuSih3P+6HHS6Je+jw8R1ucSWfflT8P2jAH3B4c50uiWG0VeFF082dIXJvXiqT3XLCOh2KN/felGonqfzxbxN2XsCT6jdIZvXMKW8YirsYRF2uRR+zyDenId0iBcmtwhlK+1APYGvCi4Lqv0xjJoK3qUrHHOizcVp+tGokF/gEpUfx3pKWCLPYH2CB4UlHIt2yYFolwHFoFASsk0tp663U4vNm/W3Ft3TC322m5aoNWl319VeqGr5pgsqpanN1fXhVWxAa43XMEvCu1Bu/ScjUG7XQIITv6GtT5mt3E6SqsiSy4zRaV/IHXO5/mrxhLQcArvoxyhQeRdiQFCRrqADIAc3tEYijJyEA6RK5hFg4M6y8qYJG+fRFKiTADDC1Z5S4jH5k72GUjQ8ZmKW6Ta8hcZecAMoIvnKr+NBFs6qLgQSnUSp337muQIdjYKKvDObjO2i3FyDkKaGNEBFM4qAfFCQDICCxS7LZCaDjmQqkmR0CQIcih0rQ45OaaugeCnYBg4kYVMsDPRn6fXNbrNC4o9X3GEzRs8tq5HrxGmXW3Qr+ea0VQEcGhFWPFrqzb4ahRPBGQ/waxkHIZ8ARR3H3t0YTBGvBAGyvjY0SICNahU/jQDpjTIAzMv5B1XtfwVMY0YeuIOAUMmgYV+hgP9RaMA0KEv4KU0Prqed9ILI8gI7CID47LH1dcObT+ksR07MrcZBt2QAR3xLNTX/RFkzjjAF3ODdDXABkzimlrP98XL1wcd2x9nAXW3zEoPRaxIyfao30TBsx3XM7B/eukj3O45fu47whxQP7p/kaInANOLTmUTR1ThsVx/U7SUjZ4T4kKysElhbwTHGY9HjSKXY4uxipXBbi/ZQPmk047JOaUgagpCXsCtahMztaWwBPM42AdJeMGg0ZJp5OlgKtSzu2w343EDB5fUsg7NWZKCFyGuatuWFWBpwQ2vCR5uhymdezHIt5eOPIyLFbgqRHLMMQSkPLo8cdTBDtyjcTb40IvSb+nCDYL9jPAHhvYeOU0h2fnnp8ceLmM100QrFO2vz39miXUFPMmPa0wfnxGmBLrCYKzEmfec9KBP/3SvKcdBcodI8h6VglBKUU11kcA28taA20acN1OupltnGVeXnYjLyW6JcvbijicSaaDkvojGE26mugvlcUM3MAHYsPRdRWsjYot1rmHb6v1CSZHn9y9JkU45O3ADQq/DWPeGlniVVo3ORgZjL2qkHBg3FjIAKFYd7isRTojcX60sPeH9dyvk4B/CmAbYrI4RtgyzVQ+RkhPHPE13FvKLlP5WEErQJAQ4D8J4gqeOUwyPthqYWv63EHZEb5EjgdlDthKbzVdsy3YVjpahykjcoWbjZR64S8JFdgglJSRyj4QjLKDIDZDMG2UFfP56qx9XvscxiaQo2ynKUc+0L1b2Jge0zrYnrepbZ3DyBzssiZutYQ7Dx3YACi/2V3cClMdqkmBjn0z4eWacxBZg1aB7qI2ZEM2kkuTZJvs+4m8NJ+DIF1Ks5+j96N4omjmDmeFcSjFSb9Rqs77EIZbI4nPSPJ0H4hv0mZkvB23Q2uQ3c8kFi5PSAs4bZ5zJFSgHUejm2EAwuc1M3ZTJ89R6ogq8P1rtCHwZl6sHD8rHQw/BnNUz6riA5ltH+RNmQzbohM1GZ7Q41M89UUHW/Q5LAFVBYLPp1TBYlY8oRDUJXxACadJi1dXkjnfXWLzKnkQtBm+4vqqjWfer69yBIKXOJPW4RNFU9+GDWIFbvMpng9ZHmyJY+P7YdqpUOIjrU1z3VbkM58rcjUN/geU/3c0eMPNdAAAAABJRU5ErkJggg==",dotsOptions:{color:"black",type:"rounded"},imageOptions:{margin:5},cornersDotOptions:{color:"#f66a07"},qrOptions:{errorCorrectionLevel:"M"}}).append(i.current)}),[i]),h.createElement(kn,null,h.createElement("div",{style:S.backdrop,onClick:e.onClose}),h.createElement("div",{style:S.modal},h.createElement("div",{style:S.closeButtonContainer},h.createElement("div",{style:S.right},h.createElement("span",{style:S.closeButton,onClick:e.onClose},h.createElement(C,null)))),h.createElement("div",{style:S.logoContainer},h.createElement(P,null)),h.createElement("div",null,h.createElement("div",{style:S.tabcontainer},h.createElement("div",{style:S.flexContainer},h.createElement("div",{onClick:function(){return r(1)},style:M(M(M({},S.tab),1===n?S.tabactive:{}),S.flexItem)},"Desktop"),h.createElement("div",{onClick:function(){return r(2)},style:M(M(M({},S.tab),2===n?S.tabactive:{}),S.flexItem)},"Mobile"))),h.createElement("div",{style:{display:1===n?"none":"block"}},h.createElement("div",{style:S.flexContainer},h.createElement("div",{style:M({textAlign:"center",marginTop:4},S.flexItem)},h.createElement("div",{ref:i,style:S.center}),h.createElement("div",{style:S.connectMobileText},"Scan to connect and sign with ",h.createElement("br",null),h.createElement("span",{style:S.blue},h.createElement("b",null,"MetaMask mobile app")))))),h.createElement("div",{style:{display:2===n?"none":"block"}},h.createElement("div",{style:S.item},h.createElement(x,{Icon:T,text:"\n Trusted by over 30 million users to buy, store, send and swap crypto\n securely"})),h.createElement("div",{style:S.item},h.createElement(x,{Icon:R,text:"\n The leading crypto wallet & gateway to blockchain apps built\n on Ethereum Mainnet, Polygon, Optimism, and many other\n networks"})),h.createElement("div",{style:S.item},h.createElement(x,{Icon:N,text:"\n Puts you in control of your digital interactions by making power\n of cryptography more accessible"})),h.createElement("button",{style:S.button,onClick:e.metaMaskInstaller.startDesktopOnboarding},h.createElement(O,null),h.createElement("span",{style:S.installExtensionText},"Install MetaMask Extension"))))))},xn=function(e){return h.createElement(kn,null,h.createElement("div",{style:S.backdrop,onClick:e.onClose}),h.createElement("div",{style:S.modal},h.createElement("div",{style:S.closeButtonContainer},h.createElement("div",{style:S.right},h.createElement("span",{style:S.closeButton,onClick:e.onClose},h.createElement(C,null)))),h.createElement("div",{style:S.logoContainer},h.createElement(P,null)),h.createElement("div",null,h.createElement("div",{style:M(M({},S.flexContainer),{flexDirection:"column"})},h.createElement("div",{style:M(M({textAlign:"center",marginTop:"30px",marginBottom:"30px"},S.flexItem),{fontSize:16})},"Please open the MetaMask wallet app and select the code on the screen OR disconnect"),h.createElement("div",{id:"sdk-mm-otp-value",style:{padding:10,fontSize:32,display:"none"}}),h.createElement("div",{style:M({},S.notice)},"* If a number doesn't appear after opening MetaMask, please click disconnect and re-scan the QRCode.")),h.createElement("div",{style:{marginTop:"20px"}},h.createElement("button",{style:M(M(M({},S.button),S.blue),{marginTop:"5px",color:"white"}),onClick:e.onDisconnect},"Disconnect")))))},Cn=function(){function e(){this.updateOTPValue=function(e){var t=document.getElementById("sdk-mm-otp-value");t&&(t.textContent=e,t.style.display="block")}}return e.prototype.renderInstallModal=function(e){this.installContainer||(this.installContainer=e.parentElement,A(e.parentElement).render(h.createElement(Sn,{link:e.link,onClose:e.onClose,metaMaskInstaller:e.metaMaskInstaller})))},e.prototype.renderPendingModal=function(e){this.pendingContainer||(this.pendingContainer=e.parentElement,A(e.parentElement).render(h.createElement(xn,{onClose:e.onClose,onDisconnect:e.onDisconnect,updateOTPValue:e.updateOTPValue})))},e.prototype.unmount=function(){var e,t,n,r;this.pendingContainer&&(null===(t=null===(e=this.pendingContainer)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.pendingContainer),this.pendingContainer=void 0),this.installContainer&&(null===(r=null===(n=this.installContainer)||void 0===n?void 0:n.parentNode)||void 0===r||r.removeChild(this.installContainer),this.installContainer=void 0)},e}();e.ModalLoader=Cn}(t)}(0,WS);var GS=WS;const ZS=({link:e,debug:t})=>{const n=document.createElement("div");document.body.appendChild(n);const r=new GS.ModalLoader;t&&(console.debug("################## Installing Modal #################"),console.debug(`${e}`),console.debug(`npx uri-scheme open ${e} --ios`),console.debug(`npx uri-scheme open ${e} --android`),console.debug(`adb shell am start -a android.intent.action.VIEW -d "${e}"`));const i=()=>{r&&r.unmount()};return r.renderInstallModal({parentElement:n,link:e,metaMaskInstaller:jS.getInstance(),onClose:i}),{installModal:r,onClose:i}},QS=e=>{const t=document.createElement("div");document.body.appendChild(t);let n=!1;const r=new GS.ModalLoader,i=()=>{t.style.display="none"},o=e=>{r&&r.updateOTPValue(e)},s=()=>{n?t.style.display="block":(r.renderPendingModal({parentElement:t,onClose:i,onDisconnect:e,updateOTPValue:o}),n=!0)};return s(),{installModal:r,onClose:i,mount:s,updateOTPValue:o}};class JS{constructor(e){var t,n;this.sentFirstConnect=!1,this.options=e;const r=!0===(null===(t=e.logging)||void 0===t?void 0:t.developerMode)||!0===(null===(n=e.logging)||void 0===n?void 0:n.sdk);this.developerMode=r,this.communicationLayerPreference=e.communicationLayerPreference,e.modals.install||(e.modals.install=ZS),e.modals.otp||(e.modals.otp=QS),this.connector=this.initializeConnector()}initializeConnector(){var n,r;const{dappMetadata:i,webRTCLib:o,communicationLayerPreference:s,transports:a,enableDebug:l=!1,timer:u,ecies:c,storage:h,communicationServerUrl:d,autoConnect:f,logging:p}=this.options;this.sentFirstConnect=!1,this.developerMode&&console.debug("RemoteConnection::initializeConnector() intialize connector");const m=DS.getInstance();return this.connector=new wb({platform:m.getPlatformType(),communicationLayerPreference:s,transports:a,webRTCLib:o,dappMetadata:i,analytics:l,communicationServerUrl:d,sdkVersion:"0.3.2",context:"dapp",ecies:c,storage:h,autoConnect:f,logging:p}),u&&(this.developerMode&&console.debug("RemoteConnection::setup reset background timer",u),null===(n=null==u?void 0:u.stopBackgroundTimer)||void 0===n||n.call(u),null===(r=null==u?void 0:u.runBackgroundTimer)||void 0===r||r.call(u,(()=>!1),1e4)),!0===(null==f?void 0:f.enable)&&(this.developerMode&&console.debug("RemoteConnection::initializeConnector() autoconnect",f),this.connector.startAutoConnect().then((e=>{(null==e?void 0:e.lastActive)&&this.handleSecureReconnection({channelConfig:e,deeplink:!1})}))),m.isSecure()||this.connector.on(e.EventType.OTP,(e=>{var t,n,r,i;if(this.otpAnswer!==e){if(this.developerMode&&console.debug("RemoteConnection::on 'OTP' ",e),this.otpAnswer=e,!this.pendingModal){this.developerMode&&console.debug("RemoteConnection::on 'OTP' init pending modal");const e=()=>{var e,t,n,r,i,o;null===(t=(e=this.options.modals).onPendingModalDisconnect)||void 0===t||t.call(e),null===(r=null===(n=this.pendingModal)||void 0===n?void 0:n.onClose)||void 0===r||r.call(n),null===(o=null===(i=this.pendingModal)||void 0===i?void 0:i.updateOTPValue)||void 0===o||o.call(i,"")};this.pendingModal=null===(n=(t=this.options.modals).otp)||void 0===n?void 0:n.call(t,e)}null===(i=null===(r=this.pendingModal)||void 0===r?void 0:r.updateOTPValue)||void 0===i||i.call(r,e)}})),this.connector.on(e.EventType.SDK_RPC_CALL,(e=>t(this,void 0,void 0,(function*(){var t,n;this.developerMode&&console.debug("RemoteConnection::on 'sdk_rpc_call' requestParam",e);const r=RS.getProvider(),i=yield r.request(e);this.developerMode&&console.debug("RemoteConnection::on 'sdk_rpc_call' result",i),null===(n=null===(t=this.pendingModal)||void 0===t?void 0:t.onClose)||void 0===n||n.call(t)})))),this.connector.on(e.EventType.AUTHORIZED,(()=>t(this,void 0,void 0,(function*(){var e,t,n,r;try{null===(t=null===(e=this.pendingModal)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e),null===(r=null===(n=this.installModal)||void 0===n?void 0:n.onClose)||void 0===r||r.call(n);const i=RS.getProvider();this.developerMode&&console.debug("RCPMS::on 'authorized' provider.state",i.getState()),yield i.forceInitializeState()}catch(e){}})))),this.connector.on(e.EventType.CLIENTS_DISCONNECTED,(()=>{var t,n;this.developerMode&&console.debug(`[RCPMS] received '${e.EventType.CLIENTS_DISCONNECTED}'`),this.sentFirstConnect=!1,m.isSecure()||(RS.getProvider().handleDisconnect({terminate:!1}),null===(n=null===(t=this.pendingModal)||void 0===t?void 0:t.updateOTPValue)||void 0===n||n.call(t,""))})),this.connector.on(e.EventType.TERMINATE,(()=>{var e,t;m.isBrowser()?alert("SDK Connection has been terminated from MetaMask."):console.info("SDK Connection has been terminated"),null===(t=null===(e=this.pendingModal)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e),this.pendingModal=void 0,this.otpAnswer=void 0,RS.getProvider().handleDisconnect({terminate:!0})})),this.connector}getUniversalLink(){if(!this.universalLink)throw new Error("connection not started. run startConnection() first.");return this.universalLink}handleSecureReconnection({channelConfig:e,deeplink:n}){var r,i,o,s,a,l,u,c,h;return t(this,void 0,void 0,(function*(){const d=DS.getInstance(),f=d.getPlatformType(),p=!(f===PS.DesktopWeb||f===PS.NonBrowser&&!d.isReactNative()),m=RS.getProvider();if(this.developerMode&&console.debug(`RemoteConnection::handleSecureReconnection() trustedDevice=${p} deepLink=${n} providerConnected=${m.isConnected()} connector.connected=${this.connector.isConnected()}`,e),m.emit("connecting"),p&&n){const t=null!==(o=null===(i=null===(r=this.connector)||void 0===r?void 0:r.getKeyInfo())||void 0===i?void 0:i.ecies.public)&&void 0!==o?o:"";let n=encodeURI(`channelId=${e.channelId}&comm=${this.communicationLayerPreference}&pubkey=${t}`);m.isConnected()&&(n+="&redirect=true");const l=`https://metamask.app.link/connect?${n}`,u=`metamask://connect?${n}`;null===(a=(s=DS.getInstance()).openDeeplink)||void 0===a||a.call(s,l,u,"_self")}else if(!p){const e=()=>{var e,t,n,r;null===(t=(e=this.options.modals).onPendingModalDisconnect)||void 0===t||t.call(e),null===(r=null===(n=this.pendingModal)||void 0===n?void 0:n.onClose)||void 0===r||r.call(n)},n=()=>t(this,void 0,void 0,(function*(){let e=0;for(;e<100;){if(this.otpAnswer)return this.otpAnswer;yield new Promise((e=>setTimeout((()=>e()),1e3))),e+=1}return""}));this.pendingModal?null===(u=null===(l=this.pendingModal)||void 0===l?void 0:l.mount)||void 0===u||u.call(l):this.pendingModal=null===(h=(c=this.options.modals).otp)||void 0===h?void 0:h.call(c,e),n().then((e=>{var t,n;this.otpAnswer!==e&&(this.otpAnswer=e,null===(n=null===(t=this.pendingModal)||void 0===t?void 0:t.updateOTPValue)||void 0===n||n.call(t,e))}))}}))}startConnection(){return t(this,void 0,void 0,(function*(){return new Promise(((n,r)=>{var i;if(!this.connector)return r(new Error("no connector defined"));const o=RS.getProvider(),s=this.connector.isReady(),a=this.connector.isConnected(),l=this.connector.isPaused(),u=DS.getInstance(),c=u.getPlatformType(),h=c===PS.DesktopWeb||c===PS.NonBrowser&&!u.isReactNative();if(this.developerMode&&console.debug(`RemoteConnection::startConnection() isRemoteReady=${s} isRemoteConnected=${a} isRemotePaused=${l} providerConnected=${o.isConnected()}`),s){this.developerMode&&console.debug("RemoteConnection::startConnection() Already connected.");const e=this.connector.getChannelConfig();return e&&this.handleSecureReconnection({channelConfig:e,deeplink:!0}),n(!0)}o.emit("connecting"),null===(i=this.connector)||void 0===i||i.startAutoConnect().then((i=>t(this,void 0,void 0,(function*(){return this.developerMode&&console.debug("RemoteConnection::startConnection after startAutoConnect",i),(null==i?void 0:i.lastActive)?(yield this.handleSecureReconnection({channelConfig:i,deeplink:!0}),n(!0)):(this.connector&&(this.connector.generateChannelId().then((({channelId:e,pubKey:t})=>{var n,r,i,o;const s=encodeURI(`channelId=${e}&comm=${this.communicationLayerPreference}&pubkey=${t}`),a=`https://metamask.app.link/connect?${s}`,l=`metamask://connect?${s}`;h?this.installModal=null===(r=(n=this.options.modals).install)||void 0===r?void 0:r.call(n,{link:a,debug:this.developerMode}):(console.log("OPEN LINK",a),null===(o=(i=DS.getInstance()).openDeeplink)||void 0===o||o.call(i,a,l,"_self")),this.universalLink=a})).catch((e=>{var t,n,i,o;this.otpAnswer=void 0,null===(n=null===(t=this.pendingModal)||void 0===t?void 0:t.onClose)||void 0===n||n.call(t),null===(o=null===(i=this.installModal)||void 0===i?void 0:i.onClose)||void 0===o||o.call(i),r(e)})),this.connector.on(e.EventType.CLIENTS_READY,(()=>t(this,void 0,void 0,(function*(){var e,t,r,i,o,s;this.developerMode&&console.debug(`RemoteConnection::startConnection::on 'authorized' sentFirstConnect=${this.sentFirstConnect}`),this.sentFirstConnect||(this.sentFirstConnect=!0,this.otpAnswer||(this.otpAnswer=void 0,null===(t=null===(e=this.pendingModal)||void 0===e?void 0:e.updateOTPValue)||void 0===t||t.call(e,"")),null===(i=null===(r=this.pendingModal)||void 0===r?void 0:r.onClose)||void 0===i||i.call(r),null===(s=null===(o=this.installModal)||void 0===o?void 0:o.onClose)||void 0===s||s.call(o)),n(!0)}))))),!0)}))))}))}))}getChannelConfig(){var e;return null===(e=this.connector)||void 0===e?void 0:e.getChannelConfig()}getKeyInfo(){var e;return null===(e=this.connector)||void 0===e?void 0:e.getKeyInfo()}getConnector(){if(!this.connector)throw new Error("invalid remote connector");return this.connector}isConnected(){var e;return(null===(e=this.connector)||void 0===e?void 0:e.isReady())||!1}isPaused(){var e;return null===(e=this.connector)||void 0===e?void 0:e.isPaused()}disconnect(e){var t,n,r;this.developerMode&&console.debug("RemoteConnection::disconnect()",e),(null==e?void 0:e.terminate)&&(RS.getProvider().handleDisconnect({terminate:!0}),null===(n=null===(t=this.pendingModal)||void 0===t?void 0:t.onClose)||void 0===n||n.call(t),this.otpAnswer=void 0),null===(r=this.connector)||void 0===r||r.disconnect(e)}}class XS{constructor({wcConnector:e,forceRestart:t=!1}){var n;this.sentFirstConnect=!1,this.wcConnector=e,this.forceRestart=t;const r=`uri=${encodeURIComponent(null===(n=this.wcConnector)||void 0===n?void 0:n.uri)}`;this.universalLink=`https://metamask.app.link/wc?${r}`,this.deepLink=`metamask://wc?${r}`}getChannelConfig(){throw new Error("Method not implemented.")}getConnector(){return this.wcConnector}getUniversalLink(){return this.universalLink}startConnection(){return new Promise(((e,t)=>{this.wcConnector.connected?e(!0):this.wcConnector.createSession().then((()=>{const t=DS.getInstance(),n=t.getPlatformType();let r;n===PS.DesktopWeb||n===PS.NonBrowser?r=ZS({link:this.universalLink}):t.openDeeplink(this.universalLink,this.deepLink,"_self"),this.wcConnector.on("connect",(()=>{(null==r?void 0:r.onClose)&&"function"==typeof r.onClose&&(null==r||r.onClose()),this.sentFirstConnect||(e(!0),this.sentFirstConnect=!0)}))})).catch((e=>t(e)))}))}isConnected(){return this.wcConnector.connected}disconnect(){}}class ex{constructor({debug:e,enabled:t}={debug:!1,enabled:!1}){this.debug=!1,this.enabled=!1,e&&(this.debug=e),this.enabled=t}persistChannelConfig(e){return t(this,void 0,void 0,(function*(){const t=JSON.stringify(e);this.debug&&console.debug(`StorageManagerWeb::persistChannelConfig() enabled=${this.enabled}`,e),localStorage.setItem(US,t)}))}getPersistedChannelConfig(){return t(this,void 0,void 0,(function*(){let e;try{if(this.debug&&console.debug(`StorageManagerWeb::getPersistedChannelConfig() enabled=${this.enabled}`),e=localStorage.getItem(US),this.debug&&console.debug("StorageManagerWeb::getPersistedChannelConfig()",e),!e)return;const t=JSON.parse(e);return this.debug&&console.debug("StorageManagerWeb::getPersisChannel channelConfig",t),t}catch(e){return void console.debug("Can't find existing channel config",e)}}))}terminate(){return t(this,void 0,void 0,(function*(){this.debug&&console.debug(`StorageManagerWeb::terminate() enabled=${this.enabled}`),localStorage.removeItem(US)}))}}class tx extends Zb{constructor(e={storage:{enabled:!1},injectProvider:!0,forceInjectProvider:!1,enableDebug:!0,shouldShimWeb3:!0,dappMetadata:{name:"",url:""}}){var t,n;if(super(),this._initialized=!1,this.debug=!1,!(null===(t=e.dappMetadata)||void 0===t?void 0:t.name)&&!(null===(n=e.dappMetadata)||void 0===n?void 0:n.url)){if("undefined"==typeof window||"undefined"==typeof document)throw new Error("You must provide dAppMetadata option (name and/or url)");e.dappMetadata={url:window.location.href,name:document.title}}this.options=e,this.initialize(this.options).catch((e=>{console.error("MetaMaskSDK error during initialization",e)}))}initialize(n){var r,i;return t(this,void 0,void 0,(function*(){const{dappMetadata:t,injectProvider:o=!0,forceInjectProvider:s=!1,forceDeleteProvider:a,shouldShimWeb3:l=!0,checkInstallationImmediately:u,checkInstallationOnAllCalls:c,preferDesktop:h,openDeeplink:d,useDeeplink:f=!1,wakeLockType:p,communicationLayerPreference:m=e.CommunicationLayerPreference.SOCKET,WalletConnectInstance:g,forceRestartWalletConnect:v,webRTCLib:y,transports:b,timer:w,enableDebug:A=!0,communicationServerUrl:_,autoConnect:E,modals:M,storage:k,logging:S={}}=n;if(this._initialized)return void console.info("SDK::initialize() already initialized.");const x=!0===(null==S?void 0:S.developerMode);this.debug=(null==S?void 0:S.sdk)||x,this.debug&&console.debug("SDK::initialize() now",n);const C=Object.assign({},S);x&&(C.sdk=!0,C.eciesLayer=!0,C.keyExchangeLayer=!0,C.remoteLayer=!0,C.serviceLayer=!0);const T=DS.init({useDeepLink:f,preferredOpenLink:d,wakeLockStatus:p,debug:this.debug}),O=T.getPlatformType(),R=O===PS.NonBrowser,P=(e=>e||"undefined"!=typeof window&&window.navigator.brave)(s),N=(()=>{if("undefined"==typeof window||"undefined"!=typeof window&&void 0===window.ethereum)return!0;const e=!(void 0!==window.ethereum)&&function(){const e=[/\.xml$/u,/\.pdf$/u],t=window.location.pathname;for(let n=0;n<e.length;n++)if(e[n].test(t))return!1;return!0}()&&function(){var e,t;return"undefined"!=typeof window&&void 0!==(null===window||void 0===window?void 0:window.document)&&"html"===(null===(t=null===(e=window.document)||void 0===e?void 0:e.doctype)||void 0===t?void 0:t.name)}()&&function(){var e;if("undefined"==typeof document)return!1;const t=null===(e=null===document||void 0===document?void 0:document.documentElement)||void 0===e?void 0:e.nodeName;return!t||"html"===t.toLowerCase()}()&&!function(){const e=["uscourts.gov","dropbox.com","webbyawards.com","cdn.shopify.com/s/javascripts/tricorder/xtld-read-only-frame.html","adyen.com","gravityforms.com","harbourair.com","ani.gamer.com.tw","blueskybooking.com","sharefile.com"],t=window.location.href;let n;for(let r=0;r<e.length;r++){const i=e[r].replace(".","\\.");if(n=new RegExp(`(?:https?:\\/\\/)(?:(?!${i}).)*$`,"u"),!n.test(t))return!0}return!1}();return e})();if(P||N||R){P&&a&&(RS.destroy(),delete window.ethereum),!0!==(null==k?void 0:k.enabled)||k.storageManager||(k.storageManager=(e=>new ex(e))(k)),T.isBrowser(),this.dappMetadata=t,this.remoteConnection=new JS({communicationLayerPreference:m,dappMetadata:t,webRTCLib:y,enableDebug:A,timer:w,transports:b,communicationServerUrl:_,storage:k,autoConnect:E,logging:C,modals:Object.assign(Object.assign({},M),{onPendingModalDisconnect:this.terminate.bind(this)})}),g&&(this.walletConnect=new XS({forceRestart:null!=v&&v,wcConnector:g}));const n=jS.init({preferDesktop:null!=h&&h,remote:this.remoteConnection,debug:this.debug});this.installer=n,null===(r=this.remoteConnection.getConnector())||void 0===r||r.on(e.EventType.CONNECTION_STATUS,(t=>{this.emit(e.EventType.CONNECTION_STATUS,t)})),null===(i=this.remoteConnection.getConnector())||void 0===i||i.on(e.EventType.SERVICE_STATUS,(t=>{this.emit(e.EventType.SERVICE_STATUS,t)})),this.provider=KS({platformType:O,communicationLayerPreference:m,checkInstallationOnAllCalls:c,injectProvider:o,shouldShimWeb3:l,installer:n,remoteConnection:this.remoteConnection,walletConnect:this.walletConnect,debug:this.debug}),u&&n.start({wait:!0})}else{if(!window.ethereum)throw console.error("window.ethereum is not available."),new Error("Invalid SDK provider status");this.provider=window.ethereum}this._initialized=!0}))}resume(){var e,t,n;(null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t?void 0:t.isReady())||(this.debug&&console.debug("SDK::resume channel"),null===(n=this.remoteConnection)||void 0===n||n.startConnection())}disconnect(){var e;null===(e=this.remoteConnection)||void 0===e||e.disconnect()}terminate(){var e;this.debug&&console.debug("SDK::terminate()",this.remoteConnection),null===(e=this.remoteConnection)||void 0===e||e.disconnect({terminate:!0,sendMessage:!0})}isInitialized(){return this._initialized}ping(){var e,t;null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t||t.ping()}keyCheck(){var e,t;null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t||t.keyCheck()}getWalletConnectConnector(){if(!this.walletConnect)throw new Error("invalid");return this.walletConnect}testStorage(){var e,t;return null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t?void 0:t.testStorage()}getChannelConfig(){var e;return null===(e=this.remoteConnection)||void 0===e?void 0:e.getChannelConfig()}getServiceStatus(){var e,t;return null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t?void 0:t.getServiceStatus()}getDappMetadata(){return this.dappMetadata}getKeyInfo(){var e;return null===(e=this.remoteConnection)||void 0===e?void 0:e.getKeyInfo()}resetKeys(){var e,t;null===(t=null===(e=this.remoteConnection)||void 0===e?void 0:e.getConnector())||void 0===t||t.resetKeys()}getProvider(){return this.provider}connect(){var e;return t(this,void 0,void 0,(function*(){return yield null===(e=this.provider)||void 0===e?void 0:e.request({method:"eth_requestAccounts",params:[]})}))}getUniversalLink(){var e,t;const n=null===(e=this.remoteConnection)||void 0===e?void 0:e.getUniversalLink(),r=null===(t=this.walletConnect)||void 0===t?void 0:t.getUniversalLink(),i=n||r;if(!i)throw new Error("No Universal Link available, please call eth_requestAccounts first.");return i}}e.ECIES=Iv,e.MetaMaskSDK=tx,e.RemoteCommunication=wb,e.SocketService=vb,e.default=tx,Object.defineProperty(e,"__esModule",{value:!0})}(t)},8099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7117);function i(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function o(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function s(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function a(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function l(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function c(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function h(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function d(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),c(e/4294967296>>>0,t,n),c(e>>>0,t,n+4),t}function f(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),h(e>>>0,t,n),h(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},t.writeUint16BE=i,t.writeInt16BE=i,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=s,t.readUint32BE=a,t.readInt32LE=l,t.readUint32LE=u,t.writeUint32BE=c,t.writeInt32BE=c,t.writeUint32LE=h,t.writeInt32LE=h,t.readInt64BE=function(e,t){void 0===t&&(t=0);var n=s(e,t),r=s(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},t.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*a(e,t)+a(e,t+4)},t.readInt64LE=function(e,t){void 0===t&&(t=0);var n=l(e,t);return 4294967296*l(e,t+4)+n-4294967296*(n>>31)},t.readUint64LE=function(e,t){void 0===t&&(t=0);var n=u(e,t);return 4294967296*u(e,t+4)+n},t.writeUint64BE=d,t.writeInt64BE=d,t.writeUint64LE=f,t.writeInt64LE=f,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},t.writeUintBE=function(e,t,n,i){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,s=e/8+i-1;s>=i;s--)n[s]=t/o&255,o*=256;return n},t.writeUintLE=function(e,t,n,i){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===i&&(i=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s<i+e/8;s++)n[s]=t/o&255,o*=256;return n},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},t.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},t.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},t.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t}},7117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},1416:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const r=n(6008),i=n(8099),o=n(7309);function s(e,n=t.defaultRandomSource){return n.randomBytes(e)}t.defaultRandomSource=new r.SystemRandomSource,t.randomBytes=s,t.randomUint32=function(e=t.defaultRandomSource){const n=s(4,e),r=(0,i.readUint32LE)(n);return(0,o.wipe)(n),r};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function l(e,n=a,r=t.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let i="";const l=n.length,u=256-256%l;for(;e>0;){const t=s(Math.ceil(256*e/u),r);for(let r=0;r<t.length&&e>0;r++){const o=t[r];o<u&&(i+=n.charAt(o%l),e--)}(0,o.wipe)(t)}return i}t.randomString=l,t.randomStringForEntropy=function(e,n=a,r=t.defaultRandomSource){return l(Math.ceil(e/(Math.log(n.length)/Math.LN2)),n,r)}},5455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0,t.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}}},8871:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;const r=n(7309);t.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const e=n(5883);e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,r.wipe)(t),n}}},6008:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;const r=n(5455),i=n(8871);t.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}}},7309:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},8826:function(e){"use strict";!function(t){function n(e){return parseInt(e)===e}function r(e){if(!n(e.length))return!1;for(var t=0;t<e.length;t++)if(!n(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function s(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var a,l={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n<e.length;){var r=e.charCodeAt(n++);37===r?(t.push(parseInt(e.substr(n,2),16)),n+=2):t.push(r)}return i(t)},fromBytes:function(e){for(var t=[],n=0;n<e.length;){var r=e[n];r<128?(t.push(String.fromCharCode(r)),n++):r>191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},u=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},fromBytes:function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(a[(240&r)>>4]+a[15&r])}return t.join("")}}),c={16:10,24:12,32:14},h=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],f=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],_=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],E=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],M=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],n=0;n<e.length;n+=4)t.push(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]);return t}var x=function(e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};x.prototype._prepare=function(){var e=c[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var n,r=4*(e+1),i=this.key.length/4,o=S(this.key);for(t=0;t<i;t++)n=t>>2,this._Ke[n][t%4]=o[t],this._Kd[e-n][t%4]=o[t];for(var s,a=0,l=i;l<r;){if(s=o[i-1],o[0]^=d[s>>16&255]<<24^d[s>>8&255]<<16^d[255&s]<<8^d[s>>24&255]^h[a]<<24,a+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1];else{for(t=1;t<i/2;t++)o[t]^=o[t-1];for(s=o[i/2-1],o[i/2]^=d[255&s]^d[s>>8&255]<<8^d[s>>16&255]<<16^d[s>>24&255]<<24,t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&l<r;)u=l>>2,f=l%4,this._Ke[u][f]=o[t],this._Kd[e-u][f]=o[t++],l++}for(var u=1;u<e;u++)for(var f=0;f<4;f++)s=this._Kd[u][f],this._Kd[u][f]=_[s>>24&255]^E[s>>16&255]^M[s>>8&255]^k[255&s]},x.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],r=S(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var s=1;s<t;s++){for(i=0;i<4;i++)n[i]=p[r[i]>>24&255]^m[r[(i+1)%4]>>16&255]^g[r[(i+2)%4]>>8&255]^v[255&r[(i+3)%4]]^this._Ke[s][i];r=n.slice()}var a,l=o(16);for(i=0;i<4;i++)a=this._Ke[t][i],l[4*i]=255&(d[r[i]>>24&255]^a>>24),l[4*i+1]=255&(d[r[(i+1)%4]>>16&255]^a>>16),l[4*i+2]=255&(d[r[(i+2)%4]>>8&255]^a>>8),l[4*i+3]=255&(d[255&r[(i+3)%4]]^a);return l},x.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],r=S(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var s=1;s<t;s++){for(i=0;i<4;i++)n[i]=y[r[i]>>24&255]^b[r[(i+3)%4]>>16&255]^w[r[(i+2)%4]>>8&255]^A[255&r[(i+1)%4]]^this._Kd[s][i];r=n.slice()}var a,l=o(16);for(i=0;i<4;i++)a=this._Kd[t][i],l[4*i]=255&(f[r[i]>>24&255]^a>>24),l[4*i+1]=255&(f[r[(i+3)%4]>>16&255]^a>>16),l[4*i+2]=255&(f[r[(i+2)%4]>>8&255]^a>>8),l[4*i+3]=255&(f[255&r[(i+1)%4]]^a);return l};var C=function(e){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(e)};C.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r<e.length;r+=16)s(e,n,0,r,r+16),s(n=this._aes.encrypt(n),t,r);return t},C.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r<e.length;r+=16)s(e,n,0,r,r+16),s(n=this._aes.decrypt(n),t,r);return t};var T=function(e,t){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastCipherblock=i(t,!0),this._aes=new x(e)};T.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r<e.length;r+=16){s(e,n,0,r,r+16);for(var a=0;a<16;a++)n[a]^=this._lastCipherblock[a];this._lastCipherblock=this._aes.encrypt(n),s(this._lastCipherblock,t,r)}return t},T.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r<e.length;r+=16){s(e,n,0,r,r+16),n=this._aes.decrypt(n);for(var a=0;a<16;a++)t[r+a]=n[a]^this._lastCipherblock[a];s(e,this._lastCipherblock,0,r,r+16)}return t};var O=function(e,t,n){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=o(16);n||(n=1),this.segmentSize=n,this._shiftRegister=i(t,!0),this._aes=new x(e)};O.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,n=i(e,!0),r=0;r<n.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)n[r+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(n,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return n},O.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,n=i(e,!0),r=0;r<n.length;r+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)n[r+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return n};var R=function(e,t){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new x(e)};R.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n<t.length;n++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[n]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},R.prototype.decrypt=R.prototype.encrypt;var P=function(e){if(!(this instanceof P))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=o(16),this.setValue(e)):this.setBytes(e)};P.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},P.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},P.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var N=function(e,t){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof P||(t=new P(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(e)};N.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n<t.length;n++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[n]^=this._remainingCounter[this._remainingCounterIndex++];return t},N.prototype.decrypt=N.prototype.encrypt;var L={AES:x,Counter:P,ModeOfOperation:{ecb:C,cbc:T,cfb:O,ofb:R,ctr:N},utils:{hex:u,utf8:l},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,n=o(e.length+t);s(e,n);for(var r=e.length;r<n.length;r++)n[r]=t;return n},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,r=0;r<t;r++)if(e[n+r]!==t)throw new Error("PKCS#7 invalid padding byte");var a=o(n);return s(e,a,0,0,n),a}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:s}};e.exports=L}()},5528:(e,t,n)=>{e.exports=function(e){const t="api.js: ",r=this,i=n(8737),o=n(979),s=n(1789),a=new(n(3737)),{attributes:l,showAttributes:u,showAttributeErrors:c,showRuleDependencies:h}=n(8862),d=n(2595),f=function(e,t,n){const r=`<span class="${i.style.CLASS_CTRLCHAR}">`,o="</span>",s=`<span class="${i.style.CLASS_NOMATCH}">`,a="</span>";let l,u="";for(;Array.isArray(e)&&0!==e.length;){if("number"!=typeof t)throw new Error("abnfToHtml: beg must be type number");if(t>=e.length)break;l="number"!=typeof n||t+n>=e.length?e.length:t+n;let c=0;for(let n=t;n<l;n+=1){const t=e[n];if(t>=32&&t<=126)switch(1===c?(u+=o,c=0):2===c&&(u+=a,c=0),t){case 32:u+=" ";break;case 60:u+="<";break;case 62:u+=">";break;case 38:u+="&";break;case 34:u+=""";break;case 39:u+="'";break;case 92:u+="\";break;default:u+=String.fromCharCode(t)}else 9===t||10===t||13===t?(0===c?(u+=r,c=1):2===c&&(u+=a+r,c=1),9===t&&(u+="TAB"),10===t&&(u+="LF"),13===t&&(u+="CR")):(0===c?(u+=s,c=2):1===c&&(u+=o+s,c=2),u+=`\\x${i.utils.charToHex(t)}`)}2===c&&(u+=a),1===c&&(u+=o);break}return u},p=function(e,t,n){let r="";for(let i=t;i<t+n;i+=1){const t=e[i];if(t>=32&&t<=126)r+=String.fromCharCode(t);else switch(t){case 9:r+="\\t";break;case 10:r+="\\n";break;case 13:r+="\\r";break;default:r+="\\unknown"}}return r};let m,g=!1,v=!1,y=!1,b=!1,w=0;if(this.errors=[],Buffer.isBuffer(e))this.chars=o.decode("BINARY",e);else if(Array.isArray(e))this.chars=e.slice();else{if("string"!=typeof e)throw new Error(`${t}input source is not a string, byte Buffer or character array`);this.chars=o.decode("STRING",e)}this.sabnf=o.encode("STRING",this.chars),this.scan=function(e,t){this.lines=s(this.chars,this.errors,e,t),g=!0},this.parse=function(e,n){if(!g)throw new Error(`${t}grammar not scanned`);a.syntax(this.chars,this.lines,this.errors,e,n),v=!0},this.translate=function(){if(!v)throw new Error(`${t}grammar not scanned and parsed`);const e=a.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=e.rules,this.udts=e.udts,m=e.lineMap,y=!0)},this.attributes=function(){if(!y)throw new Error(`${t}grammar not scanned, parsed and translated`);return w=l(this.rules,this.udts,m,this.errors),b=!0,w},this.generate=function(e){if(this.lines=s(this.chars,this.errors,e),this.errors.length)return;if(a.syntax(this.chars,this.lines,this.errors,e),this.errors.length)return;const t=a.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=t.rules,this.udts=t.udts,m=t.lineMap,w=l(this.rules,this.udts,m,this.errors),b=!0)},this.displayRules=function(e="index"){if(!y)throw new Error(`${t}grammar not scanned, parsed and translated`);return d(this.rules,this.udts,e)},this.displayRuleDependencies=function(e="index"){if(!b)throw new Error(`${t}no attributes - must be preceeded by call to attributes()`);return h(e)},this.displayAttributes=function(e="index"){if(!b)throw new Error(`${t}no attributes - must be preceeded by call to attributes()`);return w&&c(e),u(e)},this.displayAttributeErrors=function(){if(!b)throw new Error(`${t}no attributes - must be preceeded by call to attributes()`);return c()},this.toSource=function(e){if(!b)throw new Error(`${t}can't generate parser source - must be preceeded by call to attributes()`);if(w)throw new Error(`${t}can't generate parser source - attributes have ${w} errors`);return a.generateSource(this.chars,this.lines,this.rules,this.udts,e)},this.toObject=function(){if(!b)throw new Error(`${t}can't generate parser source - must be preceeded by call to attributes()`);if(w)throw new Error(`${t}can't generate parser source - attributes have ${w} errors`);return a.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function(){return function(e,t,n){let r,i,o,s;return r="",e.forEach((e=>{i=t[e.line],r+=`${i.lineNo}: `,r+=`${i.beginChar}: `,r+=e.char-i.beginChar+": ",o=i.beginChar,s=e.char-i.beginChar,r+=p(n,o,s),r+=" >> ",o=e.char,s=i.beginChar+i.length-e.char,r+=p(n,o,s),r+="\n",r+=`${i.lineNo}: `,r+=`${i.beginChar}: `,r+=e.char-i.beginChar+": ",r+="error: ",r+=e.msg,r+="\n"})),r}(this.errors,this.lines,this.chars)},this.errorsToHtml=function(e){return function(e,t,n,r){const[o]=i;let s="";const a=`<span class="${o.CLASS_NOMATCH}">»</span>`;return s+=`<p><table class="${o.CLASS_GRAMMAR}">\n`,r&&"string"==typeof r&&(s+=`<caption>${r}</caption>\n`),s+="<tr><th>line<br>no.</th><th>line<br>offset</th><th>error<br>offset</th><th><br>text</th></tr>\n",e.forEach((e=>{let r,o,l,u,c,h="",d="";0===t.length?(c=a,o=0):(r=t[e.line],l=r.beginChar,e.char>l&&(h=f(n,l,e.char-l)),l=e.char,u=r.beginChar+r.length,l<u&&(d=f(n,l,u-l)),c=h+a+d,o=e.char-r.beginChar,s+="<tr>",s+=`<td>${e.line}</td><td>${r.beginChar}</td><td>${o}</td><td>${c}</td>`,s+="</tr>\n",s+="<tr>",s+=`<td colspan="3"></td><td>↑: ${i.utils.stringToAsciiHtml(e.msg)}</td>`,s+="</tr>\n")})),s+="</table></p>\n",s}(this.errors,this.lines,this.chars,e)},this.linesToAscii=function(){return function(e){let t="Annotated Input Grammar";return e.forEach((e=>{t+="\n",t+=`line no: ${e.lineNo}`,t+=` : char index: ${e.beginChar}`,t+=` : length: ${e.length}`,t+=` : abnf: ${p(r.chars,e.beginChar,e.length)}`})),t+="\n",t}(this.lines)},this.linesToHtml=function(){return function(e){let t="";return t+=`<table class="${i.style.CLASS_GRAMMAR}">\n`,t+="<caption>Annotated Input Grammar</caption>\n",t+="<tr>",t+="<th>line<br>no.</th><th>first<br>char</th><th><br>length</th><th><br>text</th>",t+="</tr>\n",e.forEach((e=>{t+="<tr>",t+=`<td>${e.lineNo}`,t+=`</td><td>${e.beginChar}`,t+=`</td><td>${e.length}`,t+=`</td><td>${f(r.chars,e.beginChar,e.length)}`,t+="</td>",t+="</tr>\n"})),t+="</table>\n",t}(this.lines)}}},8862:(e,t,n)=>{e.exports=function(){const e=n(8276),{ruleAttributes:t,showAttributes:r,showAttributeErrors:i}=n(4246),{ruleDependencies:o,showRuleDependencies:s}=n(7008);class a{constructor(e,t){this.rules=e,this.udts=t,this.ruleCount=e.length,this.udtCount=t.length,this.startRule=0,this.dependenciesComplete=!1,this.attributesComplete=!1,this.isMutuallyRecursive=!1,this.ruleIndexes=this.indexArray(this.ruleCount),this.ruleAlphaIndexes=this.indexArray(this.ruleCount),this.ruleTypeIndexes=this.indexArray(this.ruleCount),this.udtIndexes=this.indexArray(this.udtCount),this.udtAlphaIndexes=this.indexArray(this.udtCount),this.attrsErrorCount=0,this.attrs=[],this.attrsErrors=[],this.attrsWorking=[],this.ruleDeps=[];for(let t=0;t<this.ruleCount;t+=1)this.attrs.push(this.attrGen(this.rules[t])),this.attrsWorking.push(this.attrGen(this.rules[t])),this.ruleDeps.push(this.rdGen(e[t],this.ruleCount,this.udtCount));this.compRulesAlpha=this.compRulesAlpha.bind(this),this.compUdtsAlpha=this.compUdtsAlpha.bind(this),this.compRulesType=this.compRulesType.bind(this),this.compRulesGroup=this.compRulesGroup.bind(this)}attrGen(e){return{left:!1,nested:!1,right:!1,empty:!1,finite:!1,cyclic:!1,leaf:!1,isOpen:!1,isComplete:!1,rule:e}}attrInit(e){e.left=!1,e.nested=!1,e.right=!1,e.empty=!1,e.finite=!1,e.cyclic=!1,e.leaf=!1,e.isOpen=!1,e.isComplete=!1}attrCopy(e,t){e.left=t.left,e.nested=t.nested,e.right=t.right,e.empty=t.empty,e.finite=t.finite,e.cyclic=t.cyclic,e.leaf=t.leaf,e.isOpen=t.isOpen,e.isComplete=t.isComplete,e.rule=t.rule}rdGen(t,n,r){return{rule:t,recursiveType:e.ATTR_N,groupNumber:-1,refersTo:this.falseArray(n),refersToUdt:this.falseArray(r),referencedBy:this.falseArray(n)}}typeToString(t){switch(t){case e.ATTR_N:return" N";case e.ATTR_R:return" R";case e.ATTR_MR:return"MR";default:return"UNKNOWN"}}falseArray(e){const t=[];if(e>0)for(let n=0;n<e;n+=1)t.push(!1);return t}falsifyArray(e){for(let t=0;t<e.length;t+=1)e[t]=!1}indexArray(e){const t=[];if(e>0)for(let n=0;n<e;n+=1)t.push(n);return t}compRulesAlpha(e,t){return this.rules[e].lower<this.rules[t].lower?-1:this.rules[e].lower>this.rules[t].lower?1:0}compUdtsAlpha(e,t){return this.udts[e].lower<this.udts[t].lower?-1:this.udts[e].lower>this.udts[t].lower?1:0}compRulesType(e,t){return this.ruleDeps[e].recursiveType<this.ruleDeps[t].recursiveType?-1:this.ruleDeps[e].recursiveType>this.ruleDeps[t].recursiveType?1:0}compRulesGroup(t,n){if(this.ruleDeps[t].recursiveType===e.ATTR_MR&&this.ruleDeps[n].recursiveType===e.ATTR_MR){if(this.ruleDeps[t].groupNumber<this.ruleDeps[n].groupNumber)return-1;if(this.ruleDeps[t].groupNumber>this.ruleDeps[n].groupNumber)return 1}return 0}}return{attributes:function(e=[],n=[],r=[],i=[]){const s=new a(e,n);return o(s),t(s),s.attrsErrorCount&&i.push({line:0,char:0,msg:`${s.attrsErrorCount} attribute errors`}),s.attrsErrorCount},showAttributes:r,showAttributeErrors:i,showRuleDependencies:s}}()},3737:(e,t,n)=>{e.exports=function(){const e=n(8737),t=e.ids,r=new(n(4216)),i=new(n(1832)),o=new(n(3610)),s=new e.parser;s.ast=new e.ast,s.callbacks=r.callbacks,s.ast.callbacks=i.callbacks;const a=function(e,t,n){if(t<0||t>=n)return-1;for(let n=0;n<e.length;n+=1)if(t>=e[n].beginChar&&t<e[n].beginChar+e[n].length)return n;return-1},l=function(e,t){let n=-1;if(t<e.length)for(let r=t;r<e.length;r+=1)if(null!==e[r]){n=e[r];break}return n};this.syntax=function(e,t,n,r,i){if(i){if("traceObject"!==i.traceObject)throw new TypeError("parser: trace argument is not a trace object");s.trace=i}const l={};l.errors=n,l.strict=!!r,l.lines=t,l.findLine=a,l.charsLength=e.length,l.ruleCount=0,s.parse(o,"file",e,l).success||n.push({line:0,char:0,msg:"syntax analysis of input grammar failed"})},this.semantic=function(e,n,r){const i={};return i.errors=r,i.lines=n,i.findLine=a,i.charsLength=e.length,s.ast.translate(i),r.length?null:(i.rules.forEach((e=>{const n=[],r=[];let i=0;e.opcodes.forEach((e=>{e.type===t.ALT&&1===e.children.length||e.type===t.CAT&&1===e.children.length||e.type===t.REP&&1===e.min&&1===e.max?r.push(null):(r.push(i),n.push(e),i+=1)})),r.push(i),n.forEach((e=>{if(e.type===t.ALT||e.type===t.CAT)for(let t=0;t<e.children.length;t+=1)e.children[t]=l(r,e.children[t])})),e.opcodes=n})),{rules:i.rules,udts:i.udts,lineMap:i.rulesLineMap})},this.generateSource=function(e,n,r,i,o){let s,a,l,u="",c=0,h=1/0,d=0;const f=[],p=[];let m=0,g=0,v=0,y=0,b=0,w=0,A=0,_=0,E=0,M=0,k=0,S=0,x=0,C=0,T=0;r.forEach((e=>{f.push(e.lower),c+=e.opcodes.length,e.opcodes.forEach((e=>{switch(e.type){case t.ALT:m+=1;break;case t.CAT:g+=1;break;case t.RNM:v+=1;break;case t.UDT:y+=1;break;case t.REP:b+=1;break;case t.AND:w+=1;break;case t.NOT:A+=1;break;case t.BKA:S+=1;break;case t.BKN:x+=1;break;case t.BKR:k+=1;break;case t.ABG:C+=1;break;case t.AEN:T+=1;break;case t.TLS:for(_+=1,s=0;s<e.string.length;s+=1)e.string[s]<h&&(h=e.string[s]),e.string[s]>d&&(d=e.string[s]);break;case t.TBS:for(E+=1,s=0;s<e.string.length;s+=1)e.string[s]<h&&(h=e.string[s]),e.string[s]>d&&(d=e.string[s]);break;case t.TRG:M+=1,e.min<h&&(h=e.min),e.max>d&&(d=e.max);break;default:throw new Error("generateSource: unrecognized opcode")}}))})),f.sort(),i.length>0&&(i.forEach((e=>{p.push(e.lower)})),p.sort());let O,R="module.exports";return o&&"string"==typeof o&&(R=`let ${o}`),u+="// copyright: Copyright (c) 2021 Lowell D. Thomas, all rights reserved<br>\n",u+="// license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)<br>\n",u+="//\n",u+="// Generated by apg-js, Version 4.0.0 [apg-js](https://github.com/ldthomas/apg-js)\n",u+=`${R} = function grammar(){\n`,u+=" // ```\n",u+=" // SUMMARY\n",u+=` // rules = ${r.length}\n`,u+=` // udts = ${i.length}\n`,u+=` // opcodes = ${c}\n`,u+=" // --- ABNF original opcodes\n",u+=` // ALT = ${m}\n`,u+=` // CAT = ${g}\n`,u+=` // REP = ${b}\n`,u+=` // RNM = ${v}\n`,u+=` // TLS = ${_}\n`,u+=` // TBS = ${E}\n`,u+=` // TRG = ${M}\n`,u+=" // --- SABNF superset opcodes\n",u+=` // UDT = ${y}\n`,u+=` // AND = ${w}\n`,u+=` // NOT = ${A}\n`,u+=` // BKA = ${S}\n`,u+=` // BKN = ${x}\n`,u+=` // BKR = ${k}\n`,u+=` // ABG = ${C}\n`,u+=` // AEN = ${T}\n`,u+=" // characters = [",u+=_+E+M===0?" none defined ]":`${h} - ${d}]`,y>0&&(u+=" + user defined"),u+="\n",u+=" // ```\n",u+=" /* OBJECT IDENTIFIER (for internal parser use) */\n",u+=" this.grammarObject = 'grammarObject';\n",u+="\n",u+=" /* RULES */\n",u+=" this.rules = [];\n",r.forEach(((e,t)=>{let n=" this.rules[";n+=t,n+="] = {name: '",n+=e.name,n+="', lower: '",n+=e.lower,n+="', index: ",n+=e.index,n+=", isBkr: ",n+=e.isBkr,n+="};\n",u+=n})),u+="\n",u+=" /* UDTS */\n",u+=" this.udts = [];\n",i.length>0&&i.forEach(((e,t)=>{let n=" this.udts[";n+=t,n+="] = {name: '",n+=e.name,n+="', lower: '",n+=e.lower,n+="', index: ",n+=e.index,n+=", empty: ",n+=e.empty,n+=", isBkr: ",n+=e.isBkr,n+="};\n",u+=n})),u+="\n",u+=" /* OPCODES */\n",r.forEach(((e,n)=>{n>0&&(u+="\n"),u+=` /* ${e.name} */\n`,u+=` this.rules[${n}].opcodes = [];\n`,e.opcodes.forEach(((e,o)=>{let s;switch(e.type){case t.ALT:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, children: [${e.children.toString()}]};// ALT\n`;break;case t.CAT:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, children: [${e.children.toString()}]};// CAT\n`;break;case t.RNM:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, index: ${e.index}};// RNM(${r[e.index].name})\n`;break;case t.BKR:e.index>=r.length?(a=i[e.index-r.length].name,l=i[e.index-r.length].lower):(a=r[e.index].name,l=r[e.index].lower),s="%i",e.bkrCase===t.BKR_MODE_CS&&(s="%s"),e.bkrMode===t.BKR_MODE_UM?s+="%u":s+="%p",a=s+a,u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, index: ${e.index}, lower: '${l}', bkrCase: ${e.bkrCase}, bkrMode: ${e.bkrMode}};// BKR(\\${a})\n`;break;case t.UDT:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, empty: ${e.empty}, index: ${e.index}};// UDT(${i[e.index].name})\n`;break;case t.REP:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, min: ${e.min}, max: ${e.max}};// REP\n`;break;case t.AND:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}};// AND\n`;break;case t.NOT:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}};// NOT\n`;break;case t.ABG:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}};// ABG(%^)\n`;break;case t.AEN:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}};// AEN(%$)\n`;break;case t.BKA:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}};// BKA\n`;break;case t.BKN:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}};// BKN\n`;break;case t.TLS:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, string: [${e.string.toString()}]};// TLS\n`;break;case t.TBS:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, string: [${e.string.toString()}]};// TBS\n`;break;case t.TRG:u+=` this.rules[${n}].opcodes[${o}] = {type: ${e.type}, min: ${e.min}, max: ${e.max}};// TRG\n`;break;default:throw new Error("parser.js: ~143: unrecognized opcode")}}))})),u+="\n",u+=" // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n",u+=" this.toString = function toString(){\n",u+=' let str = "";\n',n.forEach((t=>{const n=t.beginChar+t.length;O="",u+=' str += "';for(let r=t.beginChar;r<n;r+=1){switch(e[r]){case 9:O=" ";break;case 10:O="\\n";break;case 13:O="\\r";break;case 34:O='\\"';break;case 92:O="\\\\";break;default:O=String.fromCharCode(e[r])}u+=O}u+='";\n'})),u+=" return str;\n",u+=" }\n",u+="}\n",u},this.generateObject=function(e,t,n){const r={},i=[],o=[],s=e.slice(0);return r.grammarObject="grammarObject",t.forEach((e=>{i.push(e.lower)})),i.sort(),n.length>0&&(n.forEach((e=>{o.push(e.lower)})),o.sort()),r.callbacks=[],i.forEach((e=>{r.callbacks[e]=!1})),n.length>0&&o.forEach((e=>{r.callbacks[e]=!1})),r.rules=t,r.udts=n,r.toString=function(){return s},r}}},4246:(e,t,n)=>{e.exports=function(){const e=n(8276);let t=null;function r(e){return!(e.left||e.nested||e.right||e.cyclic)&&e.empty}function i(e){return!!(e.left||e.nested||e.right||e.cyclic)}function o(t,n,a,l){t.attrInit(l);const u=n[a];switch(u.type){case e.ALT:!function(e,t,n,r){let i=0;const s=t[n],a=s.children.length,l=[];for(i=0;i<a;i+=1)l.push(e.attrGen());for(i=0;i<a;i+=1)o(e,t,s.children[i],l[i]);for(r.left=!1,r.right=!1,r.nested=!1,r.empty=!1,r.finite=!1,r.cyclic=!1,i=0;i<a;i+=1)l[i].left&&(r.left=!0),l[i].nested&&(r.nested=!0),l[i].right&&(r.right=!0),l[i].empty&&(r.empty=!0),l[i].finite&&(r.finite=!0),l[i].cyclic&&(r.cyclic=!0)}(t,n,a,l);break;case e.CAT:!function(e,t,n,s){let a=0;const l=t[n],u=l.children.length,c=[];for(a=0;a<u;a+=1)c.push(e.attrGen());for(a=0;a<u;a+=1)o(e,t,l.children[a],c[a]);s.left=function(e,t){for(let n=0;n<t;n+=1){if(e[n].left)return!0;if(!e[n].empty)return!1}return!1}(c,u),s.right=function(e,t){for(let n=t-1;n>=0;n-=1){if(e[n].right)return!0;if(!e[n].empty)return!1}return!1}(c,u),s.nested=function(e,t){let n=0,o=0,s=0;for(n=0;n<t;n+=1)if(e[n].nested)return!0;for(n=0;n<t;n+=1)if(e[n].right&&!e[n].leaf)for(o=n+1;o<t;o+=1)if(!r(e[o]))return!0;for(n=t-1;n>=0;n-=1)if(e[n].left&&!e[n].leaf)for(o=n-1;o>=0;o-=1)if(!r(e[o]))return!0;for(n=0;n<t;n+=1)if(!e[n].empty&&!i(e[n]))for(o=n+1;o<t;o+=1)if(i(e[o]))for(s=o+1;s<t;s+=1)if(!e[s].empty&&!i(e[s]))return!0;return!1}(c,u),s.empty=function(e,t){for(let n=0;n<t;n+=1)if(!e[n].empty)return!1;return!0}(c,u),s.finite=function(e,t){for(let n=0;n<t;n+=1)if(!e[n].finite)return!1;return!0}(c,u),s.cyclic=function(e,t){for(let n=0;n<t;n+=1)if(!e[n].cyclic)return!1;return!0}(c,u)}(t,n,a,l);break;case e.REP:o(t,n,a+1,l),0===u.min&&(l.empty=!0,l.finite=!0);break;case e.RNM:s(t,n[a].index,l);break;case e.BKR:!function(e,t,n,r){const i=t[n];i.index>=e.ruleCount?(r.empty=e.udts[i.index-e.ruleCount].empty,r.finite=!0):(s(e,i.index,r),r.left=!1,r.nested=!1,r.right=!1,r.cyclic=!1)}(t,n,a,l);break;case e.AND:case e.NOT:case e.BKA:case e.BKN:o(t,n,a+1,l),l.empty=!0;break;case e.TLS:l.empty=!n[a].string.length,l.finite=!0,l.cyclic=!1;break;case e.TBS:case e.TRG:l.empty=!1,l.finite=!0,l.cyclic=!1;break;case e.UDT:l.empty=u.empty,l.finite=!0,l.cyclic=!1;break;case e.ABG:case e.AEN:l.empty=!0,l.finite=!0,l.cyclic=!1;break;default:throw new Error(`unknown opcode type: ${u}`)}}function s(e,t,n){const r=e.attrsWorking[t];r.isComplete?e.attrCopy(n,r):r.isOpen?t===e.startRule?t===e.startRule&&(n.left=!0,n.right=!0,n.cyclic=!0,n.leaf=!0):n.finite=!0:(r.isOpen=!0,o(e,r.rule.opcodes,0,n),r.left=n.left,r.right=n.right,r.nested=n.nested,r.empty=n.empty,r.finite=n.finite,r.cyclic=n.cyclic,r.leaf=!1,r.isOpen=!1,r.isComplete=!0)}const a=e=>e?"t":"f",l=e=>e?"e":"f",u=(n,r,i,o)=>{let s=`${n}:${r}:`;return s+=`${l(i.left)} `,s+=`${a(i.nested)} `,s+=`${a(i.right)} `,s+=`${l(i.cyclic)} `,s+=(i.finite?"t":"e")+" ",s+=`${a(i.empty)}:`,s+=`${t.typeToString(o.recursiveType)}:`,s+=o.recursiveType===e.ATTR_MR?o.groupNumber:"-",s+=`:${i.rule.name}\n`,s},c=()=>{let e="LEGEND - t=true, f=false, e=error\n";return e+="sequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n","LEGEND - t=true, f=false, e=error\nsequence:rule index:left nested right cyclic finite empty:type:group number:rule name\n"},h=e=>{let n=0,r=0,i=null,o=null,s="",{ruleIndexes:a}=t;for(97===e?a=t.ruleAlphaIndexes:116===e&&(a=t.ruleTypeIndexes),n=0;n<t.ruleCount;n+=1)r=a[n],i=t.attrs[r],o=t.ruleDeps[r],s+=u(n,r,i,o);return s};return{ruleAttributes:e=>{t=e;let n=0,r=0;const i=t.attrGen();for(n=0;n<t.ruleCount;n+=1){for(r=0;r<t.ruleCount;r+=1)t.attrInit(t.attrsWorking[r]);t.startRule=n,s(t,n,i),t.attrCopy(t.attrs[n],t.attrsWorking[n])}t.attributesComplete=!0;let o=null;for(n=0;n<t.ruleCount;n+=1)if(o=t.attrs[n],o.left||!o.finite||o.cyclic){const e=t.attrGen(o.rule);t.attrCopy(e,o),t.attrsErrors.push(e),t.attrsErrorCount+=1}},showAttributes:(e="index")=>{if(!t.attributesComplete)throw new Error("rule-attributes.js:showAttributes: attributes not available");let n="";const r="RULE ATTRIBUTES\n";return 97===e.charCodeAt(0)?(n+="alphabetical by rule name\n",n+=r,n+=c(),n+=h(97)):116===e.charCodeAt(0)?(n+="ordered by rule type\n",n+=r,n+=c(),n+=h(116)):(n+="ordered by rule index\n",n+=r,n+=c(),n+=h()),n},showAttributeErrors:()=>{let e=null,n=null,r="";if(r+="RULE ATTRIBUTES WITH ERRORS\n",r+=c(),t.attrsErrorCount)for(let i=0;i<t.attrsErrorCount;i+=1)e=t.attrsErrors[i],n=t.ruleDeps[e.rule.index],r+=u(i,e.rule.index,e,n);else r+="<none>\n";return r}}}()},7008:(e,t,n)=>{e.exports=(()=>{const e=n(8276);let t=null;const r=(t,n,i,o)=>{let s=0,a=0;const l=n[i];o[i]=!0;const u=l.rule.opcodes;for(s=0;s<u.length;s+=1){const i=u[s];if(i.type===e.RNM)for(l.refersTo[i.index]=!0,o[i.index]||r(t,n,i.index,o),a=0;a<t;a+=1)n[i.index].refersTo[a]&&(l.refersTo[a]=!0);else i.type===e.UDT?l.refersToUdt[i.index]=!0:i.type===e.BKR&&(i.index<t?(l.refersTo[i.index]=!0,o[i.index]||r(t,n,i.index,o)):l.refersToUdt[t-i.index]=!0)}},i=(e=null)=>{let n=0,r=0,i=0,o=0;const s=t.ruleCount-1,a=t.udtCount-1;let l="",u="";const c="=> ";let h=!1,d=null,{ruleIndexes:f}=t,{udtIndexes:p}=t;for(97===e?(f=t.ruleAlphaIndexes,p=t.udtAlphaIndexes):116===e&&(f=t.ruleTypeIndexes,p=t.udtAlphaIndexes),n=0;n<t.ruleCount;n+=1){for(d=t.ruleDeps[f[n]],u=`${f[n]}:${t.typeToString(d.recursiveType)}:`,t.isMutuallyRecursive&&(u+=d.groupNumber>-1?d.groupNumber:"-",u+=":"),u+=" ",l+=`${u+t.rules[f[n]].name}\n`,h=!0,i=0,o=l.length,l+=u,r=0;r<t.ruleCount;r+=1)d.refersTo[f[r]]&&(h?(l+=c,h=!1,l+=t.ruleDeps[f[r]].rule.name):l+=`, ${t.ruleDeps[f[r]].rule.name}`,i+=1),l.length-o>100&&r!==s&&(l+=`\n${u}${c}`,o=l.length);if(t.udtCount)for(r=0;r<t.udtCount;r+=1)d.refersToUdt[p[r]]&&(h?(l+=c,h=!1,l+=t.udts[p[r]].name):l+=`, ${t.udts[p[r]].name}`,i+=1),l.length-o>100&&r!==a&&(l+=`\n${u}${c}`,o=l.length);for(0===i&&(l+="=> <none>\n"),!1===h&&(l+="\n"),h=!0,i=0,o=l.length,l+=u,r=0;r<t.ruleCount;r+=1)d.referencedBy[f[r]]&&(h?(l+="<= ",h=!1,l+=t.ruleDeps[f[r]].rule.name):l+=`, ${t.ruleDeps[f[r]].rule.name}`,i+=1),l.length-o>100&&r!==s&&(l+=`\n${u}${c}`,o=l.length);0===i&&(l+="<= <none>\n"),!1===h&&(l+="\n"),l+="\n"}return l};return{ruleDependencies:n=>{t=n;let i=0,o=0,s=0,a=null,l=null,u=!1;t.dependenciesComplete=!1;const c=t.falseArray(t.ruleCount);for(i=0;i<t.ruleCount;i+=1)t.falsifyArray(c),r(t.ruleCount,t.ruleDeps,i,c);for(i=0;i<t.ruleCount;i+=1)for(o=0;o<t.ruleCount;o+=1)i!==o&&t.ruleDeps[o].refersTo[i]&&(t.ruleDeps[i].referencedBy[o]=!0);for(i=0;i<t.ruleCount;i+=1)t.ruleDeps[i].recursiveType=e.ATTR_N,t.ruleDeps[i].refersTo[i]&&(t.ruleDeps[i].recursiveType=e.ATTR_R);for(s=-1,i=0;i<t.ruleCount;i+=1)if(a=t.ruleDeps[i],a.recursiveType===e.ATTR_R)for(u=!0,o=0;o<t.ruleCount;o+=1)i!==o&&(l=t.ruleDeps[o],l.recursiveType===e.ATTR_R&&a.refersTo[o]&&l.refersTo[i]&&(u&&(s+=1,a.recursiveType=e.ATTR_MR,a.groupNumber=s,u=!1),l.recursiveType=e.ATTR_MR,l.groupNumber=s));t.isMutuallyRecursive=s>-1,t.ruleAlphaIndexes.sort(t.compRulesAlpha),t.ruleTypeIndexes.sort(t.compRulesAlpha),t.ruleTypeIndexes.sort(t.compRulesType),t.isMutuallyRecursive&&t.ruleTypeIndexes.sort(t.compRulesGroup),t.udtCount&&t.udtAlphaIndexes.sort(t.compUdtsAlpha),t.dependenciesComplete=!0},showRuleDependencies:(e="index")=>{let n="RULE DEPENDENCIES(index:type:[group number:])\n";return n+="=> refers to rule names\n",n+="<= referenced by rule names\n",t.dependenciesComplete?(97===e.charCodeAt(0)?(n+="alphabetical by rule name\n",n+=i(97)):116===e.charCodeAt(0)?(n+="ordered by rule type\n",n+=i(116)):(n+="ordered by rule index\n",n+=i(null)),n):n}}})()},3610:e=>{e.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=function(){let e="";return e+=";\n",e+="; ABNF for JavaScript APG 2.0 SABNF\n",e+="; RFC 5234 with some restrictions and additions.\n",e+="; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n",e+='; - accepts %s"string" as a case-sensitive string\n',e+='; - accepts %i"string" as a case-insensitive string\n',e+='; - accepts "string" as a case-insensitive string\n',e+=";\n",e+="; Some restrictions:\n",e+="; 1. Rules must begin at first character of each line.\n",e+="; Indentations on first rule and rules thereafter are not allowed.\n",e+="; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n",e+="; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n",e+="; However, a working parser cannot be generated from them.\n",e+=";\n",e+="; Super set (SABNF) additions:\n",e+="; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n",e+="; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n",e+="; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n",e+="; e.g. &%d13 or &rule or !(A / B)\n",e+="; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n",e+="; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n",e+="; u_name may be used as an element but no rule definition is given.\n",e+="; e.g. rule = A / u_myUdt\n",e+='; A = "a"\n',e+="; would be a valid grammar.\n",e+="; 3. Case-sensitive, single-quoted strings are accepted.\n",e+="; e.g. 'abc' would be equivalent to %d97.98.99\n",e+='; (kept for backward compatibility, but superseded by %s"abc") \n',e+="; New 12/26/2015\n",e+="; 4. Look-behind operators are accepted as element prefixes.\n",e+="; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n",e+="; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n",e+="; e.g. &&%d13 or &&rule or !!(A / B)\n",e+="; 5. Back reference operators, i.e. \\rulename, are accepted.\n",e+="; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n",e+="; to match is a phrase previously matched by the rule 'rulename'.\n",e+="; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n",e+="; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n",e+="; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n",e+="; Back reference modifiers can be used to specify case and mode.\n",e+="; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n",e+="; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n",e+="; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n",e+="; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n",e+="; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n",e+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",e+="; 8. String end anchor, AEN(%$) matches the end of the input string location.\n",e+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",e+=";\n",e+="File = *(BlankLine / Rule / RuleError)\n",e+="BlankLine = *(%d32/%d9) [comment] LineEnd\n",e+="Rule = RuleLookup owsp Alternation ((owsp LineEnd)\n",e+=" / (LineEndError LineEnd))\n",e+="RuleLookup = RuleNameTest owsp DefinedAsTest\n",e+="RuleNameTest = RuleName/RuleNameError\n",e+="RuleName = alphanum\n",e+="RuleNameError = 1*(%d33-60/%d62-126)\n",e+="DefinedAsTest = DefinedAs / DefinedAsError\n",e+="DefinedAsError = 1*2%d33-126\n",e+="DefinedAs = IncAlt / Defined\n",e+="Defined = %d61\n",e+="IncAlt = %d61.47\n",e+="RuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\n",e+="LineEndError = 1*(%d32-126 / %d9 / LineContinue)\n",e+="Alternation = Concatenation *(owsp AltOp Concatenation)\n",e+="Concatenation = Repetition *(CatOp Repetition)\n",e+="Repetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\n",e+="Modifier = (Predicate [RepOp])\n",e+=" / RepOp\n",e+="Predicate = BkaOp\n",e+=" / BknOp\n",e+=" / AndOp\n",e+=" / NotOp\n",e+="BasicElement = UdtOp\n",e+=" / RnmOp\n",e+=" / TrgOp\n",e+=" / TbsOp\n",e+=" / TlsOp\n",e+=" / ClsOp\n",e+=" / BkrOp\n",e+=" / AbgOp\n",e+=" / AenOp\n",e+=" / ProsVal\n",e+="BasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\n",e+="Group = GroupOpen Alternation (GroupClose / GroupError)\n",e+="GroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",e+="GroupOpen = %d40 owsp\n",e+="GroupClose = owsp %d41\n",e+="Option = OptionOpen Alternation (OptionClose / OptionError)\n",e+="OptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",e+="OptionOpen = %d91 owsp\n",e+="OptionClose = owsp %d93\n",e+="RnmOp = alphanum\n",e+="BkrOp = %d92 [bkrModifier] bkr-name\n",e+="bkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\n",e+="cs = '%s'\n",e+="ci = '%i'\n",e+="um = '%u'\n",e+="pm = '%p'\n",e+="bkr-name = uname / ename / rname\n",e+="rname = alphanum\n",e+="uname = %d117.95 alphanum\n",e+="ename = %d101.95 alphanum\n",e+="UdtOp = udt-empty\n",e+=" / udt-non-empty\n",e+="udt-non-empty = %d117.95 alphanum\n",e+="udt-empty = %d101.95 alphanum\n",e+="RepOp = (rep-min StarOp rep-max)\n",e+=" / (rep-min StarOp)\n",e+=" / (StarOp rep-max)\n",e+=" / StarOp\n",e+=" / rep-min-max\n",e+="AltOp = %d47 owsp\n",e+="CatOp = wsp\n",e+="StarOp = %d42\n",e+="AndOp = %d38\n",e+="NotOp = %d33\n",e+="BkaOp = %d38.38\n",e+="BknOp = %d33.33\n",e+="AbgOp = %d37.94\n",e+="AenOp = %d37.36\n",e+="TrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\n",e+="TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\n",e+="TlsOp = TlsCase TlsOpen TlsString TlsClose\n",e+='TlsCase = ["%i" / "%s"]\n',e+="TlsOpen = %d34\n",e+="TlsClose = %d34\n",e+="TlsString = *(%d32-33/%d35-126/StringTab)\n",e+="StringTab = %d9\n",e+="ClsOp = ClsOpen ClsString ClsClose\n",e+="ClsOpen = %d39\n",e+="ClsClose = %d39\n",e+="ClsString = *(%d32-38/%d40-126/StringTab)\n",e+="ProsVal = ProsValOpen ProsValString ProsValClose\n",e+="ProsValOpen = %d60\n",e+="ProsValString = *(%d32-61/%d63-126/StringTab)\n",e+="ProsValClose = %d62\n",e+="rep-min = rep-num\n",e+="rep-min-max = rep-num\n",e+="rep-max = rep-num\n",e+="rep-num = 1*(%d48-57)\n",e+="dString = dnum\n",e+="xString = xnum\n",e+="bString = bnum\n",e+="Dec = (%d68/%d100)\n",e+="Hex = (%d88/%d120)\n",e+="Bin = (%d66/%d98)\n",e+="dmin = dnum\n",e+="dmax = dnum\n",e+="bmin = bnum\n",e+="bmax = bnum\n",e+="xmin = xnum\n",e+="xmax = xnum\n",e+="dnum = 1*(%d48-57)\n",e+="bnum = 1*%d48-49\n",e+="xnum = 1*(%d48-57 / %d65-70 / %d97-102)\n",e+=";\n",e+="; Basics\n",e+="alphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\n",e+="owsp = *space\n",e+="wsp = 1*space\n",e+="space = %d32\n",e+=" / %d9\n",e+=" / comment\n",e+=" / LineContinue\n",e+="comment = %d59 *(%d32-126 / %d9)\n",e+="LineEnd = %d13.10\n",e+=" / %d10\n",e+=" / %d13\n",e+="LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n",";\n; ABNF for JavaScript APG 2.0 SABNF\n; RFC 5234 with some restrictions and additions.\n; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n; - accepts %s\"string\" as a case-sensitive string\n; - accepts %i\"string\" as a case-insensitive string\n; - accepts \"string\" as a case-insensitive string\n;\n; Some restrictions:\n; 1. Rules must begin at first character of each line.\n; Indentations on first rule and rules thereafter are not allowed.\n; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n; However, a working parser cannot be generated from them.\n;\n; Super set (SABNF) additions:\n; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n; e.g. &%d13 or &rule or !(A / B)\n; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n; u_name may be used as an element but no rule definition is given.\n; e.g. rule = A / u_myUdt\n; A = \"a\"\n; would be a valid grammar.\n; 3. Case-sensitive, single-quoted strings are accepted.\n; e.g. 'abc' would be equivalent to %d97.98.99\n; (kept for backward compatibility, but superseded by %s\"abc\") \n; New 12/26/2015\n; 4. Look-behind operators are accepted as element prefixes.\n; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n; e.g. &&%d13 or &&rule or !!(A / B)\n; 5. Back reference operators, i.e. \\rulename, are accepted.\n; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n; to match is a phrase previously matched by the rule 'rulename'.\n; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n; Back reference modifiers can be used to specify case and mode.\n; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n; 8. String end anchor, AEN(%$) matches the end of the input string location.\n; Returns EMPTY or NOMATCH. Never consumes any characters.\n;\nFile = *(BlankLine / Rule / RuleError)\nBlankLine = *(%d32/%d9) [comment] LineEnd\nRule = RuleLookup owsp Alternation ((owsp LineEnd)\n / (LineEndError LineEnd))\nRuleLookup = RuleNameTest owsp DefinedAsTest\nRuleNameTest = RuleName/RuleNameError\nRuleName = alphanum\nRuleNameError = 1*(%d33-60/%d62-126)\nDefinedAsTest = DefinedAs / DefinedAsError\nDefinedAsError = 1*2%d33-126\nDefinedAs = IncAlt / Defined\nDefined = %d61\nIncAlt = %d61.47\nRuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\nLineEndError = 1*(%d32-126 / %d9 / LineContinue)\nAlternation = Concatenation *(owsp AltOp Concatenation)\nConcatenation = Repetition *(CatOp Repetition)\nRepetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\nModifier = (Predicate [RepOp])\n / RepOp\nPredicate = BkaOp\n / BknOp\n / AndOp\n / NotOp\nBasicElement = UdtOp\n / RnmOp\n / TrgOp\n / TbsOp\n / TlsOp\n / ClsOp\n / BkrOp\n / AbgOp\n / AenOp\n / ProsVal\nBasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\nGroup = GroupOpen Alternation (GroupClose / GroupError)\nGroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nGroupOpen = %d40 owsp\nGroupClose = owsp %d41\nOption = OptionOpen Alternation (OptionClose / OptionError)\nOptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\nOptionOpen = %d91 owsp\nOptionClose = owsp %d93\nRnmOp = alphanum\nBkrOp = %d92 [bkrModifier] bkr-name\nbkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\ncs = '%s'\nci = '%i'\num = '%u'\npm = '%p'\nbkr-name = uname / ename / rname\nrname = alphanum\nuname = %d117.95 alphanum\nename = %d101.95 alphanum\nUdtOp = udt-empty\n / udt-non-empty\nudt-non-empty = %d117.95 alphanum\nudt-empty = %d101.95 alphanum\nRepOp = (rep-min StarOp rep-max)\n / (rep-min StarOp)\n / (StarOp rep-max)\n / StarOp\n / rep-min-max\nAltOp = %d47 owsp\nCatOp = wsp\nStarOp = %d42\nAndOp = %d38\nNotOp = %d33\nBkaOp = %d38.38\nBknOp = %d33.33\nAbgOp = %d37.94\nAenOp = %d37.36\nTrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\nTbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\nTlsOp = TlsCase TlsOpen TlsString TlsClose\nTlsCase = [\"%i\" / \"%s\"]\nTlsOpen = %d34\nTlsClose = %d34\nTlsString = *(%d32-33/%d35-126/StringTab)\nStringTab = %d9\nClsOp = ClsOpen ClsString ClsClose\nClsOpen = %d39\nClsClose = %d39\nClsString = *(%d32-38/%d40-126/StringTab)\nProsVal = ProsValOpen ProsValString ProsValClose\nProsValOpen = %d60\nProsValString = *(%d32-61/%d63-126/StringTab)\nProsValClose = %d62\nrep-min = rep-num\nrep-min-max = rep-num\nrep-max = rep-num\nrep-num = 1*(%d48-57)\ndString = dnum\nxString = xnum\nbString = bnum\nDec = (%d68/%d100)\nHex = (%d88/%d120)\nBin = (%d66/%d98)\ndmin = dnum\ndmax = dnum\nbmin = bnum\nbmax = bnum\nxmin = xnum\nxmax = xnum\ndnum = 1*(%d48-57)\nbnum = 1*%d48-49\nxnum = 1*(%d48-57 / %d65-70 / %d97-102)\n;\n; Basics\nalphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\nowsp = *space\nwsp = 1*space\nspace = %d32\n / %d9\n / comment\n / LineContinue\ncomment = %d59 *(%d32-126 / %d9)\nLineEnd = %d13.10\n / %d10\n / %d13\nLineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n"}}},3479:(e,t,n)=>{const r=n(8276),i=n(8544),o=[];o.line=function(e,t,n,i,o){return e===r.SEM_PRE?(o.endLength=0,o.textLength=0,o.invalidCount=0):o.lines.push({lineNo:o.lines.length,beginChar:n,length:i,textLength:o.textLength,endType:o.endType,invalidChars:o.invalidCount}),r.SEM_OK},o["line-text"]=function(e,t,n,i,o){return e===r.SEM_PRE&&(o.textLength=i),r.SEM_OK},o["last-line"]=function(e,t,n,i,o){return e===r.SEM_PRE?(o.endLength=0,o.textLength=0,o.invalidCount=0):o.strict?(o.lines.push({lineNo:o.lines.length,beginChar:n,length:i,textLength:i,endType:"none",invalidChars:o.invalidCount}),o.errors.push({line:o.lineNo,char:n+i,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(t.push(10),o.lines.push({lineNo:o.lines.length,beginChar:n,length:i+1,textLength:i,endType:"LF",invalidChars:o.invalidCount})),r.SEM_OK},o.invalid=function(e,t,n,o,s){return e===r.SEM_PRE&&s.errors.push({line:s.lineNo,char:n,msg:`invalid character found '\\x${i.charToHex(t[n])}'`}),r.SEM_OK},o.end=function(e,t,n,i,o){return e===r.SEM_POST&&(o.lineNo+=1),r.SEM_OK},o.lf=function(e,t,n,i,o){return e===r.SEM_PRE&&(o.endType="LF",o.strict&&o.errors.push({line:o.lineNo,char:n,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),r.SEM_OK},o.cr=function(e,t,n,i,o){return e===r.SEM_PRE&&(o.endType="CR",o.strict&&o.errors.push({line:o.lineNo,char:n,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),r.SEM_OK},o.crlf=function(e,t,n,i,o){return e===r.SEM_PRE&&(o.endType="CRLF"),r.SEM_OK},t.callbacks=o},6410:e=>{e.exports=function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=function(){let e="";return e+="file = *line [last-line]\n",e+="line = line-text end\n",e+="line-text = *(valid/invalid)\n",e+="last-line = 1*(valid/invalid)\n",e+="valid = %d32-126 / %d9\n",e+="invalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\n",e+="end = CRLF / LF / CR\n",e+="CRLF = %d13.10\n",e+="LF = %d10\n",e+="CR = %d13\n","file = *line [last-line]\nline = line-text end\nline-text = *(valid/invalid)\nlast-line = 1*(valid/invalid)\nvalid = %d32-126 / %d9\ninvalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\nend = CRLF / LF / CR\nCRLF = %d13.10\nLF = %d10\nCR = %d13\n"}}},1789:(e,t,n)=>{e.exports=function(e,t,r,i){const o=n(8737),s=new(n(6410)),{callbacks:a}=n(3479),l=[],u=new o.parser;if(u.ast=new o.ast,u.ast.callbacks=a,i){if("traceObject"!==i.traceObject)throw new TypeError("scanner.js: trace argument is not a trace object");u.trace=i}if(!0!==u.parse(s,"file",e).success)return void t.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});const c={lines:l,lineNo:0,errors:t,strict:!!r};return u.ast.translate(c),l}},1832:(e,t,n)=>{e.exports=function(){const e=n(8737),t=e.ids,r=function(){this.names=[],this.add=function(e){let t=-1;return-1===this.get(e)&&(t={name:e,lower:e.toLowerCase(),index:this.names.length},this.names.push(t)),t},this.get=function(e){let t=-1;const n=e.toLowerCase();for(let e=0;e<this.names.length;e+=1)if(this.names[e].lower===n){t=this.names[e];break}return t}},i=function(e,t,n){let r=0;for(let i=t;i<t+n;i+=1)r=10*r+e[i]-48;return r},o=function(e,t,n){let r=0;for(let i=t;i<t+n;i+=1)r=2*r+e[i]-48;return r},s=function(e,t,n){let r=0;for(let i=t;i<t+n;i+=1){let t=e[i];if(t>=48&&t<=57)t-=48;else if(t>=65&&t<=70)t-=55;else{if(!(t>=97&&t<=102))throw new Error("hexnum out of range");t-=87}r=16*r+t}return r};this.callbacks=[],this.callbacks.abgop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.ABG}),s},this.callbacks.aenop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.AEN}),s},this.callbacks.alternation=function(e,n,r,i,o){let s=t.SEM_OK;if(e===t.SEM_PRE){const e=!0;for(;e;){if(null===o.definedas){s=t.SEM_SKIP;break}if(null===o.topStack){if("="===o.definedas){o.topStack={alt:{type:t.ALT,children:[]},cat:null},o.altStack.push(o.topStack),o.opcodes.push(o.topStack.alt);break}o.topStack={alt:o.opcodes[0],cat:null},o.altStack.push(o.topStack);break}o.topStack={alt:{type:t.ALT,children:[]},cat:null},o.altStack.push(o.topStack),o.opcodes.push(o.topStack.alt);break}}else e===t.SEM_POST&&(o.altStack.pop(),o.altStack.length>0?o.topStack=o.altStack[o.altStack.length-1]:o.topStack=null);return s},this.callbacks.andop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.AND}),s},this.callbacks.bmax=function(e,n,r,i,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.max=o(n,r,i)),a},this.callbacks.bmin=function(e,n,r,i,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.min=o(n,r,i)),a},this.callbacks.bkaop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.BKA}),s},this.callbacks.bknop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.BKN}),s},this.callbacks.bkrop=function(n,r,i,o,s){const a=t.SEM_OK;return n===t.SEM_PRE?(s.ci=!0,s.cs=!1,s.um=!0,s.pm=!1):n===t.SEM_POST&&s.opcodes.push({type:t.BKR,bkrCase:!0===s.cs?t.BKR_MODE_CS:t.BKR_MODE_CI,bkrMode:!0===s.pm?t.BKR_MODE_PM:t.BKR_MODE_UM,index:{phraseIndex:s.bkrname.phraseIndex,name:e.utils.charsToString(r,s.bkrname.phraseIndex,s.bkrname.phraseLength)}}),a},this.callbacks["bkr-name"]=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.bkrname={phraseIndex:r,phraseLength:i}),s},this.callbacks.bstring=function(e,n,r,i,s){const a=t.SEM_OK;return e===t.SEM_POST&&s.tbsstr.push(o(n,r,i)),a},this.callbacks.clsop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(i<=2?o.opcodes.push({type:t.TLS,string:[]}):o.opcodes.push({type:t.TBS,string:n.slice(r+1,r+i-1)})),s},this.callbacks.ci=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.ci=!0),s},this.callbacks.cs=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.cs=!0),s},this.callbacks.um=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.um=!0),s},this.callbacks.pm=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.pm=!0),s},this.callbacks.concatenation=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE?(o.topStack.alt.children.push(o.opcodes.length),o.topStack.cat={type:t.CAT,children:[]},o.opcodes.push(o.topStack.cat)):e===t.SEM_POST&&(o.topStack.cat=null),s},this.callbacks.defined=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.definedas="="),s},this.callbacks.dmax=function(e,n,r,o,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.max=i(n,r,o)),a},this.callbacks.dmin=function(e,n,r,o,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.min=i(n,r,o)),a},this.callbacks.dstring=function(e,n,r,o,s){const a=t.SEM_OK;return e===t.SEM_POST&&s.tbsstr.push(i(n,r,o)),a},this.callbacks.file=function(e,n,i,o,s){const a=t.SEM_OK;if(e===t.SEM_PRE)s.ruleNames=new r,s.udtNames=new r,s.rules=[],s.udts=[],s.rulesLineMap=[],s.opcodes=[],s.altStack=[],s.topStack=null,s.topRule=null;else if(e===t.SEM_POST){let e;s.rules.forEach((n=>{n.isBkr=!1,n.opcodes.forEach((n=>{n.type===t.RNM&&(e=s.ruleNames.get(n.index.name),-1===e?(s.errors.push({line:s.findLine(s.lines,n.index.phraseIndex,s.charsLength),char:n.index.phraseIndex,msg:`Rule name '${n.index.name}' used but not defined.`}),n.index=-1):n.index=e.index)}))})),s.udts.forEach((e=>{e.isBkr=!1})),s.rules.forEach((n=>{n.opcodes.forEach((r=>{r.type===t.BKR&&(n.hasBkr=!0,e=s.ruleNames.get(r.index.name),-1!==e?(s.rules[e.index].isBkr=!0,r.index=e.index):(e=s.udtNames.get(r.index.name),-1!==e?(s.udts[e.index].isBkr=!0,r.index=s.rules.length+e.index):(s.errors.push({line:s.findLine(s.lines,r.index.phraseIndex,s.charsLength),char:r.index.phraseIndex,msg:`Back reference name '${r.index.name}' refers to undefined rule or unamed UDT.`}),r.index=-1)))}))}))}return a},this.callbacks.incalt=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&(o.definedas="=/"),s},this.callbacks.notop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.NOT}),s},this.callbacks.optionopen=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&o.opcodes.push({type:t.REP,min:0,max:1,char:r}),s},this.callbacks["rep-max"]=function(e,n,r,o,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.max=i(n,r,o)),a},this.callbacks["rep-min"]=function(e,n,r,o,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.min=i(n,r,o)),a},this.callbacks["rep-min-max"]=function(e,n,r,o,s){const a=t.SEM_OK;return e===t.SEM_POST&&(s.max=i(n,r,o),s.min=s.max),a},this.callbacks.repetition=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE&&o.topStack.cat.children.push(o.opcodes.length),s},this.callbacks.repop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE?(o.min=0,o.max=1/0,o.topRep={type:t.REP,min:0,max:1/0},o.opcodes.push(o.topRep)):e===t.SEM_POST&&(o.min>o.max&&o.errors.push({line:o.findLine(o.lines,r,o.charsLength),char:r,msg:`repetition min cannot be greater than max: min: ${o.min}: max: ${o.max}`}),o.topRep.min=o.min,o.topRep.max=o.max),s},this.callbacks.rnmop=function(n,r,i,o,s){const a=t.SEM_OK;return n===t.SEM_POST&&s.opcodes.push({type:t.RNM,index:{phraseIndex:i,name:e.utils.charsToString(r,i,o)}}),a},this.callbacks.rule=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE&&(o.altStack.length=0,o.topStack=null,o.rulesLineMap.push({line:o.findLine(o.lines,r,o.charsLength),char:r})),s},this.callbacks.rulelookup=function(e,n,r,i,o){const s=t.SEM_OK;if(e===t.SEM_PRE)o.ruleName="",o.definedas="";else if(e===t.SEM_POST){let e;"="===o.definedas?(e=o.ruleNames.add(o.ruleName),-1===e?(o.definedas=null,o.errors.push({line:o.findLine(o.lines,r,o.charsLength),char:r,msg:`Rule name '${o.ruleName}' previously defined.`})):(o.topRule={name:e.name,lower:e.lower,opcodes:[],index:e.index},o.rules.push(o.topRule),o.opcodes=o.topRule.opcodes)):(e=o.ruleNames.get(o.ruleName),-1===e?(o.definedas=null,o.errors.push({line:o.findLine(o.lines,r,o.charsLength),char:r,msg:`Rule name '${o.ruleName}' for incremental alternate not previously defined.`})):(o.topRule=o.rules[e.index],o.opcodes=o.topRule.opcodes))}return s},this.callbacks.rulename=function(n,r,i,o,s){const a=t.SEM_OK;return n===t.SEM_PRE&&(s.ruleName=e.utils.charsToString(r,i,o)),a},this.callbacks.tbsop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE?o.tbsstr=[]:e===t.SEM_POST&&o.opcodes.push({type:t.TBS,string:o.tbsstr}),s},this.callbacks.tlscase=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_POST&&i>0&&(83===n[r+1]||115===n[r+1])&&(o.tlscase=!1),s},this.callbacks.tlsstring=function(e,n,r,i,o){const s=t.SEM_OK;if(e===t.SEM_POST)if(o.tlscase){const e=n.slice(r,r+i);for(let t=0;t<e.length;t+=1)e[t]>=65&&e[t]<=90&&(e[t]+=32);o.opcodes.push({type:t.TLS,string:e})}else o.opcodes.push({type:t.TBS,string:n.slice(r,r+i)});return s},this.callbacks.tlsop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE&&(o.tlscase=!0),s},this.callbacks.trgop=function(e,n,r,i,o){const s=t.SEM_OK;return e===t.SEM_PRE?(o.min=0,o.max=0):e===t.SEM_POST&&(o.min>o.max&&o.errors.push({line:o.findLine(o.lines,r,o.charsLength),char:r,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${o.min}: max: ${o.max}`}),o.opcodes.push({type:t.TRG,min:o.min,max:o.max})),s},this.callbacks["udt-empty"]=function(n,r,i,o,s){const a=t.SEM_OK;if(n===t.SEM_POST){const n=e.utils.charsToString(r,i,o);let a=s.udtNames.add(n);if(-1===a){if(a=s.udtNames.get(n),-1===a)throw new Error("semUdtEmpty: name look up error")}else s.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!0});s.opcodes.push({type:t.UDT,empty:!0,index:a.index})}return a},this.callbacks["udt-non-empty"]=function(n,r,i,o,s){const a=t.SEM_OK;if(n===t.SEM_POST){const n=e.utils.charsToString(r,i,o);let a=s.udtNames.add(n);if(-1===a){if(a=s.udtNames.get(n),-1===a)throw new Error("semUdtNonEmpty: name look up error")}else s.udts.push({name:a.name,lower:a.lower,index:a.index,empty:!1});s.opcodes.push({type:t.UDT,empty:!1,index:a.index,syntax:null,semantic:null})}return a},this.callbacks.xmax=function(e,n,r,i,o){const a=t.SEM_OK;return e===t.SEM_POST&&(o.max=s(n,r,i)),a},this.callbacks.xmin=function(e,n,r,i,o){const a=t.SEM_OK;return e===t.SEM_POST&&(o.min=s(n,r,i)),a},this.callbacks.xstring=function(e,n,r,i,o){const a=t.SEM_OK;return e===t.SEM_POST&&o.tbsstr.push(s(n,r,i)),a}}},2595:e=>{e.exports=function(){const e="show-rules.js";return function(t=[],n=[],r="index"){const i="showRules";let o=[],s=[];const a=[],l=[],u=t,c=n,h=t.length,d=n.length;let f,p="RULE/UDT NAMES";if(!Array.isArray(t)||!t.length)throw new Error(`${e}:${i}: rules arg must be array with length > 0`);if(!Array.isArray(n))throw new Error(`${e}:${i}: udts arg must be array`);for(f=0;f<h;f+=1)a.push(f);if(o=a.slice(0),o.sort((function(e,t){return u[e].lower<u[t].lower?-1:u[e].lower>u[t].lower?1:0})),d){for(f=0;f<d;f+=1)l.push(f);s=l.slice(0),s.sort((function(e,t){return c[e].lower<c[t].lower?-1:c[e].lower>c[t].lower?1:0}))}if(97===r.charCodeAt(0)){for(p+=" - alphabetical by rule/UDT name\n",f=0;f<h;f+=1)p+=`${f}: ${o[f]}: ${u[o[f]].name}\n`;if(d)for(f=0;f<d;f+=1)p+=`${f}: ${s[f]}: ${c[s[f]].name}\n`}else{for(p+=" - ordered by rule/UDT index\n",f=0;f<h;f+=1)p+=`${f}: ${u[f].name}\n`;if(d)for(f=0;f<d;f+=1)p+=`${f}: ${c[f].name}\n`}return p}}()},4216:(e,t,n)=>{e.exports=function(){const e="syntax-callbacks.js: ",t=n(8737),r=t.ids;let i;this.callbacks=[],this.callbacks.andop=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.basicelementerr=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1===i.basicError&&s.errors.push({line:s.findLine(s.lines,o,s.charsLength),char:o,msg:"Unrecognized SABNF element."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.clsclose=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),i.clsOpen=null,i.basicError=!0;break;case r.MATCH:s.strict&&s.errors.push({line:s.findLine(s.lines,i.clsOpen),char:i.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),i.clsOpen=null;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.clsopen=function(t,n,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i.clsOpen=o;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.clsstring=function(t,n,i,o){switch(t.state){case r.ACTIVE:o.stringTabChar=!1;break;case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1!==o.stringTabChar&&o.errors.push({line:o.findLine(o.lines,o.stringTabChar),char:o.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.definedaserror=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Expected '=' or '=/'. Not found."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.file=function(t,n,i,o){switch(t.state){case r.ACTIVE:o.altStack=[],o.repCount=0;break;case r.EMPTY:o.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case r.MATCH:0===o.ruleCount&&o.errors.push({line:0,char:0,msg:"no rules defined"});break;case r.NOMATCH:throw new Error(`${e}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.groupclose=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.groupOpen),char:i.groupOpen,msg:'Group "(...)" opened but not closed.'}),i=s.altStack.pop(),i.groupError=!0;break;case r.MATCH:i=s.altStack.pop();break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.groupopen=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i={groupOpen:o,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},s.altStack.push(i);break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.lineenderror=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Unrecognized grammar element or characters."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.lineend=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:if(1===t.phraseLength&&o.strict){const e=13===n[i]?"CR":"LF";o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:`Line end '${e}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.notop=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.optionclose=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.optionOpen),char:i.optionOpen,msg:'Option "[...]" opened but not closed.'}),i=s.altStack.pop(),i.optionError=!0;break;case r.MATCH:i=s.altStack.pop();break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.optionopen=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i={groupOpen:null,groupError:!1,optionOpen:o,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},s.altStack.push(i);break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.prosvalclose=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),i.basicError=!0,i.prosValOpen=null;break;case r.MATCH:s.errors.push({line:s.findLine(s.lines,i.prosValOpen),char:i.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),i.prosValOpen=null;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.prosvalopen=function(t,n,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i.prosValOpen=o;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.prosvalstring=function(t,n,i,o){switch(t.state){case r.ACTIVE:o.stringTabChar=!1;break;case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1!==o.stringTabChar&&o.errors.push({line:o.findLine(o.lines,o.stringTabChar),char:o.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.repetition=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:case r.MATCH:o.repCount+=1;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.rule=function(t,n,o,s){switch(t.state){case r.ACTIVE:s.altStack.length=0,i={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},s.altStack.push(i);break;case r.EMPTY:throw new Error(`${e}synRule: EMPTY: rule cannot be empty`);case r.NOMATCH:break;case r.MATCH:s.ruleCount+=1;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.ruleerror=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.rulenameerror=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.stringtab=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.stringTabChar=i;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.tlsclose=function(t,n,o,s){switch(t.state){case r.ACTIVE:case r.EMPTY:break;case r.NOMATCH:s.errors.push({line:s.findLine(s.lines,i.tlsOpen),char:i.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),i.basicError=!0,i.tlsOpen=null;break;case r.MATCH:i.tlsOpen=null;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.tlsopen=function(t,n,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:i.tlsOpen=o;break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.tlsstring=function(t,n,i,o){switch(t.state){case r.ACTIVE:o.stringTabChar=!1;break;case r.EMPTY:case r.NOMATCH:break;case r.MATCH:!1!==o.stringTabChar&&o.errors.push({line:o.findLine(o.lines,o.stringTabChar),char:o.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.udtop=function(n,i,o,s){switch(n.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:if(s.strict){const e=t.utils.charsToString(i,o,n.phraseLength);s.errors.push({line:s.findLine(s.lines,o,s.charsLength),char:o,msg:`UDT operator found(${e}) - strict ABNF specified.`})}break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.bkaop=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Positive look-behind operator(&&) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.bknop=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Negative look-behind operator(!!) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.bkrop=function(n,i,o,s){switch(n.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:if(s.strict){const e=t.utils.charsToString(i,o,n.phraseLength);s.errors.push({line:s.findLine(s.lines,o,s.charsLength),char:o,msg:`Back reference operator(${e}) found - strict ABNF specified.`})}break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.abgop=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"Beginning of string anchor(%^) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}},this.callbacks.aenop=function(t,n,i,o){switch(t.state){case r.ACTIVE:case r.EMPTY:case r.NOMATCH:break;case r.MATCH:o.strict&&o.errors.push({line:o.findLine(o.lines,i,o.charsLength),char:i,msg:"End of string anchor(%$) found - strict ABNF specified."});break;default:throw new Error(`${e}synFile: unrecognized case.`)}}}},979:function(e,t,n){const r=this,i=n(6322),o="UTF8",s="UTF16",a="UTF16BE",l="UTF16LE",u="UTF32",c="UTF32BE",h="UTF32LE",d="UINT7",f="ASCII",p="BINARY",m="UINT8",g="UINT16",v="UINT16LE",y="UINT16BE",b="UINT32",w="UINT32LE",A="UINT32BE",_="ESCAPED",E="STRING",M=function(e,t){switch(e){case o:return i.utf8.encode(t);case a:return i.utf16be.encode(t);case l:return i.utf16le.encode(t);case c:return i.utf32be.encode(t);case h:return i.utf32le.encode(t);case d:return i.uint7.encode(t);case m:return i.uint8.encode(t);case y:return i.uint16be.encode(t);case v:return i.uint16le.encode(t);case A:return i.uint32be.encode(t);case w:return i.uint32le.encode(t);case E:return i.string.encode(t);case _:return i.escaped.encode(t);default:throw new TypeError(`encode type "${e}" not recognized`)}};t.decode=function(e,t){return function(e){switch(e.type){case o:return i.utf8.decode(e.data,e.bom);case l:return i.utf16le.decode(e.data,e.bom);case a:return i.utf16be.decode(e.data,e.bom);case c:return i.utf32be.decode(e.data,e.bom);case h:return i.utf32le.decode(e.data,e.bom);case d:return i.uint7.decode(e.data);case m:return i.uint8.decode(e.data);case y:return i.uint16be.decode(e.data);case v:return i.uint16le.decode(e.data);case A:return i.uint32be.decode(e.data);case w:return i.uint32le.decode(e.data);case E:return i.string.decode(e.data);case _:return i.escaped.decode(e.data);default:throw new TypeError(`decode type "${e.type}" not recognized`)}}(function(e,t){if("string"!=typeof e||""===e)throw new TypeError(`type: "${e}" not recognized`);const n=function(e){const t={type:"",base64:!1},n=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(e);return n&&(n[2]&&(t.type=n[2].toUpperCase()),n[1]&&(t.base64=!0)),t}(e.toUpperCase());if(n.base64){if(n.type===E)throw new TypeError(`type: "${e} "BASE64:" prefix not allowed with type ${E}`);if(Buffer.isBuffer(t))n.data=i.base64.decode(t);else{if("string"!=typeof t)throw new TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof t}`);{const e=Buffer.from(t,"ascii");n.data=i.base64.decode(e)}}}else n.data=t;switch(n.type){case o:!function(e){e.type=o;const t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)}(n);break;case s:case a:case l:!function(e){const t=e.data;switch(e.bom=0,e.type){case s:e.type=a,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=l,e.bom=2));break;case a:if(e.type=a,t.length>=2)if(254===t[0]&&255===t[1])e.bom=2;else if(255===t[0]&&254===t[1])throw new TypeError(`src type: "${a}" specified but BOM is for "${l}"`);break;case l:if(e.type=l,t.length>=0){if(254===t[0]&&255===t[1])throw new TypeError(`src type: "${l}" specified but BOM is for "${a}"`);255===t[0]&&254===t[1]&&(e.bom=2)}break;default:throw new TypeError(`UTF16 BOM: src type "${e.type}" unrecognized`)}}(n);break;case u:case c:case h:!function(e){const t=e.data;switch(e.bom=0,e.type){case u:e.type=c,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.type=h,e.bom=4));break;case c:if(e.type=c,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]))throw new TypeError(`src type: ${c} specified but BOM is for ${h}"`);break;case h:if(e.type=h,t.length>=4){if(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3])throw new TypeError(`src type: "${h}" specified but BOM is for "${c}"`);255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.bom=4)}break;default:throw new TypeError(`UTF32 BOM: src type "${e.type}" unrecognized`)}}(n);break;case g:n.type=y;break;case b:n.type=A;break;case f:n.type=d;break;case p:n.type=m;break;case d:case m:case v:case y:case w:case A:case E:case _:break;default:throw new TypeError(`type: "${e}" not recognized`)}if(n.type===E){if("string"!=typeof n.data)throw new TypeError(`type: "${e}" but data is not a string`)}else if(!Buffer.isBuffer(n.data))throw new TypeError(`type: "${e}" but data is not a Buffer`);return n}(e,t))},t.encode=function(e,t){let n,r;const k=function(e,t){if(!Array.isArray(t))throw new TypeError('dst chars: not array: "'+typeof t);if("string"!=typeof e)throw new TypeError('dst type: not string: "'+typeof e);const n=function(e){let t,n;const r={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(n=e,t=e.slice(0,5),"CRLF:"===t){r.crlf=!0,n=e.slice(5);break}if(t=e.slice(0,3),"LF:"===t){r.lf=!0,n=e.slice(3);break}break}return t=n.split(":"),1===t.length?r.type=t[0]:2===t.length&&"BASE64"===t[1]&&(r.base64=!0,r.type=t[0]),r}(e.toUpperCase());switch(n.type){case o:case a:case l:case c:case h:case d:case m:case v:case y:case w:case A:case _:break;case E:if(n.base64)throw new TypeError(`":BASE64" suffix not allowed with type ${E}`);break;case f:n.type=d;break;case p:n.type=m;break;case s:n.type=a;break;case u:n.type=c;break;case g:n.type=y;break;case b:n.type=A;break;default:throw new TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return n}(e,t);return k.crlf?(n=i.lineEnds.crlf(t),r=M(k.type,n)):k.lf?(n=i.lineEnds.lf(t),r=M(k.type,n)):r=M(k.type,t),k.base64&&(r=i.base64.encode(r)),r},t.convert=function(e,t,n){return r.encode(n,r.decode(e,t))}},6322:function(e,t){const n=this,r=4294967292,i=4294967293,o=4294967294,s=4294967295,a=[0,1,3,7,15,31,63,127,255,511,1023],l=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),c=[];u.forEach((e=>{c.push(e.charCodeAt(0))})),t.utf8={encode(e){const t=[];return e.forEach((e=>{if(e>=0&&e<=127)t.push(e);else if(e<=2047)t.push(192+(e>>6&a[5])),t.push(128+(e&a[6]));else if(e<55296||e>57343&&e<=65535)t.push(224+(e>>12&a[4])),t.push(128+(e>>6&a[6])),t.push(128+(e&a[6]));else{if(!(e>=65536&&e<=1114111))throw new RangeError(`utf8.encode: character out of range: char: ${e}`);{const n=e>>16&a[5];t.push(240+(n>>2)),t.push(128+((n&a[2])<<4)+(e>>12&a[4])),t.push(128+(e>>6&a[6])),t.push(128+(e&a[6]))}}})),Buffer.from(t)},decode(e,t){function n(e,t){if(128!=(192&t))return i;const n=((e&a[5])<<6)+(t&a[6]);return n<128?r:n}function l(e,t,n){if(128!=(192&n)||128!=(192&t))return i;const s=((e&a[4])<<12)+((t&a[6])<<6)+(n&a[6]);return s<2048?r:s>=55296&&s<=57343?o:s}function u(e,t,n,s){if(128!=(192&s)||128!=(192&n)||128!=(192&t))return i;const l=(((e&a[3])<<2)+(t>>4&a[2])<<16)+((t&a[4])<<12)+((n&a[6])<<6)+(s&a[6]);return l<65536?r:l>1114111?o:l}let c,h,d,f,p,m;const g=e.length;let v=t?3:0;const y=[];for(;v<g;){h=e[v],c=s;const t=!0;for(;t;){if(h>=0&&h<=127){c=h,m=1;break}if(d=v+1,d<g&&h>=194&&h<=223){c=n(h,e[d]),m=2;break}if(f=v+2,f<g&&h>=224&&h<=239){c=l(h,e[d],e[f]),m=3;break}if(p=v+3,p<g&&h>=240&&h<=244){c=u(h,e[d],e[f],e[p]),m=4;break}break}if(c>1114111){const e=`byte[${v}]`;if(c===s)throw new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${e}`);if(c===i)throw new RangeError(`utf8.decode: illegal trailing byte found at: ${e}`);if(c===o)throw new RangeError(`utf8.decode: code point out of range found at: ${e}`);if(c===r)throw new RangeError(`utf8.decode: non-shortest form found at: ${e}`);throw new RangeError(`utf8.decode: unrecognized error found at: ${e}`)}y.push(c),v+=m}return y}},t.utf16be={encode(e){const t=[];let n,r,i;for(let o=0;o<e.length;o+=1)if(n=e[o],n>=0&&n<=55295||n>=57344&&n<=65535)t.push(n>>8&a[8]),t.push(n&a[8]);else{if(!(n>=65536&&n<=1114111))throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${o}]: ${n}`);i=n-65536,r=55296+(i>>10),i=56320+(i&a[10]),t.push(r>>8&a[8]),t.push(r&a[8]),t.push(i>>8&a[8]),t.push(i&a[8])}return Buffer.from(t)},decode(e,t){if(e.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${e.length}`);const n=[],r=e.length;let i,o,s,a,l,u,c=t?2:0,h=0;for(;c<r;){const t=!0;for(;t;){if(s=c+1,s<r){if(l=(e[c]<<8)+e[s],l<55296||l>57343){i=l,o=2;break}if(a=c+3,a<r&&(u=(e[c+2]<<8)+e[a],l<=56319&&u>=56320&&u<=57343)){i=65536+(l-55296<<10)+(u-56320),o=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${c}]`)}n[h++]=i,c+=o}return n}},t.utf16le={encode(e){const t=[];let n,r,i;for(let o=0;o<e.length;o+=1)if(n=e[o],n>=0&&n<=55295||n>=57344&&n<=65535)t.push(n&a[8]),t.push(n>>8&a[8]);else{if(!(n>=65536&&n<=1114111))throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${o}]: ${n}`);i=n-65536,r=55296+(i>>10),i=56320+(i&a[10]),t.push(r&a[8]),t.push(r>>8&a[8]),t.push(i&a[8]),t.push(i>>8&a[8])}return Buffer.from(t)},decode(e,t){if(e.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${e.length}`);const n=[],r=e.length;let i,o,s,a,l,u,c=t?2:0,h=0;for(;c<r;){const t=!0;for(;t;){if(s=c+1,s<r){if(l=(e[s]<<8)+e[c],l<55296||l>57343){i=l,o=2;break}if(a=c+3,a<r&&(u=(e[a]<<8)+e[c+2],l<=56319&&u>=56320&&u<=57343)){i=65536+(l-55296<<10)+(u-56320),o=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${c}]`)}n[h++]=i,c+=o}return n}},t.utf32be={encode(e){const t=Buffer.alloc(4*e.length);let n=0;return e.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${n/4}]: ${e}`);t[n++]=e>>24&a[8],t[n++]=e>>16&a[8],t[n++]=e>>8&a[8],t[n++]=e&a[8]})),t},decode(e,t){if(e.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${e.length}`);const n=[];let r=t?4:0;for(;r<e.length;r+=4){const t=(e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${r/4}]: ${t}`);n.push(t)}return n}},t.utf32le={encode(e){const t=Buffer.alloc(4*e.length);let n=0;return e.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${n/4}]: ${e}`);t[n++]=e&a[8],t[n++]=e>>8&a[8],t[n++]=e>>16&a[8],t[n++]=e>>24&a[8]})),t},decode(e,t){if(e.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${e.length}`);const n=[];let r=t?4:0;for(;r<e.length;r+=4){const t=(e[r+3]<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${t}`);n.push(t)}return n}},t.uint7={encode(e){const t=Buffer.alloc(e.length);for(let n=0;n<e.length;n+=1){if(e[n]>127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${n}]: ${e[n]}`);t[n]=e[n]}return t},decode(e){const t=[];for(let n=0;n<e.length;n+=1){if(e[n]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${n}]: ${e[n]}`);t[n]=e[n]}return t}},t.uint8={encode(e){const t=Buffer.alloc(e.length);for(let n=0;n<e.length;n+=1){if(e[n]>255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${n}]: ${e[n]}`);t[n]=e[n]}return t},decode(e){const t=[];for(let n=0;n<e.length;n+=1)t[n]=e[n];return t}},t.uint16be={encode(e){const t=Buffer.alloc(2*e.length);let n=0;return e.forEach((e=>{if(e>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${n/2}]: ${e}`);t[n++]=e>>8&a[8],t[n++]=e&a[8]})),t},decode(e){if(e.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=2)t.push((e[n]<<8)+e[n+1]);return t}},t.uint16le={encode(e){const t=Buffer.alloc(2*e.length);let n=0;return e.forEach((e=>{if(e>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${n/2}]: ${e}`);t[n++]=e&a[8],t[n++]=e>>8&a[8]})),t},decode(e){if(e.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=2)t.push((e[n+1]<<8)+e[n]);return t}},t.uint32be={encode(e){const t=Buffer.alloc(4*e.length);let n=0;return e.forEach((e=>{t[n++]=e>>24&a[8],t[n++]=e>>16&a[8],t[n++]=e>>8&a[8],t[n++]=e&a[8]})),t},decode(e){if(e.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=4)t.push((e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]);return t}},t.uint32le={encode(e){const t=Buffer.alloc(4*e.length);let n=0;return e.forEach((e=>{t[n++]=e&a[8],t[n++]=e>>8&a[8],t[n++]=e>>16&a[8],t[n++]=e>>24&a[8]})),t},decode(e){if(e.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=4)t.push((e[n+3]<<24)+(e[n+2]<<16)+(e[n+1]<<8)+e[n]);return t}},t.string={encode:e=>n.utf16le.encode(e).toString("utf16le"),decode:e=>n.utf16le.decode(Buffer.from(e,"utf16le"),0)},t.escaped={encode(e){const t=[];for(let n=0;n<e.length;n+=1){const r=e[n];if(96===r)t.push(r),t.push(r);else if(10===r)t.push(r);else if(r>=32&&r<=126)t.push(r);else{let e="";if(r>=0&&r<=31)e+=`\`x${l[r]}`;else if(r>=127&&r<=255)e+=`\`x${l[r]}`;else if(r>=256&&r<=65535)e+=`\`u${l[r>>8&a[8]]}${l[r&a[8]]}`;else{if(!(r>=65536&&r<=4294967295))throw new Error("escape.encode(char): char > 0xffffffff not allowed");{e+="`u{";const t=r>>24&a[8];t>0&&(e+=l[t]),e+=`${l[r>>16&a[8]]+l[r>>8&a[8]]+l[r&a[8]]}}`}}Buffer.from(e).forEach((e=>{t.push(e)}))}}return Buffer.from(t)},decode(e){function t(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function n(e,n,r){const i={char:null,nexti:e+2,error:!0};if(e+1<n&&t(r[e])&&t(r[e+1])){const t=String.fromCodePoint(r[e],r[e+1]);i.char=parseInt(t,16),Number.isNaN(i.char)||(i.error=!1)}return i}function r(e,n,r){const i={char:null,nexti:e+4,error:!0};if(e+3<n&&t(r[e])&&t(r[e+1])&&t(r[e+2])&&t(r[e+3])){const t=String.fromCodePoint(r[e],r[e+1],r[e+2],r[e+3]);i.char=parseInt(t,16),Number.isNaN(i.char)||(i.error=!1)}return i}function i(e,n,r){const i={char:null,nexti:e+4,error:!0};let o="";for(;e<n&&t(r[e]);)o+=String.fromCodePoint(r[e]),e+=1;return i.char=parseInt(o,16),125!==r[e]||Number.isNaN(i.char)||(i.error=!1),i.nexti=e+1,i}const o=[],s=e.length;let a,l,u,c=0;for(;c<s;){const t=!0;for(;t;){if(u=!0,96!==e[c]){o.push(e[c]),c+=1,u=!1;break}if(a=c+1,a>=s)break;if(96===e[a]){o.push(96),c+=2,u=!1;break}if(120===e[a]){if(l=n(a+1,s,e),l.error)break;o.push(l.char),c=l.nexti,u=!1;break}if(117===e[a]){if(123===e[a+1]){if(l=i(a+2,s,e),l.error)break;o.push(l.char),c=l.nexti,u=!1;break}if(l=r(a+1,s,e),l.error)break;o.push(l.char),c=l.nexti,u=!1;break}break}if(u)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${c}]`)}return o}};const h=10;t.lineEnds={crlf(e){const t=[];let n=0;for(;n<e.length;)switch(e[n]){case 13:n+1<e.length&&e[n+1]===h?n+=2:n+=1,t.push(13),t.push(h);break;case h:t.push(13),t.push(h),n+=1;break;default:t.push(e[n]),n+=1}return t.length>0&&t[t.length-1]!==h&&(t.push(13),t.push(h)),t},lf(e){const t=[];let n=0;for(;n<e.length;)switch(e[n]){case 13:n+1<e.length&&e[n+1]===h?n+=2:n+=1,t.push(h);break;case h:t.push(h),n+=1;break;default:t.push(e[n]),n+=1}return t.length>0&&t[t.length-1]!==h&&t.push(h),t}},t.base64={encode(e){if(0===e.length)return Buffer.alloc(0);let t,n,r,i=e.length%3;i=i>0?3-i:0;let o=(e.length+i)/3;const s=Buffer.alloc(4*o);i>0&&(o-=1),t=0,n=0;for(let i=0;i<o;i+=1)r=e[t++]<<16,r+=e[t++]<<8,r+=e[t++],s[n++]=c[r>>18&a[6]],s[n++]=c[r>>12&a[6]],s[n++]=c[r>>6&a[6]],s[n++]=c[r&a[6]];return 0===i?s:1===i?(r=e[t++]<<16,r+=e[t]<<8,s[n++]=c[r>>18&a[6]],s[n++]=c[r>>12&a[6]],s[n++]=c[r>>6&a[6]],s[n]=c[64],s):2===i?(r=e[t]<<16,s[n++]=c[r>>18&a[6]],s[n++]=c[r>>12&a[6]],s[n++]=c[64],s[n]=c[64],s):void 0},decode(e){if(0===e.length)return Buffer.alloc(0);const t=function(e){const t=[];let n=0;for(let r=0;r<e.length;r+=1){const i=e[r],o=!0;for(;o&&32!==i&&9!==i&&10!==i&&13!==i;){if(i>=65&&i<=90){t.push(i-65);break}if(i>=97&&i<=122){t.push(i-71);break}if(i>=48&&i<=57){t.push(i+4);break}if(43===i){t.push(62);break}if(47===i){t.push(63);break}if(61===i){t.push(64),n+=1;break}throw new RangeError(`base64.decode: invalid character buf[${r}]: ${i}`)}}if(t.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${t.length}`);switch(n){case 0:break;case 1:if(64!==t[t.length-1])throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==t[t.length-1]||64!==t[t.length-2])throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${n}`)}return{tail:n,buf:Buffer.from(t)}}(e),{tail:n}=t,r=t.buf;let i,o,s,l=r.length/4;const u=Buffer.alloc(3*l-n);n>0&&(l-=1),o=0,i=0;for(let e=0;e<l;e+=1)s=r[i++]<<18,s+=r[i++]<<12,s+=r[i++]<<6,s+=r[i++],u[o++]=s>>16&a[8],u[o++]=s>>8&a[8],u[o++]=s&a[8];return 1===n&&(s=r[i++]<<18,s+=r[i++]<<12,s+=r[i]<<6,u[o++]=s>>16&a[8],u[o]=s>>8&a[8]),2===n&&(s=r[i++]<<18,s+=r[i++]<<12,u[o]=s>>16&a[8]),u},toString(e){if(e.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${e.length}`);let t="",n=0;function r(e,r,i,o){switch(n){case 76:t+=`\r\n${e}${r}${i}${o}`,n=4;break;case 75:t+=`${e}\r\n${r}${i}${o}`,n=3;break;case 74:t+=`${e+r}\r\n${i}${o}`,n=2;break;case 73:t+=`${e+r+i}\r\n${o}`,n=1;break;default:t+=e+r+i+o,n+=4}}for(let t=0;t<e.length;t+=4){for(let n=t;n<t+4;n+=1)if(!((i=e[n])>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||43===i||47===i||61===i))throw new RangeError(`base64.toString: buf[${n}]: ${e[n]} : not valid base64 character code`);r(String.fromCharCode(e[t]),String.fromCharCode(e[t+1]),String.fromCharCode(e[t+2]),String.fromCharCode(e[t+3]))}var i;return t}}},580:(e,t,n)=>{e.exports=function(){const e=n(8276),t=n(8544),r=this;let i=null,o=null,s=null,a=0;const l=[],u=[],c=[],h=[];function d(e){let t="";for(let n=0;n<e;n+=1)t+=" ";return t}this.callbacks=[],this.astObject="astObject",this.init=function(e,t,n){let d;c.length=0,h.length=0,l.length=0,a=0,i=e,o=t,s=n;const f=[];for(d=0;d<i.length;d+=1)f.push(i[d].lower);for(d=0;d<o.length;d+=1)f.push(o[d].lower);for(a=i.length+o.length,d=0;d<a;d+=1)l[d]=!1,u[d]=null;for(const e in r.callbacks){const t=e.toLowerCase();if(d=f.indexOf(t),d<0)throw new Error(`ast.js: init: node '${e}' not a rule or udt name`);"function"==typeof r.callbacks[e]&&(l[d]=!0,u[d]=r.callbacks[e]),!0===r.callbacks[e]&&(l[d]=!0)}},this.ruleDefined=function(e){return!1!==l[e]},this.udtDefined=function(e){return!1!==l[i.length+e]},this.down=function(t,n){const r=h.length;return c.push(r),h.push({name:n,thisIndex:r,thatIndex:null,state:e.SEM_PRE,callbackIndex:t,phraseIndex:null,phraseLength:null,stack:c.length}),r},this.up=function(t,n,r,i){const o=h.length,s=c.pop();return h.push({name:n,thisIndex:o,thatIndex:s,state:e.SEM_POST,callbackIndex:t,phraseIndex:r,phraseLength:i,stack:c.length}),h[s].thatIndex=o,h[s].phraseIndex=r,h[s].phraseLength=i,o},this.translate=function(t){let n,r,i;for(let o=0;o<h.length;o+=1)i=h[o],r=u[i.callbackIndex],i.state===e.SEM_PRE?null!==r&&(n=r(e.SEM_PRE,s,i.phraseIndex,i.phraseLength,t),n===e.SEM_SKIP&&(o=i.thatIndex)):null!==r&&r(e.SEM_POST,s,i.phraseIndex,i.phraseLength,t)},this.setLength=function(e){h.length=e,c.length=e>0?h[e-1].stack:0},this.getLength=function(){return h.length},this.toXml=function(n){let r=t.charsToDec,i="decimal integer character codes";if("string"==typeof n&&n.length>=3){const e=n.slice(0,3).toLowerCase();"asc"===e?(r=t.charsToAscii,i="ASCII for printing characters, hex for non-printing"):"hex"===e?(r=t.charsToHex,i="hexadecimal integer character codes"):"uni"===e&&(r=t.charsToUnicode,i="Unicode UTF-32 integer character codes")}let o="",a=0;return o+='<?xml version="1.0" encoding="utf-8"?>\n',o+=`<root nodes="${h.length/2}" characters="${s.length}">\n`,o+=`\x3c!-- input string, ${i} --\x3e\n`,o+=d(a+2),o+=r(s),o+="\n",h.forEach((t=>{t.state===e.SEM_PRE?(a+=1,o+=d(a),o+=`<node name="${t.name}" index="${t.phraseIndex}" length="${t.phraseLength}">\n`,o+=d(a+2),o+=r(s,t.phraseIndex,t.phraseLength),o+="\n"):(o+=d(a),o+=`</node>\x3c!-- name="${t.name}" --\x3e\n`,a-=1)})),o+="</root>\n",o},this.phrases=function(){const t={};let n,r;for(n=0;n<h.length;n+=1)r=h[n],r.state===e.SEM_PRE&&(Array.isArray(t[r.name])||(t[r.name]=[]),t[r.name].push({index:r.phraseIndex,length:r.phraseLength}));return t}}},2761:e=>{e.exports=function(){let e=-1,t=0;this.init=function(n){if("number"!=typeof n||n<=0)throw new Error("circular-buffer.js: init: circular buffer size must an integer > 0");t=Math.ceil(n),e=-1},this.increment=function(){return e+=1,(e+t)%t},this.maxSize=function(){return t},this.items=function(){return e+1},this.getListIndex=function(n){return-1===e||n<0||n>e||e-n>=t?-1:(n+t)%t},this.forEach=function(n){if(-1!==e)if(e<t)for(let t=0;t<=e;t+=1)n(t,t);else for(let r=e-t+1;r<=e;r+=1)n((r+t)%t,r)}}},1593:e=>{e.exports=function(){return"/* This file automatically generated by jsonToless() and LESS. */\n.apg-mono {\n font-family: monospace;\n}\n.apg-active {\n font-weight: bold;\n color: #000000;\n}\n.apg-match {\n font-weight: bold;\n color: #264BFF;\n}\n.apg-empty {\n font-weight: bold;\n color: #0fbd0f;\n}\n.apg-nomatch {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-lh-match {\n font-weight: bold;\n color: #1A97BA;\n}\n.apg-lb-match {\n font-weight: bold;\n color: #5F1687;\n}\n.apg-remainder {\n font-weight: bold;\n color: #999999;\n}\n.apg-ctrl-char {\n font-weight: bolder;\n font-style: italic;\n font-size: 0.6em;\n}\n.apg-line-end {\n font-weight: bold;\n color: #000000;\n}\n.apg-error {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-phrase {\n color: #000000;\n background-color: #8caae6;\n}\n.apg-empty-phrase {\n color: #0fbd0f;\n}\ntable.apg-state {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th,\ntable.apg-state td {\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th:nth-last-child(2),\ntable.apg-state td:nth-last-child(2) {\n text-align: right;\n}\ntable.apg-state caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-stats {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats th,\ntable.apg-stats td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace th,\ntable.apg-trace td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace th:last-child,\ntable.apg-trace th:nth-last-child(2),\ntable.apg-trace td:last-child,\ntable.apg-trace td:nth-last-child(2) {\n text-align: left;\n}\ntable.apg-grammar {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-grammar th,\ntable.apg-grammar td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar th:last-child,\ntable.apg-grammar td:last-child {\n text-align: left;\n}\ntable.apg-rules {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-rules th,\ntable.apg-rules td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules a {\n color: #003399 !important;\n}\ntable.apg-rules a:hover {\n color: #8caae6 !important;\n}\ntable.apg-attrs {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-attrs th,\ntable.apg-attrs td {\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs th:nth-child(1),\ntable.apg-attrs th:nth-child(2),\ntable.apg-attrs th:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs td:nth-child(1),\ntable.apg-attrs td:nth-child(2),\ntable.apg-attrs td:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs a {\n color: #003399 !important;\n}\ntable.apg-attrs a:hover {\n color: #8caae6 !important;\n}\n"}},8276:e=>{e.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}},8737:(e,t,n)=>{e.exports={ast:n(580),circular:n(2761),ids:n(8276),parser:n(8629),stats:n(5403),trace:n(9290),utils:n(8544),emitcss:n(1593),style:n(3932)}},8629:(e,t,n)=>{e.exports=function(){const e=n(8276),t=n(8544),r="parser.js: ",i=this;let o;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let s,a,l,u,c=null,h=null,d=0,f=0,p=0,m=null,g=null,v=null,y=null,b=null,w=0,A=1/0,_=1/0;const E=function(t,n,i){const s=`${r}evaluateRule(): `;if(t>=v.length)throw new Error(`${s}rule index: ${t} out of range`);if(n>=l)throw new Error(`${s}phrase index: ${n} out of range`);const{length:a}=c;c.push({type:e.RNM,index:t}),o(a,n,i),c.pop()},M=function(t,n,i){const s=`${r}evaluateUdt(): `;if(t>=y.length)throw new Error(`${s}udt index: ${t} out of range`);if(n>=l)throw new Error(`${s}phrase index: ${n} out of range`);const{length:a}=c;c.push({type:e.UDT,empty:y[t].empty,index:t}),o(a,n,i),c.pop()},k=function(){d=0,f=0,p=0,w=0,u=[{lookAround:e.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],v=null,y=null,h=null,s=0,a=0,l=0,m=null,g=null,b=null,c=null},S=function(){const e=[];this.push=function(){e.push(function(){const t=e[e.length-1],n={};for(const e in t)n[e]=t[e];return n}())},this.pop=function(t){let n=t;if(n||(n=e.length-1),n<1||n>e.length)throw new Error(`${r}backRef.pop(): bad length: ${n}`);return e.length=n,e[e.length-1]},this.length=function(){return e.length},this.savePhrase=function(t,n,r){e[e.length-1][t]={phraseIndex:n,phraseLength:r}},this.getPhrase=function(t){return e[e.length-1][t]},function(){const t={};v.forEach((e=>{e.isBkr&&(t[e.lower]=null)})),y.length>0&&y.forEach((e=>{e.isBkr&&(t[e.lower]=null)})),e.push(t)}()},x=function(){const t=this;this.state=e.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=u[u.length-1],this.uFrame=new S,this.pFrame=new S,this.evaluateRule=E,this.evaluateUdt=M,this.refresh=function(){t.state=e.ACTIVE,t.phraseLength=0,t.lookAround=u[u.length-1]}},C=function(){return u[u.length-1]},T=function(){return u.length>1},O=function(e,n,i){const o=`${r}initializeInputChars(): `;let u=e,c=n,d=i;if(void 0===u)throw new Error(`${o}input string is undefined`);if(null===u)throw new Error(`${o}input string is null`);if("string"==typeof u)u=t.stringToChars(u);else if(!Array.isArray(u))throw new Error(`${o}input string is not a string or array`);if(u.length>0&&"number"!=typeof u[0])throw new Error(`${o}input string not an array of integers`);if("number"!=typeof c)c=0;else if(c=Math.floor(c),c<0||c>u.length)throw new Error(`${o}input beginning index out of range: ${c}`);if("number"!=typeof d)d=u.length-c;else if(d=Math.floor(d),d<0||d>u.length-c)throw new Error(`${o}input length out of range: ${d}`);h=u,s=c,a=d,l=s+a};this.setMaxTreeDepth=function(e){if("number"!=typeof e)throw new Error(`parser: max tree depth must be integer > 0: ${e}`);if(A=Math.floor(e),A<=0)throw new Error(`parser: max tree depth must be integer > 0: ${e}`)},this.setMaxNodeHits=function(e){if("number"!=typeof e)throw new Error(`parser: max node hits must be integer > 0: ${e}`);if(_=Math.floor(e),_<=0)throw new Error(`parser: max node hits must be integer > 0: ${e}`)};const R=function(t,n,u){let d;const A=`${r}parse(): `;!function(e){const t=`${r}initializeGrammar(): `;if(!e)throw new Error(`${t}grammar object undefined`);if("grammarObject"!==e.grammarObject)throw new Error(`${t}bad grammar object`);v=e.rules,y=e.udts}(t);const _=function(e){const t=`${r}initializeStartRule(): `;let n=null;if("number"==typeof e){if(e>=v.length)throw new Error(`${t}start rule index too large: max: ${v.length}: index: ${e}`);n=e}else{if("string"!=typeof e)throw new Error(`${t}type of start rule '${typeof e}' not recognized`);{const r=e.toLowerCase();for(let e=0;e<v.length;e+=1)if(r===v[e].lower){n=v[e].index;break}if(null===n)throw new Error(`${t}start rule name '${e}' not recognized`)}}return n}(n);!function(){const e=`${r}initializeCallbacks(): `;let t,n;for(m=[],g=[],t=0;t<v.length;t+=1)m[t]=null;for(t=0;t<y.length;t+=1)g[t]=null;const o=[];for(t=0;t<v.length;t+=1)o.push(v[t].lower);for(t=0;t<y.length;t+=1)o.push(y[t].lower);for(const r in i.callbacks){if(t=o.indexOf(r.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${r}' not a rule or udt name`);if(n=i.callbacks[r],n||(n=null),"function"!=typeof n&&null!==n)throw new Error(`${e}syntax callback[${r}] must be function reference or 'false' (false/null/undefined/etc.)`);t<v.length?m[t]=n:g[t-v.length]=n}for(t=0;t<y.length;t+=1)if(null===g[t])throw new Error(`${e}all UDT callbacks must be defined. UDT callback[${y[t].lower}] not a function reference`)}(),function(){const e=`${r}initializeTrace(): `;for(;;){if(void 0===i.trace){i.trace=null;break}if(null===i.trace)break;if("traceObject"!==i.trace.traceObject)throw new Error(`${e}trace object not recognized`);break}null!==i.trace&&i.trace.init(v,y,h)}(),function(){const e=`${r}initializeStats(): `;for(;;){if(void 0===i.stats){i.stats=null;break}if(null===i.stats)break;if("statsObject"!==i.stats.statsObject)throw new Error(`${e}stats object not recognized`);break}null!==i.stats&&i.stats.init(v,y)}(),function(){const e=`${r}initializeAst(): `;for(;;){if(void 0===i.ast){i.ast=null;break}if(null===i.ast)break;if("astObject"!==i.ast.astObject)throw new Error(`${e}ast object not recognized`);break}null!==i.ast&&i.ast.init(v,y,h)}();const E=new x;switch(null!=u&&(b=u),c=[{type:e.RNM,index:_}],o(0,s,E),c=null,E.state){case e.ACTIVE:throw new Error(`${A}final state should never be 'ACTIVE'`);case e.NOMATCH:d=!1;break;case e.EMPTY:case e.MATCH:d=E.phraseLength===a;break;default:throw new Error("unrecognized state")}return{success:d,state:E.state,length:a,matched:E.phraseLength,maxMatched:w,maxTreeDepth:f,nodeHits:p,inputLength:h.length,subBegin:s,subEnd:l,subLength:a}};this.parseSubstring=function(e,t,n,r,i,o){return k(),O(n,r,i),R(e,t,o)},this.parse=function(e,t,n,r){return k(),O(n,0,n.length),R(e,t,r)};const P=function(t,n,r){const i=c[t];for(let t=0;t<i.children.length&&(o(i.children[t],n,r),r.state===e.NOMATCH);t+=1);},N=function(t,n,i,o){if(n.phraseLength>i){let e=`${r}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${n.phraseLength}`,e+=` must be <= remaining chars: ${i}`,new Error(e)}switch(n.state){case e.ACTIVE:if(!0!==o)throw new Error(`${r}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:n.phraseLength=0;break;case e.MATCH:0===n.phraseLength&&(n.state=e.EMPTY);break;case e.NOMATCH:n.phraseLength=0;break;default:throw new Error(`${r}opRNM(${t.name}): callback function return error. Unrecognized return state: ${n.state}`)}},L=function(t,n,r){let s,a,u,d,f,p;const g=c[t],y=v[g.index],w=m[y.index],A=!T();if(A&&(a=i.ast&&i.ast.ruleDefined(g.index),a&&(s=i.ast.getLength(),i.ast.down(g.index,v[g.index].name)),d=r.uFrame.length(),f=r.pFrame.length(),r.uFrame.push(),r.pFrame.push(),p=r.pFrame,r.pFrame=new S),null===w)u=c,c=y.opcodes,o(0,n,r),c=u;else{const t=l-n;r.ruleIndex=y.index,w(r,h,n,b),N(y,r,t,!0),r.state===e.ACTIVE&&(u=c,c=y.opcodes,o(0,n,r),c=u,r.ruleIndex=y.index,w(r,h,n,b),N(y,r,t,!1))}A&&(a&&(r.state===e.NOMATCH?i.ast.setLength(s):i.ast.up(g.index,y.name,n,r.phraseLength)),r.pFrame=p,r.state===e.NOMATCH?(r.uFrame.pop(d),r.pFrame.pop(f)):y.isBkr&&(r.pFrame.savePhrase(y.lower,n,r.phraseLength),r.uFrame.savePhrase(y.lower,n,r.phraseLength)))},I=function(t,n,o){let s,a,u,d,f,p;const m=c[t],w=y[m.index];o.UdtIndex=w.index;const A=!T();A&&(u=i.ast&&i.ast.udtDefined(m.index),u&&(a=v.length+m.index,s=i.ast.getLength(),i.ast.down(a,w.name)),d=o.uFrame.length(),f=o.pFrame.length(),o.uFrame.push(),o.pFrame.push(),p=o.pFrame,o.pFrame=new S);const _=l-n;g[m.index](o,h,n,b),function(t,n,i){if(n.phraseLength>i){let e=`${r}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${n.phraseLength}`,e+=` must be <= remaining chars: ${i}`,new Error(e)}switch(n.state){case e.ACTIVE:throw new Error(`${r}opUDT(${t.name}): callback function return error. ACTIVE state not allowed.`);case e.EMPTY:if(!1===t.empty)throw new Error(`${r}opUDT(${t.name}): callback function return error. May not return EMPTY.`);n.phraseLength=0;break;case e.MATCH:if(0===n.phraseLength){if(!1===t.empty)throw new Error(`${r}opUDT(${t.name}): callback function return error. May not return EMPTY.`);n.state=e.EMPTY}break;case e.NOMATCH:n.phraseLength=0;break;default:throw new Error(`${r}opUDT(${t.name}): callback function return error. Unrecognized return state: ${n.state}`)}}(w,o,_),A&&(u&&(o.state===e.NOMATCH?i.ast.setLength(s):i.ast.up(a,w.name,n,o.phraseLength)),o.pFrame=p,o.state===e.NOMATCH?(o.uFrame.pop(d),o.pFrame.pop(f)):w.isBkr&&(o.pFrame.savePhrase(w.lower,n,o.phraseLength),o.uFrame.savePhrase(w.lower,n,o.phraseLength)))},B=function(t,n,r){u.push({lookAround:e.LOOKAROUND_AHEAD,anchor:n,charsEnd:l,charsLength:a}),l=h.length,a=h.length-s,o(t+1,n,r);const i=u.pop();switch(l=i.charsEnd,a=i.charsLength,r.phraseLength=0,r.state){case e.EMPTY:case e.MATCH:r.state=e.EMPTY;break;case e.NOMATCH:r.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${r.state}`)}},D=function(t,n,r){u.push({lookAround:e.LOOKAROUND_AHEAD,anchor:n,charsEnd:l,charsLength:a}),l=h.length,a=h.length-s,o(t+1,n,r);const i=u.pop();switch(l=i.charsEnd,a=i.charsLength,r.phraseLength=0,r.state){case e.EMPTY:case e.MATCH:r.state=e.NOMATCH;break;case e.NOMATCH:r.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${r.state}`)}},j=function(t,n,r){r.state=e.NOMATCH,r.phraseLength=0,r.state=0===n?e.EMPTY:e.NOMATCH},F=function(t,n,r){r.state=e.NOMATCH,r.phraseLength=0,r.state=n===h.length?e.EMPTY:e.NOMATCH},U=function(t,n,r){switch(u.push({lookAround:e.LOOKAROUND_BEHIND,anchor:n}),o(t+1,n,r),u.pop(),r.phraseLength=0,r.state){case e.EMPTY:case e.MATCH:r.state=e.EMPTY;break;case e.NOMATCH:r.state=e.NOMATCH;break;default:throw new Error(`opBKA: invalid state ${r.state}`)}},q=function(t,n,r){switch(u.push({lookAround:e.LOOKAROUND_BEHIND,anchor:n}),o(t+1,n,r),u.pop(),r.phraseLength=0,r.state){case e.EMPTY:case e.MATCH:r.state=e.NOMATCH;break;case e.NOMATCH:r.state=e.EMPTY;break;default:throw new Error(`opBKN: invalid state ${r.state}`)}};o=function(t,n,r){let s=!0;const a=c[t];if(p+=1,p>_)throw new Error(`parser: maximum number of node hits exceeded: ${_}`);if(d+=1,d>f&&(f=d,f>A))throw new Error(`parser: maximum parse tree depth exceeded: ${A}`);if(r.refresh(),null!==i.trace){const e=C();i.trace.down(a,r.state,n,r.phraseLength,e.anchor,e.lookAround)}if(u[u.length-1].lookAround===e.LOOKAROUND_BEHIND)switch(a.type){case e.ALT:P(t,n,r);break;case e.CAT:!function(t,n,r){let s,a,l,u;const h=c[t],d=r.uFrame.length(),f=r.pFrame.length();i.ast&&(a=i.ast.getLength()),s=!0,l=n,u=0;for(let t=h.children.length-1;t>=0;t-=1)if(o(h.children[t],l,r),l-=r.phraseLength,u+=r.phraseLength,r.state===e.NOMATCH){s=!1;break}s?(r.state=0===u?e.EMPTY:e.MATCH,r.phraseLength=u):(r.state=e.NOMATCH,r.phraseLength=0,r.uFrame.pop(d),r.pFrame.pop(f),i.ast&&i.ast.setLength(a))}(t,n,r);break;case e.REP:!function(t,n,r){let s,a,l,u;const h=c[t];a=n,l=0,u=0;const d=r.uFrame.length(),f=r.pFrame.length();for(i.ast&&(s=i.ast.getLength());!(a<=0)&&(o(t+1,a,r),r.state!==e.NOMATCH)&&r.state!==e.EMPTY&&(u+=1,l+=r.phraseLength,a-=r.phraseLength,u!==h.max););r.state===e.EMPTY||u>=h.min?(r.state=0===l?e.EMPTY:e.MATCH,r.phraseLength=l):(r.state=e.NOMATCH,r.phraseLength=0,r.uFrame.pop(d),r.pFrame.pop(f),i.ast&&i.ast.setLength(s))}(t,n,r);break;case e.RNM:L(t,n,r);break;case e.UDT:I(t,n,r);break;case e.AND:B(t,n,r);break;case e.NOT:D(t,n,r);break;case e.TRG:!function(t,n,r){const i=c[t];if(r.state=e.NOMATCH,r.phraseLength=0,n>0){const t=h[n-1];i.min<=t&&t<=i.max&&(r.state=e.MATCH,r.phraseLength=1)}}(t,n,r);break;case e.TBS:!function(t,n,r){let i;const o=c[t];r.state=e.NOMATCH;const s=o.string.length,a=n-s;if(a>=0){for(i=0;i<s;i+=1)if(h[a+i]!==o.string[i])return;r.state=e.MATCH,r.phraseLength=s}}(t,n,r);break;case e.TLS:!function(t,n,r){let i;const o=c[t];r.state=e.NOMATCH;const s=o.string.length;if(0===s)return void(r.state=e.EMPTY);const a=n-s;if(a>=0){for(let e=0;e<s;e+=1)if(i=h[a+e],i>=65&&i<=90&&(i+=32),i!==o.string[e])return;r.state=e.MATCH,r.phraseLength=s}}(t,n,r);break;case e.BKR:!function(t,n,r){let i,o,s,a;const l=c[t];r.state=e.NOMATCH,r.phraseLength=0,a=l.index<v.length?v[l.index].lower:y[l.index-v.length].lower;const u=l.bkrMode===e.BKR_MODE_PM?r.pFrame.getPhrase(a):r.uFrame.getPhrase(a),d=l.bkrCase===e.BKR_MODE_CI;if(null===u)return;const f=u.phraseIndex,p=u.phraseLength;if(0===p)return r.state=e.EMPTY,void(r.phraseLength=0);const m=n-p;if(m>=0){if(d){for(i=0;i<p;i+=1)if(o=h[m+i],s=h[f+i],o>=65&&o<=90&&(o+=32),s>=65&&s<=90&&(s+=32),o!==s)return;r.state=e.MATCH,r.phraseLength=p}else for(i=0;i<p;i+=1)if(o=h[m+i],s=h[f+i],o!==s)return;r.state=e.MATCH,r.phraseLength=p}}(t,n,r);break;case e.BKA:U(t,n,r);break;case e.BKN:q(t,n,r);break;case e.ABG:j(0,n,r);break;case e.AEN:F(0,n,r);break;default:s=!1}else switch(a.type){case e.ALT:P(t,n,r);break;case e.CAT:!function(t,n,r){let s,a,l,u;const h=c[t],d=r.uFrame.length(),f=r.pFrame.length();i.ast&&(a=i.ast.getLength()),s=!0,l=n,u=0;for(let t=0;t<h.children.length;t+=1){if(o(h.children[t],l,r),r.state===e.NOMATCH){s=!1;break}l+=r.phraseLength,u+=r.phraseLength}s?(r.state=0===u?e.EMPTY:e.MATCH,r.phraseLength=u):(r.state=e.NOMATCH,r.phraseLength=0,r.uFrame.pop(d),r.pFrame.pop(f),i.ast&&i.ast.setLength(a))}(t,n,r);break;case e.REP:!function(t,n,r){let s,a,u,h;const d=c[t];a=n,u=0,h=0;const f=r.uFrame.length(),p=r.pFrame.length();for(i.ast&&(s=i.ast.getLength());!(a>=l)&&(o(t+1,a,r),r.state!==e.NOMATCH)&&r.state!==e.EMPTY&&(h+=1,u+=r.phraseLength,a+=r.phraseLength,h!==d.max););r.state===e.EMPTY||h>=d.min?(r.state=0===u?e.EMPTY:e.MATCH,r.phraseLength=u):(r.state=e.NOMATCH,r.phraseLength=0,r.uFrame.pop(f),r.pFrame.pop(p),i.ast&&i.ast.setLength(s))}(t,n,r);break;case e.RNM:L(t,n,r);break;case e.UDT:I(t,n,r);break;case e.AND:B(t,n,r);break;case e.NOT:D(t,n,r);break;case e.TRG:!function(t,n,r){const i=c[t];r.state=e.NOMATCH,n<l&&i.min<=h[n]&&h[n]<=i.max&&(r.state=e.MATCH,r.phraseLength=1)}(t,n,r);break;case e.TBS:!function(t,n,r){let i;const o=c[t],s=o.string.length;if(r.state=e.NOMATCH,n+s<=l){for(i=0;i<s;i+=1)if(h[n+i]!==o.string[i])return;r.state=e.MATCH,r.phraseLength=s}}(t,n,r);break;case e.TLS:!function(t,n,r){let i,o;const s=c[t];r.state=e.NOMATCH;const a=s.string.length;if(0!==a){if(n+a<=l){for(i=0;i<a;i+=1)if(o=h[n+i],o>=65&&o<=90&&(o+=32),o!==s.string[i])return;r.state=e.MATCH,r.phraseLength=a}}else r.state=e.EMPTY}(t,n,r);break;case e.BKR:!function(t,n,r){let i,o,s,a;const u=c[t];r.state=e.NOMATCH,a=u.index<v.length?v[u.index].lower:y[u.index-v.length].lower;const d=u.bkrMode===e.BKR_MODE_PM?r.pFrame.getPhrase(a):r.uFrame.getPhrase(a),f=u.bkrCase===e.BKR_MODE_CI;if(null===d)return;const p=d.phraseIndex,m=d.phraseLength;if(0!==m){if(n+m<=l){if(f){for(i=0;i<m;i+=1)if(o=h[n+i],s=h[p+i],o>=65&&o<=90&&(o+=32),s>=65&&s<=90&&(s+=32),o!==s)return;r.state=e.MATCH,r.phraseLength=m}else for(i=0;i<m;i+=1)if(o=h[n+i],s=h[p+i],o!==s)return;r.state=e.MATCH,r.phraseLength=m}}else r.state=e.EMPTY}(t,n,r);break;case e.BKA:U(t,n,r);break;case e.BKN:q(t,n,r);break;case e.ABG:j(0,n,r);break;case e.AEN:F(0,n,r);break;default:s=!1}if(!T()&&n+r.phraseLength>w&&(w=n+r.phraseLength),null!==i.stats&&i.stats.collect(a,r),null!==i.trace){const e=C();i.trace.up(a,r.state,n,r.phraseLength,e.anchor,e.lookAround)}return d-=1,s}}},5403:(e,t,n)=>{e.exports=function(){const e=n(8276),t=n(8544),r=n(3932);let i=[],o=[];const s=[];let a;const l=[],u=[];this.statsObject="statsObject";const c=function(e,t){return e.lower<t.lower?-1:e.lower>t.lower?1:0},h=function(e,t){return e.total<t.total?1:e.total>t.total?-1:c(e,t)},d=function(e,t){return e.index<t.index?-1:e.index>t.index?1:0},f=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},p=function(t,n){switch(t.total+=1,n){case e.EMPTY:t.empty+=1;break;case e.MATCH:t.match+=1;break;case e.NOMATCH:t.nomatch+=1;break;default:throw new Error(`stats.js: collect(): incStat(): unrecognized state: ${n}`)}},m=function(e,t){let n="";return n+="<tr>",n+=`<td class="${r.CLASS_ACTIVE}">${e}</td>`,n+=`<td class="${r.CLASS_EMPTY}">${t.empty}</td>`,n+=`<td class="${r.CLASS_MATCH}">${t.match}</td>`,n+=`<td class="${r.CLASS_NOMATCH}">${t.nomatch}</td>`,n+=`<td class="${r.CLASS_ACTIVE}">${t.total}</td>`,n+="</tr>\n",n},g=function(){let t="";return t+=m("ALT",s[e.ALT]),t+=m("CAT",s[e.CAT]),t+=m("REP",s[e.REP]),t+=m("RNM",s[e.RNM]),t+=m("TRG",s[e.TRG]),t+=m("TBS",s[e.TBS]),t+=m("TLS",s[e.TLS]),t+=m("UDT",s[e.UDT]),t+=m("AND",s[e.AND]),t+=m("NOT",s[e.NOT]),t+=m("BKR",s[e.BKR]),t+=m("BKA",s[e.BKA]),t+=m("BKN",s[e.BKN]),t+=m("ABG",s[e.ABG]),t+=m("AEN",s[e.AEN]),t+=m("totals",a),t},v=function(){let e="";e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n",e+="<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>\n";for(let t=0;t<i.length;t+=1)l[t].total>0&&(e+="<tr>",e+=`<td class="${r.CLASS_ACTIVE}">${l[t].name}</td>`,e+=`<td class="${r.CLASS_EMPTY}">${l[t].empty}</td>`,e+=`<td class="${r.CLASS_MATCH}">${l[t].match}</td>`,e+=`<td class="${r.CLASS_NOMATCH}">${l[t].nomatch}</td>`,e+=`<td class="${r.CLASS_ACTIVE}">${l[t].total}</td>`,e+="</tr>\n");if(o.length>0){e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n",e+="<tr><th>udts</th><th></th><th></th><th></th><th></th></tr>\n";for(let t=0;t<o.length;t+=1)u[t].total>0&&(e+="<tr>",e+=`<td class="${r.CLASS_ACTIVE}">${u[t].name}</td>`,e+=`<td class="${r.CLASS_EMPTY}">${u[t].empty}</td>`,e+=`<td class="${r.CLASS_MATCH}">${u[t].match}</td>`,e+=`<td class="${r.CLASS_NOMATCH}">${u[t].nomatch}</td>`,e+=`<td class="${r.CLASS_ACTIVE}">${u[t].total}</td>`,e+="</tr>\n")}return e};this.validate=function(e){let t=!1;return"string"==typeof e&&"stats"===e&&(t=!0),t},this.init=function(t,n){i=t,o=n,function(){s.length=0,a=new f,s[e.ALT]=new f,s[e.CAT]=new f,s[e.REP]=new f,s[e.RNM]=new f,s[e.TRG]=new f,s[e.TBS]=new f,s[e.TLS]=new f,s[e.UDT]=new f,s[e.AND]=new f,s[e.NOT]=new f,s[e.BKR]=new f,s[e.BKA]=new f,s[e.BKN]=new f,s[e.ABG]=new f,s[e.AEN]=new f,l.length=0;for(let e=0;e<i.length;e+=1)l.push({empty:0,match:0,nomatch:0,total:0,name:i[e].name,lower:i[e].lower,index:i[e].index});if(o.length>0){u.length=0;for(let e=0;e<o.length;e+=1)u.push({empty:0,match:0,nomatch:0,total:0,name:o[e].name,lower:o[e].lower,index:o[e].index})}}()},this.collect=function(t,n){p(a,n.state,n.phraseLength),p(s[t.type],n.state,n.phraseLength),t.type===e.RNM&&p(l[t.index],n.state,n.phraseLength),t.type===e.UDT&&p(u[t.index],n.state,n.phraseLength)},this.toHtml=function(e,t){let n="";for(n+=`<table class="${r.CLASS_STATS}">\n`,"string"==typeof t&&(n+=`<caption>${t}</caption>\n`),n+=`<tr><th class="${r.CLASS_ACTIVE}">ops</th>\n`,n+=`<th class="${r.CLASS_EMPTY}">EMPTY</th>\n`,n+=`<th class="${r.CLASS_MATCH}">MATCH</th>\n`,n+=`<th class="${r.CLASS_NOMATCH}">NOMATCH</th>\n`,n+=`<th class="${r.CLASS_ACTIVE}">totals</th></tr>\n`;;){if(void 0===e){n+=g();break}if(null===e){n+=g();break}if("ops"===e){n+=g();break}if("index"===e){l.sort(d),u.length>0&&u.sort(d),n+=g(),n+=v();break}if("hits"===e){l.sort(h),u.length>0&&u.sort(d),n+=g(),n+=v();break}if("alpha"===e){l.sort(c),u.length>0&&u.sort(c),n+=g(),n+=v();break}break}return n+="</table>\n",n},this.toHtmlPage=function(e,n,r){return t.htmlToPage(this.toHtml(e,n),r)}}},3932:e=>{e.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}},9290:(e,t,n)=>{e.exports=function(){const e=n(8544),t=n(3932),r=new(n(2761)),i=n(8276),o="trace.js: ",s=this,a=16,l=80,u=[];let c=5e3,h=-1,d=0,f=0;const p=[];let m=null,g=null,v=null;const y=[],b=[],w=`<span class="${t.CLASS_LINEEND}">•</span>`,A=`<span class="${t.CLASS_LINEEND}">…</span>`,_=`<span class="${t.CLASS_EMPTY}">𝜺</span>`;this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(e,t){h=-1,"number"==typeof e&&e>0?(c=Math.ceil(e),"number"==typeof t&&(h=Math.floor(t),h<0&&(h=-1))):c=0},this.getMaxRecords=function(){return c},this.getLastRecord=function(){return h},this.init=function(e,t,n){u.length=0,p.length=0,d=0,f=0,m=n,g=e,v=t,function(){const e=function(e){y[i.ALT]=e,y[i.CAT]=e,y[i.REP]=e,y[i.TLS]=e,y[i.TBS]=e,y[i.TRG]=e,y[i.AND]=e,y[i.NOT]=e,y[i.BKR]=e,y[i.BKA]=e,y[i.BKN]=e,y[i.ABG]=e,y[i.AEN]=e};let t=0;for(const e in s.filter.operators)t+=1;if(0!==t){for(const t in s.filter.operators){const n=t.toUpperCase();if("<ALL>"===n)return void e(!0);if("<NONE>"===n)return void e(!1)}e(!1);for(const e in s.filter.operators){const t=e.toUpperCase();if("ALT"===t)y[i.ALT]=!0===s.filter.operators[e];else if("CAT"===t)y[i.CAT]=!0===s.filter.operators[e];else if("REP"===t)y[i.REP]=!0===s.filter.operators[e];else if("AND"===t)y[i.AND]=!0===s.filter.operators[e];else if("NOT"===t)y[i.NOT]=!0===s.filter.operators[e];else if("TLS"===t)y[i.TLS]=!0===s.filter.operators[e];else if("TBS"===t)y[i.TBS]=!0===s.filter.operators[e];else if("TRG"===t)y[i.TRG]=!0===s.filter.operators[e];else if("BKR"===t)y[i.BKR]=!0===s.filter.operators[e];else if("BKA"===t)y[i.BKA]=!0===s.filter.operators[e];else if("BKN"===t)y[i.BKN]=!0===s.filter.operators[e];else if("ABG"===t)y[i.ABG]=!0===s.filter.operators[e];else{if("AEN"!==t)throw new Error(`${o}initOpratorFilter: '${e}' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`);y[i.AEN]=!0===s.filter.operators[e]}}}else e(!1)}(),function(){const e=function(e){y[i.RNM]=e,y[i.UDT]=e;const t=g.length+v.length;b.length=0;for(let n=0;n<t;n+=1)b.push(e)};let t,n;const r=[];for(n=0;n<g.length;n+=1)r.push(g[n].lower);for(n=0;n<v.length;n+=1)r.push(v[n].lower);b.length=0,t=0;for(const e in s.filter.rules)t+=1;if(0!==t){for(const t in s.filter.rules){const n=t.toLowerCase();if("<all>"===n)return void e(!0);if("<none>"===n)return void e(!1)}e(!1),y[i.RNM]=!0,y[i.UDT]=!0;for(const e in s.filter.rules){const t=e.toLowerCase();if(n=r.indexOf(t),n<0)throw new Error(`${o}initRuleFilter: '${e}' not a valid rule or udt name`);b[n]=!0===s.filter.rules[e]}}else e(!0)}(),r.init(c)};const E=function(e){let t=!1;return t=e.type===i.RNM?!(!y[e.type]||!b[e.index]):e.type===i.UDT?!(!y[e.type]||!b[g.length+e.index]):y[e.type],t},M=function(e){return-1===h||e<=h};this.down=function(e,t,n,i,o,s){M(d)&&E(e)&&(p.push(d),u[r.increment()]={dirUp:!1,depth:f,thisLine:d,thatLine:void 0,opcode:e,state:t,phraseIndex:n,phraseLength:i,lookAnchor:o,lookAround:s},d+=1,f+=1)},this.up=function(e,t,n,i,o,s){if(M(d)&&E(e)){const a=d,l=p.pop(),c=r.getListIndex(l);-1!==c&&(u[c].thatLine=a),f-=1,u[r.increment()]={dirUp:!0,depth:f,thisLine:a,thatLine:l,opcode:e,state:t,phraseIndex:n,phraseLength:i,lookAnchor:o,lookAround:s},d+=1}},this.toTree=function(t){const n=function(){function t(t,n){let r,o,s;if(n)switch(t.op={id:n.type,name:e.opcodeToString(n.type)},t.opData=void 0,n.type){case i.RNM:t.opData=g[n.index].name;break;case i.UDT:t.opData=v[n.index].name;break;case i.BKR:r=n.index<g.length?g[n.index].name:v[n.index-g.length].name,o=n.bkrCase===i.BKR_MODE_CI?"%i":"%s",s=n.bkrMode===i.BKR_MODE_UM?"%u":"%p",t.opData=`\\\\${o}${s}${r}`;break;case i.TLS:t.opData=[];for(let e=0;e<n.string.length;e+=1)t.opData.push(n.string[e]);break;case i.TBS:t.opData=[];for(let e=0;e<n.string.length;e+=1)t.opData.push(n.string[e]);break;case i.TRG:case i.REP:t.opData=[n.min,n.max];break;default:throw new Error("unrecognized opcode")}else t.op={id:void 0,name:void 0},t.opData=void 0}function n(e,t,n){return e===i.MATCH?{index:t,length:n}:e===i.NOMATCH||e===i.EMPTY?{index:t,length:0}:null}let o=-1;function s(r,i,s){const a={id:o++,branch:-1,parent:r,up:!1,down:!1,depth:s,children:[]};return i?(a.down=!0,a.state={id:i.state,name:e.stateToString(i.state)},a.phrase=null,t(a,i.opcode)):(a.state={id:void 0,name:void 0},a.phrase=n(),t(a,void 0)),a}function a(r,i){i&&(r.up=!0,r.state={id:i.state,name:e.stateToString(i.state)},r.phrase=n(i.state,i.phraseIndex,i.phraseLength),r.down||t(r,i.opcode))}let l=0,c=-1,h=1;const d=[];let p,y,b,w,A=!0;const _=s(null,null,-1);for(d.push(_),y=_,r.forEach((e=>{if(w=u[e],A&&(A=!1,w.depth>0)){const e=w.dirUp?w.depth+1:w.depth;for(let t=0;t<e;t+=1)b=y,y=s(y,null,t),d.push(y),b.children.push(y)}w.dirUp?(y=d.pop(),a(y,w),y=d[d.length-1]):(b=y,y=s(y,w,w.depth),d.push(y),b.children.push(y))}));d.length>1;)y=d.pop(),a(y,null);if(0===_.children.length)throw new Error("trace.toTree(): parse tree has no nodes");if(0===d.length)throw new Error("trace.toTree(): integrity check: dummy root node disappeared?");p=_.children[0];let E=p;for(;p&&!p.down&&!p.up;)E=p,p=p.children[0];p=E,p.leftMost=!0,p.rightMost=!0,function e(t){if(c+=1,t.branch=h,c>f&&(f=c),0===t.children.length)l+=1;else for(let n=0;n<t.children.length;n+=1)n>0&&(h+=1),t.children[n].leftMost=!1,t.children[n].rightMost=!1,t.leftMost&&(t.children[n].leftMost=0===n),t.rightMost&&(t.children[n].rightMost=n===t.children.length-1),e(t.children[n]);c-=1}(p),p.branch=0;const M={string:[]};for(let e=0;e<m.length;e+=1)M.string[e]=m[e];M.rules=[];for(let e=0;e<g.length;e+=1)M.rules[e]=g[e].name;M.udts=[];for(let e=0;e<v.length;e+=1)M.udts[e]=v[e].name;let k;return M.id={},M.id.ALT={id:i.ALT,name:"ALT"},M.id.CAT={id:i.CAT,name:"CAT"},M.id.REP={id:i.REP,name:"REP"},M.id.RNM={id:i.RNM,name:"RNM"},M.id.TLS={id:i.TLS,name:"TLS"},M.id.TBS={id:i.TBS,name:"TBS"},M.id.TRG={id:i.TRG,name:"TRG"},M.id.UDT={id:i.UDT,name:"UDT"},M.id.AND={id:i.AND,name:"AND"},M.id.NOT={id:i.NOT,name:"NOT"},M.id.BKR={id:i.BKR,name:"BKR"},M.id.BKA={id:i.BKA,name:"BKA"},M.id.BKN={id:i.BKN,name:"BKN"},M.id.ABG={id:i.ABG,name:"ABG"},M.id.AEN={id:i.AEN,name:"AEN"},M.id.ACTIVE={id:i.ACTIVE,name:"ACTIVE"},M.id.MATCH={id:i.MATCH,name:"MATCH"},M.id.EMPTY={id:i.EMPTY,name:"EMPTY"},M.id.NOMATCH={id:i.NOMATCH,name:"NOMATCH"},M.treeDepth=f,M.leafNodes=l,k=p.down?p.up?"none":"right":p.up?"left":"both",M.branchesIncomplete=k,M.tree=function e(t,n){let r;const i={};if(i.id=t.id,i.branch=t.branch,i.leftMost=t.leftMost,i.rightMost=t.rightMost,r=t.state.name?t.state.name:"ACTIVE",i.state={id:t.state.id,name:r},r=t.op.name?t.op.name:"?",i.op={id:t.op.id,name:r},"string"==typeof t.opData)i.opData=t.opData;else if(Array.isArray(t.opData)){i.opData=[];for(let e=0;e<t.opData.length;e+=1)i.opData[e]=t.opData[e]}else i.opData=void 0;t.phrase?i.phrase={index:t.phrase.index,length:t.phrase.length}:i.phrase=null,i.depth=t.depth,i.children=[];for(let r=0;r<t.children.length;r+=1)t.children.length,i.children[r]=e(t.children[r],n);return i}(p,p.depth),M}();return t?JSON.stringify(n):n},this.toHtmlPage=function(t,n,r){return e.htmlToPage(this.toHtml(t,n),r)},this.indent=function(e){let t="";for(let n=0;n<e;n+=1)t+=".";return t};const k=function(t,n,r,i,o){if(0===i)return"";let s="";const l=o?",":"";switch(t){case a:s=l+e.charsToHex(n,r,i);break;case 10:if(o)return`,${e.charsToDec(n,r,i)}`;s=l+e.charsToDec(n,r,i);break;case 32:s=e.charsToUnicode(n,r,i);break;default:s=e.charsToAsciiHtml(n,r,i)}return s},S=function(e,n,r,o,s,a){let u,c,h,d,f="",p=w;const m=`<span class="${t.CLASS_REMAINDER}">`,g="</span>";let v=!1;switch(r){case i.EMPTY:f+=_;case i.NOMATCH:case i.ACTIVE:u=o,c=0,h=o,d=n.length-h;break;case i.MATCH:u=o,c=s,h=o+c,d=n.length-h;break;default:throw new Error("unrecognized state")}return p=w,c>l?(c=l,p=A,d=0):c+d>l&&(p=A,d=l-c),c>0&&(f+=a,f+=k(e,n,u,c,v),f+=g,v=!0),d>0&&(f+=m,f+=k(e,n,h,d,v),f+=g),f+p};this.toHtml=function(n,c){let h=8;if("string"==typeof n&&n.length>=3){const e=n.toLowerCase().slice(0,3);"hex"===e?h=a:"dec"===e?h=10:"uni"===e&&(h=32)}let d="";return d+=function(e,n){let r;switch(e){case a:r="hexadecimal";break;case 10:r="decimal";break;case 8:r="ASCII";break;case 32:r="UNICODE";break;default:throw new Error(`${o}htmlHeader: unrecognized mode: ${e}`)}let i="";return i+=`<p>display mode: ${r}</p>\n`,i+=`<table class="${t.CLASS_TRACE}">\n`,"string"==typeof n&&(i+=`<caption>${n}</caption>`),i}(h,c),d+=function(n){if(null===g)return"";let o,c,h,d,f,p,y="";return y+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",y+="<th>operator</th><th>phrase</th></tr>\n",r.forEach((r=>{const b=u[r];switch(o=b.thisLine,c=void 0!==b.thatLine?b.thatLine:"--",h=!1,d=!1,f=!1,b.lookAround===i.LOOKAROUND_AHEAD&&(h=!0,f=!0,p=b.lookAnchor),b.opcode.type!==i.AND&&b.opcode.type!==i.NOT||(h=!0,f=!0,p=b.phraseIndex),b.lookAround===i.LOOKAROUND_BEHIND&&(d=!0,f=!0,p=b.lookAnchor),b.opcode.type!==i.BKA&&b.opcode.type!==i.BKN||(d=!0,f=!0,p=b.phraseIndex),y+="<tr>",y+=`<td>${o}</td><td>${c}</td>`,y+=`<td>${b.phraseIndex}</td>`,y+=`<td>${b.phraseLength}</td>`,y+=`<td>${b.depth}</td>`,y+="<td>",b.state){case i.ACTIVE:y+=`<span class="${t.CLASS_ACTIVE}">↓ </span>`;break;case i.MATCH:y+=`<span class="${t.CLASS_MATCH}">↑M</span>`;break;case i.NOMATCH:y+=`<span class="${t.CLASS_NOMATCH}">↑N</span>`;break;case i.EMPTY:y+=`<span class="${t.CLASS_EMPTY}">↑E</span>`;break;default:y+=`<span class="${t.CLASS_ACTIVE}">--</span>`}if(y+="</td>",y+="<td>",y+=s.indent(b.depth),h?y+=`<span class="${t.CLASS_LOOKAHEAD}">`:d&&(y+=`<span class="${t.CLASS_LOOKBEHIND}">`),y+=e.opcodeToString(b.opcode.type),b.opcode.type===i.RNM&&(y+=`(${g[b.opcode.index].name}) `),b.opcode.type===i.BKR){const e=b.opcode.bkrCase===i.BKR_MODE_CI?"%i":"%s",t=b.opcode.bkrMode===i.BKR_MODE_UM?"%u":"%p";y+=`(\\${e}${t}${g[b.opcode.index].name}) `}b.opcode.type===i.UDT&&(y+=`(${v[b.opcode.index].name}) `),b.opcode.type===i.TRG&&(y+=`(${function(e,t){let n="";if(t.type===i.TRG)if(e===a||32===e){let r=t.min.toString(16).toUpperCase();r.length%2!=0&&(r=`0${r}`),n+=e===a?"%x":"U+",n+=r,r=t.max.toString(16).toUpperCase(),r.length%2!=0&&(r=`0${r}`),n+=`–${r}`}else n=`%d${t.min.toString(10)}–${t.max.toString(10)}`;return n}(n,b.opcode)}) `),b.opcode.type===i.TBS&&(y+=`(${function(e,t){let n="";if(t.type===i.TBS){const r=Math.min(t.string.length,10);if(e===a||32===e){n+=e===a?"%x":"U+";for(let e=0;e<r;e+=1){let r;e>0&&(n+="."),r=t.string[e].toString(16).toUpperCase(),r.length%2!=0&&(r=`0${r}`),n+=r}}else{n="%d";for(let e=0;e<r;e+=1)e>0&&(n+="."),n+=t.string[e].toString(10)}r<t.string.length&&(n+=A)}return n}(n,b.opcode)}) `),b.opcode.type===i.TLS&&(y+=`(${function(t,n){let r="";if(n.type===i.TLS){const i=Math.min(n.string.length,5);if(t===a||10===t){let e,o,s;t===a?(r="%x",s=16):(r="%d",s=10);for(let t=0;t<i;t+=1)t>0&&(r+="."),o=n.string[t],o>=97&&o<=122?(e=o-32,r+=`${e.toString(s)}/${o.toString(s)}`.toUpperCase()):o>=65&&o<=90?(e=o,o+=32,r+=`${e.toString(s)}/${o.toString(s)}`.toUpperCase()):r+=o.toString(s).toUpperCase();i<n.string.length&&(r+=A)}else{r='"';for(let t=0;t<i;t+=1)r+=e.asciiChars[n.string[t]];i<n.string.length&&(r+=A),r+='"'}}return r}(n,b.opcode)}) `),b.opcode.type===i.REP&&(y+=`(${function(e,t){let n="";if(t.type===i.REP)if(e===a){let e=t.min.toString(16).toUpperCase();e.length%2!=0&&(e=`0${e}`),n=`x${e}`,t.max<1/0?(e=t.max.toString(16).toUpperCase(),e.length%2!=0&&(e=`0${e}`)):e="inf",n+=`–${e}`}else n=t.max<1/0?`${t.min.toString(10)}–${t.max.toString(10)}`:`${t.min.toString(10)}–inf`;return n}(n,b.opcode)}) `),f&&(y+="</span>"),y+="</td>",y+="<td>",y+=d?function(e,n,r,o,s,a){let u,c,h,d,f="",p=w;const m=`<span class="${t.CLASS_LOOKBEHIND}">`,g=`<span class="${t.CLASS_REMAINDER}">`,v="</span>";let y=!1;switch(r){case i.EMPTY:f+=_;case i.NOMATCH:case i.MATCH:case i.ACTIVE:u=o-s,c=a-u,h=a,d=n.length-h;break;default:throw new Error("unrecognized state")}return p=w,c>l?(c=l,p=A,d=0):c+d>l&&(p=A,d=l-c),c>0&&(f+=m,f+=k(e,n,u,c,y),f+=v,y=!0),d>0&&(f+=g,f+=k(e,n,h,d,y),f+=v),f+p}(n,m,b.state,b.phraseIndex,b.phraseLength,p):h?function(e,n,r,i,o){const s=`<span class="${t.CLASS_LOOKAHEAD}">`;return S(e,n,r,i,o,s)}(n,m,b.state,b.phraseIndex,b.phraseLength):function(e,n,r,i,o){const s=`<span class="${t.CLASS_MATCH}">`;return S(e,n,r,i,o,s)}(n,m,b.state,b.phraseIndex,b.phraseLength),y+="</td></tr>\n"})),y+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",y+="<th>operator</th><th>phrase</th></tr>\n",y+="</table>\n",y}(h),d+=function(){let e="";return e+="</table>\n",e+=`<p class="${t.CLASS_MONOSPACE}">legend:<br>\n`,e+="(a) - line number<br>\n",e+="(b) - matching line number<br>\n",e+="(c) - phrase offset<br>\n",e+="(d) - phrase length<br>\n",e+="(e) - tree depth<br>\n",e+="(f) - operator state<br>\n",e+=` - <span class="${t.CLASS_ACTIVE}">↓</span> phrase opened<br>\n`,e+=` - <span class="${t.CLASS_MATCH}">↑M</span> phrase matched<br>\n`,e+=` - <span class="${t.CLASS_EMPTY}">↑E</span> empty phrase matched<br>\n`,e+=` - <span class="${t.CLASS_NOMATCH}">↑N</span> phrase not matched<br>\n`,e+="operator - ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>†</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>‡</sup><br>\n",e+="phrase - up to 80 characters of the phrase being matched<br>\n",e+=` - <span class="${t.CLASS_MATCH}">matched characters</span><br>\n`,e+=` - <span class="${t.CLASS_LOOKAHEAD}">matched characters in look ahead mode</span><br>\n`,e+=` - <span class="${t.CLASS_LOOKBEHIND}">matched characters in look behind mode</span><br>\n`,e+=` - <span class="${t.CLASS_REMAINDER}">remainder characters(not yet examined by parser)</span><br>\n`,e+=` - <span class="${t.CLASS_CTRLCHAR}">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br>\n`,e+=` - ${_} empty string<br>\n`,e+=` - ${w} end of input string<br>\n`,e+=` - ${A} input string display truncated<br>\n`,e+="</p>\n",e+=`<p class="${t.CLASS_MONOSPACE}">\n`,e+="<sup>†</sup>original ABNF operators:<br>\n",e+="ALT - alternation<br>\n",e+="CAT - concatenation<br>\n",e+="REP - repetition<br>\n",e+="RNM - rule name<br>\n",e+="TRG - terminal range<br>\n",e+="TLS - terminal literal string (case insensitive)<br>\n",e+="TBS - terminal binary string (case sensitive)<br>\n",e+="<br>\n",e+="<sup>‡</sup>super set SABNF operators:<br>\n",e+="UDT - user-defined terminal<br>\n",e+="AND - positive look ahead<br>\n",e+="NOT - negative look ahead<br>\n",e+="BKA - positive look behind<br>\n",e+="BKN - negative look behind<br>\n",e+="BKR - back reference<br>\n",e+="ABG - anchor - begin of input string<br>\n",e+="AEN - anchor - end of input string<br>\n",e+="</p>\n",e}(),d}}},8544:function(e,t,n){const r=n(3932),i=n(979),o=n(1593),s=n(8276),a="utilities.js: ",l=this,u=function(e,t,n){let r,i=t;for(;;){if(e<=0){i=0,r=0;break}if("number"!=typeof i){i=0,r=e;break}if(i>=e){i=e,r=e;break}if("number"!=typeof n){r=e;break}if(r=i+n,r>e){r=e;break}break}return{beg:i,end:r}};t.htmlToPage=function(e,t){let n;if("string"!=typeof e)throw new Error(`${a}htmlToPage: input HTML is not a string`);n="string"!=typeof t?"htmlToPage":t;let r="";return r+="<!DOCTYPE html>\n",r+='<html lang="en">\n',r+="<head>\n",r+='<meta charset="utf-8">\n',r+=`<title>${n}</title>\n`,r+="<style>\n",r+=o(),r+="</style>\n",r+="</head>\n<body>\n",r+=`<p>${new Date}</p>\n`,r+=e,r+="</body>\n</html>\n",r},t.parserResultToHtml=function(e,t){let n,i,o=null;"string"==typeof t&&""!==t&&(o=t),n=!0===e.success?`<span class="${r.CLASS_MATCH}">true</span>`:`<span class="${r.CLASS_NOMATCH}">false</span>`,i=e.state===s.EMPTY?`<span class="${r.CLASS_EMPTY}">EMPTY</span>`:e.state===s.MATCH?`<span class="${r.CLASS_MATCH}">MATCH</span>`:e.state===s.NOMATCH?`<span class="${r.CLASS_NOMATCH}">NOMATCH</span>`:`<span class="${r.CLASS_NOMATCH}">unrecognized</span>`;let a="";return a+=`<table class="${r.CLASS_STATE}">\n`,o&&(a+=`<caption>${o}</caption>\n`),a+="<tr><th>state item</th><th>value</th><th>description</th></tr>\n",a+=`<tr><td>parser success</td><td>${n}</td>\n`,a+=`<td><span class="${r.CLASS_MATCH}">true</span> if the parse succeeded,\n`,a+=` <span class="${r.CLASS_NOMATCH}">false</span> otherwise`,a+="<br><i>NOTE: for success, entire string must be matched</i></td></tr>\n",a+=`<tr><td>parser state</td><td>${i}</td>\n`,a+=`<td><span class="${r.CLASS_EMPTY}">EMPTY</span>, `,a+=`<span class="${r.CLASS_MATCH}">MATCH</span> or \n`,a+=`<span class="${r.CLASS_NOMATCH}">NOMATCH</span></td></tr>\n`,a+=`<tr><td>string length</td><td>${e.length}</td><td>length of the input (sub)string</td></tr>\n`,a+=`<tr><td>matched length</td><td>${e.matched}</td><td>number of input string characters matched</td></tr>\n`,a+=`<tr><td>max matched</td><td>${e.maxMatched}</td><td>maximum number of input string characters matched</td></tr>\n`,a+=`<tr><td>max tree depth</td><td>${e.maxTreeDepth}</td><td>maximum depth of the parse tree reached</td></tr>\n`,a+=`<tr><td>node hits</td><td>${e.nodeHits}</td><td>number of parse tree node hits (opcode function calls)</td></tr>\n`,a+=`<tr><td>input length</td><td>${e.inputLength}</td><td>length of full input string</td></tr>\n`,a+=`<tr><td>sub-string begin</td><td>${e.subBegin}</td><td>sub-string first character index</td></tr>\n`,a+=`<tr><td>sub-string end</td><td>${e.subEnd}</td><td>sub-string end-of-string index</td></tr>\n`,a+=`<tr><td>sub-string length</td><td>${e.subLength}</td><td>sub-string length</td></tr>\n`,a+="</table>\n",a},t.charsToString=function(e,t,n){let r,o;if("number"==typeof t){if(t>=e.length)return"";r=t<0?0:t}else r=0;if("number"==typeof n){if(n<=0)return"";o=n>e.length-r?e.length:r+n}else o=e.length;return r<o?i.encode("UTF16LE",e.slice(r,o)).toString("utf16le"):""},t.stringToChars=function(e){return i.decode("STRING",e)},t.opcodeToString=function(e){let t="unknown";switch(e){case s.ALT:t="ALT";break;case s.CAT:t="CAT";break;case s.RNM:t="RNM";break;case s.UDT:t="UDT";break;case s.AND:t="AND";break;case s.NOT:t="NOT";break;case s.REP:t="REP";break;case s.TRG:t="TRG";break;case s.TBS:t="TBS";break;case s.TLS:t="TLS";break;case s.BKR:t="BKR";break;case s.BKA:t="BKA";break;case s.BKN:t="BKN";break;case s.ABG:t="ABG";break;case s.AEN:t="AEN";break;default:throw new Error("unrecognized opcode")}return t},t.stateToString=function(e){let t="unknown";switch(e){case s.ACTIVE:t="ACTIVE";break;case s.MATCH:t="MATCH";break;case s.EMPTY:t="EMPTY";break;case s.NOMATCH:t="NOMATCH";break;default:throw new Error("unrecognized state")}return t},t.asciiChars=["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","SO","SI","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US"," ","!",""","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","DEL"],t.charToHex=function(e){let t=e.toString(16).toUpperCase();switch(t.length){case 1:case 3:case 7:t=`0${t}`;break;case 2:case 6:t=`00${t}`;break;case 4:break;case 5:t=`000${t}`;break;default:throw new Error("unrecognized option")}return t},t.charsToDec=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToDec: input must be an array of integers`);const i=u(e.length,t,n);if(i.end>i.beg){r+=e[i.beg];for(let t=i.beg+1;t<i.end;t+=1)r+=`,${e[t]}`}return r},t.charsToHex=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToHex: input must be an array of integers`);const i=u(e.length,t,n);if(i.end>i.beg){r+=`\\x${l.charToHex(e[i.beg])}`;for(let t=i.beg+1;t<i.end;t+=1)r+=`,\\x${l.charToHex(e[t])}`}return r},t.charsToHtmlEntities=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToHex: input must be an array of integers`);const i=u(e.length,t,n);if(i.end>i.beg)for(let t=i.beg;t<i.end;t+=1)r+=`&#x${e[t].toString(16)};`;return r},t.charsToUnicode=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToUnicode: input must be an array of integers`);const i=u(e.length,t,n);if(i.end>i.beg)for(let t=i.beg;t<i.end;t+=1)r+=(o=e[t])>=55296&&o<=57343||o>1114111?` U+${l.charToHex(e[t])}`:`&#${e[t]};`;var o;return r},t.charsToJsUnicode=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToJsUnicode: input must be an array of integers`);const i=u(e.length,t,n);if(i.end>i.beg){r+=`\\u${l.charToHex(e[i.beg])}`;for(let t=i.beg+1;t<i.end;t+=1)r+=`,\\u${l.charToHex(e[t])}`}return r},t.charsToAscii=function(e,t,n){let r="";if(!Array.isArray(e))throw new Error(`${a}charsToAscii: input must be an array of integers`);const i=u(e.length,t,n);for(let t=i.beg;t<i.end;t+=1){const n=e[t];r+=n>=32&&n<=126?String.fromCharCode(n):`\\x${l.charToHex(n)}`}return r},t.charsToAsciiHtml=function(e,t,n){if(!Array.isArray(e))throw new Error(`${a}charsToAsciiHtml: input must be an array of integers`);let i,o="";const s=u(e.length,t,n);for(let t=s.beg;t<s.end;t+=1)i=e[t],o+=i<32||127===i?`<span class="${r.CLASS_CTRLCHAR}">${l.asciiChars[i]}</span>`:i>127?`<span class="${r.CLASS_CTRLCHAR}">U+${l.charToHex(i)}</span>`:l.asciiChars[i];return o},t.stringToAsciiHtml=function(e){const t=i.decode("STRING",e);return this.charsToAsciiHtml(t)}},2882:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={},r=0;r<32;r++){var i=t.charAt(r);if(void 0!==n[i])throw new TypeError(i+" is ambiguous");n[i]=r}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){for(var t=1,n=0;n<e.length;++n){var r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=o(t)^r>>5}for(t=o(t),n=0;n<e.length;++n){var i=e.charCodeAt(n);t=o(t)^31&i}return t}function a(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),i=e.toUpperCase();if(e!==r&&e!==i)return"Mixed-case string "+e;var a=(e=r).lastIndexOf("1");if(-1===a)return"No separator character for "+e;if(0===a)return"Missing prefix for "+e;var l=e.slice(0,a),u=e.slice(a+1);if(u.length<6)return"Data too short";var c=s(l);if("string"==typeof c)return c;for(var h=[],d=0;d<u.length;++d){var f=u.charAt(d),p=n[f];if(void 0===p)return"Unknown character "+f;c=o(c)^p,d+6>=u.length||h.push(p)}return 1!==c?"Invalid checksum for "+e:{prefix:l,words:h}}function l(e,t,n,r){for(var i=0,o=0,s=(1<<n)-1,a=[],l=0;l<e.length;++l)for(i=i<<t|e[l],o+=t;o>=n;)o-=n,a.push(i>>o&s);if(r)o>0&&a.push(i<<n-o&s);else{if(o>=t)return"Excess padding";if(i<<n-o&s)return"Non-zero padding"}return a}e.exports={decodeUnsafe:function(){var e=a.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=a.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,n,r){if(r=r||90,e.length+7+n.length>r)throw new TypeError("Exceeds length limit");var i=s(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var a=e+"1",l=0;l<n.length;++l){var u=n[l];if(u>>5!=0)throw new Error("Non 5-bit word");i=o(i)^u,a+=t.charAt(u)}for(l=0;l<6;++l)i=o(i);for(i^=1,l=0;l<6;++l)a+=t.charAt(i>>5*(5-l)&31);return a},toWordsUnsafe:function(e){var t=l(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=l(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=l(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=l(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},5205:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(7801).Buffer}catch(e){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function l(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function u(e,t,n,i){for(var o=0,s=0,a=Math.min(e.length,n),l=t;l<a;l++){var u=e.charCodeAt(l)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s<i,"Invalid character"),o+=s}return o}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=l(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=l(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var h=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)h*=t;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){c(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,l=s/67108864|0;n.words[0]=a;for(var u=1;u<r;u++){for(var c=l>>>26,h=67108863&l,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var p=u-f|0;c+=(s=(i=0|e.words[p])*(o=0|t.words[f])+h)/67108864|0,h=67108863&s}n.words[u]=0|h,l=0|c}return 0!==l?n.words[u]=0|l:n.length--,n._strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],l=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),n=0!==o||s!==this.length-1?d[6-l.length]+l+n:l+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=p[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(c).toString(e);n=(h=h.idivn(c)).isZero()?m+n:d[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===o?(n<e.length&&(e[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===o?(n>=0&&(e[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,o,s=e.words,a=t.words,l=n.words,u=0,c=0|s[0],h=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,y=g>>>13,b=0|s[3],w=8191&b,A=b>>>13,_=0|s[4],E=8191&_,M=_>>>13,k=0|s[5],S=8191&k,x=k>>>13,C=0|s[6],T=8191&C,O=C>>>13,R=0|s[7],P=8191&R,N=R>>>13,L=0|s[8],I=8191&L,B=L>>>13,D=0|s[9],j=8191&D,F=D>>>13,U=0|a[0],q=8191&U,z=U>>>13,H=0|a[1],K=8191&H,V=H>>>13,W=0|a[2],$=8191&W,Y=W>>>13,G=0|a[3],Z=8191&G,Q=G>>>13,J=0|a[4],X=8191&J,ee=J>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],le=8191&ae,ue=ae>>>13,ce=0|a[8],he=8191&ce,de=ce>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(u+(r=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(d,q)|0))<<13)|0;u=((o=Math.imul(d,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(m,q)|0,o=Math.imul(m,z);var ve=(u+(r=r+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,V)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,z))+Math.imul(y,q)|0,o=Math.imul(y,z),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var ye=(u+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(d,$)|0))<<13)|0;u=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,q),i=(i=Math.imul(w,z))+Math.imul(A,q)|0,o=Math.imul(A,z),r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(d,Z)|0))<<13)|0;u=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,q),i=(i=Math.imul(E,z))+Math.imul(M,q)|0,o=Math.imul(M,z),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Q)|0;var we=(u+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(x,q)|0,o=Math.imul(x,z),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,Q)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var Ae=(u+(r=r+Math.imul(h,ne)|0)|0)+((8191&(i=(i=i+Math.imul(h,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(T,q),i=(i=Math.imul(T,z))+Math.imul(O,q)|0,o=Math.imul(O,z),r=r+Math.imul(S,K)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,Q)|0,r=r+Math.imul(v,X)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,q),i=(i=Math.imul(P,z))+Math.imul(N,q)|0,o=Math.imul(N,z),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(u+(r=r+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,z))+Math.imul(B,q)|0,o=Math.imul(B,z),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,V)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,ue)|0;var Me=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,de)|0)+Math.imul(d,he)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,z))+Math.imul(F,q)|0,o=Math.imul(F,z),r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Q)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,r=r+Math.imul(v,le)|0,i=(i=i+Math.imul(v,ue)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,he)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,de)|0;var ke=(u+(r=r+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,K),i=(i=Math.imul(j,V))+Math.imul(F,K)|0,o=Math.imul(F,V),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,Y)|0,r=r+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,Q)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(S,ne)|0,i=(i=i+Math.imul(S,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,ue)|0,r=r+Math.imul(v,he)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(y,he)|0,o=o+Math.imul(y,de)|0;var Se=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,Y))+Math.imul(F,$)|0,o=Math.imul(F,Y),r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,Q)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,ue)|0,r=r+Math.imul(w,he)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,de)|0;var xe=(u+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,Z),i=(i=Math.imul(j,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,r=r+Math.imul(S,le)|0,i=(i=i+Math.imul(S,ue)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,ue)|0,r=r+Math.imul(E,he)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(M,he)|0,o=o+Math.imul(M,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(A,pe)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(F,X)|0,o=Math.imul(F,ee),r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(B,ne)|0,o=o+Math.imul(B,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(S,he)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,de)|0;var Te=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(M,pe)|0))<<13)|0;u=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,he)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,he)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,me)|0)+Math.imul(x,pe)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),r=r+Math.imul(I,le)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,ue)|0,r=r+Math.imul(P,he)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,de)|0;var Re=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,le),i=(i=Math.imul(j,ue))+Math.imul(F,le)|0,o=Math.imul(F,ue),r=r+Math.imul(I,he)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(B,he)|0,o=o+Math.imul(B,de)|0;var Pe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,he),i=(i=Math.imul(j,de))+Math.imul(F,he)|0,o=Math.imul(F,de);var Ne=(u+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Le=(u+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=we,l[5]=Ae,l[6]=_e,l[7]=Ee,l[8]=Me,l[9]=ke,l[10]=Se,l[11]=xe,l[12]=Ce,l[13]=Te,l[14]=Oe,l[15]=Re,l[16]=Pe,l[17]=Ne,l[18]=Le,0!==u&&(l[19]=u,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,l=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=l;u++){var c=o-u,h=(0|e.words[c])*(0|t.words[u]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(e,t,n){return v(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):y(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},b.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,l=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=l,d=u,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],y=h*g-d*v;v=h*v+d*g,g=y,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(y=l*h-u*d,d=l*d+u*h,h=y)}},b.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),l=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,o,a,l,r,i),this.transform(u,o,c,h,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-l[f]*h[f];l[f]=a[f]*h[f]+l[f]*c[f],a[f]=p}return this.conjugate(a,l,r),this.transform(a,l,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,l=(0|this.words[t])-a<<n;this.words[t]=l|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,l=n;if(i-=s,i=Math.max(0,i),l){for(var u=0;u<s;u++)l.words[u]=this.words[u];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&a}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,s=e.length+n;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+a;var l=(0|e.words[i])*t;a=((o-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==t){(a=new o(null)).length=l+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var c=r.clone()._ishlnsubmul(i,1,l);0===c.negative&&(r=c,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),l=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;0==(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(c),l.isub(h)),a.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(l)):(n.isub(t),a.isub(i),l.isub(s))}return{a,b:l,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(_,A),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(E,A),i(M,A),i(k,A),k.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new M;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return w[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),l=a.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),f=f.redMul(h),p=g}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,a=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],c=l-1;c>=0;c--){var h=u>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}l=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},3413:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Accordion:()=>l,Carousel:()=>y,Collapse:()=>f,Dial:()=>vt,Dismiss:()=>E,Drawer:()=>Ge,Dropdown:()=>De,Modal:()=>He,Popover:()=>dt,Tabs:()=>et,Tooltip:()=>st,initAccordions:()=>a,initCarousels:()=>v,initCollapses:()=>d,initDials:()=>gt,initDismisses:()=>_,initDrawers:()=>Ye,initDropdowns:()=>Be,initFlowbite:()=>yt,initModals:()=>ze,initPopovers:()=>ht,initTabs:()=>Xe,initTooltips:()=>ot});const r=function(){function e(e,t){void 0===t&&(t=[]),this._eventType=e,this._eventFunctions=t}return e.prototype.init=function(){var e=this;this._eventFunctions.forEach((function(t){"undefined"!=typeof window&&window.addEventListener(e._eventType,t)}))},e}();var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o={alwaysOpen:!1,activeClasses:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",inactiveClasses:"text-gray-500 dark:text-gray-400",onOpen:function(){},onClose:function(){},onToggle:function(){}},s=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=o),this._items=e,this._options=i(i({},o),t),this._init()}return e.prototype._init=function(){var e=this;this._items.length&&this._items.map((function(t){t.active&&e.open(t.id),t.triggerEl.addEventListener("click",(function(){e.toggle(t.id)}))}))},e.prototype.getItem=function(e){return this._items.filter((function(t){return t.id===e}))[0]},e.prototype.open=function(e){var t,n,r=this,i=this.getItem(e);this._options.alwaysOpen||this._items.map((function(e){var t,n;e!==i&&((t=e.triggerEl.classList).remove.apply(t,r._options.activeClasses.split(" ")),(n=e.triggerEl.classList).add.apply(n,r._options.inactiveClasses.split(" ")),e.targetEl.classList.add("hidden"),e.triggerEl.setAttribute("aria-expanded","false"),e.active=!1,e.iconEl&&e.iconEl.classList.remove("rotate-180"))})),(t=i.triggerEl.classList).add.apply(t,this._options.activeClasses.split(" ")),(n=i.triggerEl.classList).remove.apply(n,this._options.inactiveClasses.split(" ")),i.triggerEl.setAttribute("aria-expanded","true"),i.targetEl.classList.remove("hidden"),i.active=!0,i.iconEl&&i.iconEl.classList.add("rotate-180"),this._options.onOpen(this,i)},e.prototype.toggle=function(e){var t=this.getItem(e);t.active?this.close(e):this.open(e),this._options.onToggle(this,t)},e.prototype.close=function(e){var t,n,r=this.getItem(e);(t=r.triggerEl.classList).remove.apply(t,this._options.activeClasses.split(" ")),(n=r.triggerEl.classList).add.apply(n,this._options.inactiveClasses.split(" ")),r.targetEl.classList.add("hidden"),r.triggerEl.setAttribute("aria-expanded","false"),r.active=!1,r.iconEl&&r.iconEl.classList.remove("rotate-180"),this._options.onClose(this,r)},e}();function a(){document.querySelectorAll("[data-accordion]").forEach((function(e){var t=e.getAttribute("data-accordion"),n=e.getAttribute("data-active-classes"),r=e.getAttribute("data-inactive-classes"),i=[];e.querySelectorAll("[data-accordion-target]").forEach((function(e){var t={id:e.getAttribute("data-accordion-target"),triggerEl:e,targetEl:document.querySelector(e.getAttribute("data-accordion-target")),iconEl:e.querySelector("[data-accordion-icon]"),active:"true"===e.getAttribute("aria-expanded")};i.push(t)})),new s(i,{alwaysOpen:"open"===t,activeClasses:n||o.activeClasses,inactiveClasses:r||o.inactiveClasses})}))}"undefined"!=typeof window&&(window.Accordion=s);const l=s;var u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},c={onCollapse:function(){},onExpand:function(){},onToggle:function(){}},h=function(){function e(e,t,n){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=c),this._targetEl=e,this._triggerEl=t,this._options=u(u({},c),n),this._visible=!1,this._init()}return e.prototype._init=function(){var e=this;this._triggerEl&&(this._triggerEl.hasAttribute("aria-expanded")?this._visible="true"===this._triggerEl.getAttribute("aria-expanded"):this._visible=!this._targetEl.classList.contains("hidden"),this._triggerEl.addEventListener("click",(function(){e.toggle()})))},e.prototype.collapse=function(){this._targetEl.classList.add("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","false"),this._visible=!1,this._options.onCollapse(this)},e.prototype.expand=function(){this._targetEl.classList.remove("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","true"),this._visible=!0,this._options.onExpand(this)},e.prototype.toggle=function(){this._visible?this.collapse():this.expand(),this._options.onToggle(this)},e}();function d(){document.querySelectorAll("[data-collapse-toggle]").forEach((function(e){var t=e.getAttribute("data-collapse-toggle"),n=document.getElementById(t);n?new h(n,e):console.error('The target element with id "'.concat(t,'" does not exist. Please check the data-collapse-toggle attribute.'))}))}"undefined"!=typeof window&&(window.Collapse=h);const f=h;var p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},p.apply(this,arguments)},m={defaultPosition:0,indicators:{items:[],activeClasses:"bg-white dark:bg-gray-800",inactiveClasses:"bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800"},interval:3e3,onNext:function(){},onPrev:function(){},onChange:function(){}},g=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=m),this._items=e,this._options=p(p(p({},m),t),{indicators:p(p({},m.indicators),t.indicators)}),this._activeItem=this.getItem(this._options.defaultPosition),this._indicators=this._options.indicators.items,this._intervalDuration=this._options.interval,this._intervalInstance=null,this._init()}return e.prototype._init=function(){var e=this;this._items.map((function(e){e.el.classList.add("absolute","inset-0","transition-transform","transform")})),this._getActiveItem()?this.slideTo(this._getActiveItem().position):this.slideTo(0),this._indicators.map((function(t,n){t.el.addEventListener("click",(function(){e.slideTo(n)}))}))},e.prototype.getItem=function(e){return this._items[e]},e.prototype.slideTo=function(e){var t=this._items[e],n={left:0===t.position?this._items[this._items.length-1]:this._items[t.position-1],middle:t,right:t.position===this._items.length-1?this._items[0]:this._items[t.position+1]};this._rotate(n),this._setActiveItem(t),this._intervalInstance&&(this.pause(),this.cycle()),this._options.onChange(this)},e.prototype.next=function(){var e,t=this._getActiveItem();e=t.position===this._items.length-1?this._items[0]:this._items[t.position+1],this.slideTo(e.position),this._options.onNext(this)},e.prototype.prev=function(){var e,t=this._getActiveItem();e=0===t.position?this._items[this._items.length-1]:this._items[t.position-1],this.slideTo(e.position),this._options.onPrev(this)},e.prototype._rotate=function(e){this._items.map((function(e){e.el.classList.add("hidden")})),e.left.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-20"),e.left.el.classList.add("-translate-x-full","z-10"),e.middle.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-10"),e.middle.el.classList.add("translate-x-0","z-20"),e.right.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-20"),e.right.el.classList.add("translate-x-full","z-10")},e.prototype.cycle=function(){var e=this;"undefined"!=typeof window&&(this._intervalInstance=window.setInterval((function(){e.next()}),this._intervalDuration))},e.prototype.pause=function(){clearInterval(this._intervalInstance)},e.prototype._getActiveItem=function(){return this._activeItem},e.prototype._setActiveItem=function(e){var t,n,r=this;this._activeItem=e;var i=e.position;this._indicators.length&&(this._indicators.map((function(e){var t,n;e.el.setAttribute("aria-current","false"),(t=e.el.classList).remove.apply(t,r._options.indicators.activeClasses.split(" ")),(n=e.el.classList).add.apply(n,r._options.indicators.inactiveClasses.split(" "))})),(t=this._indicators[i].el.classList).add.apply(t,this._options.indicators.activeClasses.split(" ")),(n=this._indicators[i].el.classList).remove.apply(n,this._options.indicators.inactiveClasses.split(" ")),this._indicators[i].el.setAttribute("aria-current","true"))},e}();function v(){document.querySelectorAll("[data-carousel]").forEach((function(e){var t=e.getAttribute("data-carousel-interval"),n="slide"===e.getAttribute("data-carousel"),r=[],i=0;e.querySelectorAll("[data-carousel-item]").length&&Array.from(e.querySelectorAll("[data-carousel-item]")).map((function(e,t){r.push({position:t,el:e}),"active"===e.getAttribute("data-carousel-item")&&(i=t)}));var o=[];e.querySelectorAll("[data-carousel-slide-to]").length&&Array.from(e.querySelectorAll("[data-carousel-slide-to]")).map((function(e){o.push({position:parseInt(e.getAttribute("data-carousel-slide-to")),el:e})}));var s=new g(r,{defaultPosition:i,indicators:{items:o},interval:t||m.interval});n&&s.cycle();var a=e.querySelector("[data-carousel-next]"),l=e.querySelector("[data-carousel-prev]");a&&a.addEventListener("click",(function(){s.next()})),l&&l.addEventListener("click",(function(){s.prev()}))}))}"undefined"!=typeof window&&(window.Carousel=g);const y=g;var b=function(){return b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},b.apply(this,arguments)},w={transition:"transition-opacity",duration:300,timing:"ease-out",onHide:function(){}},A=function(){function e(e,t,n){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=w),this._targetEl=e,this._triggerEl=t,this._options=b(b({},w),n),this._init()}return e.prototype._init=function(){var e=this;this._triggerEl&&this._triggerEl.addEventListener("click",(function(){e.hide()}))},e.prototype.hide=function(){var e=this;this._targetEl.classList.add(this._options.transition,"duration-".concat(this._options.duration),this._options.timing,"opacity-0"),setTimeout((function(){e._targetEl.classList.add("hidden")}),this._options.duration),this._options.onHide(this,this._targetEl)},e}();function _(){document.querySelectorAll("[data-dismiss-target]").forEach((function(e){var t=e.getAttribute("data-dismiss-target"),n=document.querySelector(t);n?new A(n,e):console.error('The dismiss element with id "'.concat(t,'" does not exist. Please check the data-dismiss-target attribute.'))}))}"undefined"!=typeof window&&(window.Dismiss=A);const E=A;function M(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function k(e){return e instanceof M(e).Element||e instanceof Element}function S(e){return e instanceof M(e).HTMLElement||e instanceof HTMLElement}function x(e){return"undefined"!=typeof ShadowRoot&&(e instanceof M(e).ShadowRoot||e instanceof ShadowRoot)}var C=Math.max,T=Math.min,O=Math.round;function R(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function P(){return!/^((?!chrome|android).)*safari/i.test(R())}function N(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&S(e)&&(i=e.offsetWidth>0&&O(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&O(r.height)/e.offsetHeight||1);var s=(k(e)?M(e):window).visualViewport,a=!P()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,u=(r.top+(a&&s?s.offsetTop:0))/o,c=r.width/i,h=r.height/o;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l,x:l,y:u}}function L(e){var t=M(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function I(e){return e?(e.nodeName||"").toLowerCase():null}function B(e){return((k(e)?e.ownerDocument:e.document)||window.document).documentElement}function D(e){return N(B(e)).left+L(e).scrollLeft}function j(e){return M(e).getComputedStyle(e)}function F(e){var t=j(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function U(e,t,n){void 0===n&&(n=!1);var r,i,o=S(t),s=S(t)&&function(e){var t=e.getBoundingClientRect(),n=O(t.width)/e.offsetWidth||1,r=O(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=B(t),l=N(e,s,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==I(t)||F(a))&&(u=(r=t)!==M(r)&&S(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:L(r)),S(t)?((c=N(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=D(a))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function q(e){var t=N(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function z(e){return"html"===I(e)?e:e.assignedSlot||e.parentNode||(x(e)?e.host:null)||B(e)}function H(e){return["html","body","#document"].indexOf(I(e))>=0?e.ownerDocument.body:S(e)&&F(e)?e:H(z(e))}function K(e,t){var n;void 0===t&&(t=[]);var r=H(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=M(r),s=i?[o].concat(o.visualViewport||[],F(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(K(z(s)))}function V(e){return["table","td","th"].indexOf(I(e))>=0}function W(e){return S(e)&&"fixed"!==j(e).position?e.offsetParent:null}function $(e){for(var t=M(e),n=W(e);n&&V(n)&&"static"===j(n).position;)n=W(n);return n&&("html"===I(n)||"body"===I(n)&&"static"===j(n).position)?t:n||function(e){var t=/firefox/i.test(R());if(/Trident/i.test(R())&&S(e)&&"fixed"===j(e).position)return null;var n=z(e);for(x(n)&&(n=n.host);S(n)&&["html","body"].indexOf(I(n))<0;){var r=j(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Y="top",G="bottom",Z="right",Q="left",J="auto",X=[Y,G,Z,Q],ee="start",te="end",ne="viewport",re="popper",ie=X.reduce((function(e,t){return e.concat([t+"-"+ee,t+"-"+te])}),[]),oe=[].concat(X,[J]).reduce((function(e,t){return e.concat([t,t+"-"+ee,t+"-"+te])}),[]),se=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ae(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var le={placement:"bottom",modifiers:[],strategy:"absolute"};function ue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ce(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?le:i;return function(e,t,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},le,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;h(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:k(e)?K(e):e.contextElement?K(e.contextElement):[],popper:K(t)};var s,u,d=function(e){var t=ae(e);return se.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),u=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return a.orderedModifiers=d.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:a,name:t,instance:c,options:r});l.push(o||function(){})}})),c.update()},forceUpdate:function(){if(!u){var e=a.elements,t=e.reference,n=e.popper;if(ue(t,n)){a.rects={reference:U(t,$(n),"fixed"===a.options.strategy),popper:q(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,l=void 0===s?{}:s,h=i.name;"function"==typeof o&&(a=o({state:a,options:l,name:h,instance:c})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){c.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){h(),u=!0}};if(!ue(e,t))return c;function h(){l.forEach((function(e){return e()})),l=[]}return c.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var he={passive:!0};function de(e){return e.split("-")[0]}function fe(e){return e.split("-")[1]}function pe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function me(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?de(i):null,s=i?fe(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Y:t={x:a,y:n.y-r.height};break;case G:t={x:a,y:n.y+n.height};break;case Z:t={x:n.x+n.width,y:l};break;case Q:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=o?pe(o):null;if(null!=u){var c="y"===u?"height":"width";switch(s){case ee:t[u]=t[u]-(n[c]/2-r[c]/2);break;case te:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ge={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ve(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,h=e.isFixed,d=s.x,f=void 0===d?0:d,p=s.y,m=void 0===p?0:p,g="function"==typeof c?c({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Q,w=Y,A=window;if(u){var _=$(n),E="clientHeight",k="clientWidth";_===M(n)&&"static"!==j(_=B(n)).position&&"absolute"===a&&(E="scrollHeight",k="scrollWidth"),(i===Y||(i===Q||i===Z)&&o===te)&&(w=G,m-=(h&&_===A&&A.visualViewport?A.visualViewport.height:_[E])-r.height,m*=l?1:-1),i!==Q&&(i!==Y&&i!==G||o!==te)||(b=Z,f-=(h&&_===A&&A.visualViewport?A.visualViewport.width:_[k])-r.width,f*=l?1:-1)}var S,x=Object.assign({position:a},u&&ge),C=!0===c?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:O(n*i)/i||0,y:O(r*i)/i||0}}({x:f,y:m},M(n)):{x:f,y:m};return f=C.x,m=C.y,l?Object.assign({},x,((S={})[w]=y?"0":"",S[b]=v?"0":"",S.transform=(A.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",S)):Object.assign({},x,((t={})[w]=y?m+"px":"",t[b]=v?f+"px":"",t.transform="",t))}var ye={left:"right",right:"left",bottom:"top",top:"bottom"};function be(e){return e.replace(/left|right|bottom|top/g,(function(e){return ye[e]}))}var we={start:"end",end:"start"};function Ae(e){return e.replace(/start|end/g,(function(e){return we[e]}))}function _e(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&x(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ee(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Me(e,t,n){return t===ne?Ee(function(e,t){var n=M(e),r=B(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var u=P();(u||!u&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+D(e),y:l}}(e,n)):k(t)?function(e,t){var n=N(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Ee(function(e){var t,n=B(e),r=L(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=C(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=C(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+D(e),l=-r.scrollTop;return"rtl"===j(i||n).direction&&(a+=C(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(B(e)))}function ke(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Se(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function xe(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?"clippingParents":a,u=n.rootBoundary,c=void 0===u?ne:u,h=n.elementContext,d=void 0===h?re:h,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=ke("number"!=typeof g?g:Se(g,X)),y=d===re?"reference":re,b=e.rects.popper,w=e.elements[p?y:d],A=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=K(z(e)),n=["absolute","fixed"].indexOf(j(e).position)>=0&&S(e)?$(e):e;return k(n)?t.filter((function(e){return k(e)&&_e(e,n)&&"body"!==I(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=Me(e,n,r);return t.top=C(i.top,t.top),t.right=T(i.right,t.right),t.bottom=T(i.bottom,t.bottom),t.left=C(i.left,t.left),t}),Me(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k(w)?w:w.contextElement||B(e.elements.popper),l,c,s),_=N(e.elements.reference),E=me({reference:_,element:b,strategy:"absolute",placement:i}),M=Ee(Object.assign({},b,E)),x=d===re?M:_,O={top:A.top-x.top+v.top,bottom:x.bottom-A.bottom+v.bottom,left:A.left-x.left+v.left,right:x.right-A.right+v.right},R=e.modifiersData.offset;if(d===re&&R){var P=R[i];Object.keys(O).forEach((function(e){var t=[Z,G].indexOf(e)>=0?1:-1,n=[Y,G].indexOf(e)>=0?"y":"x";O[e]+=P[n]*t}))}return O}function Ce(e,t,n){return C(e,T(t,n))}function Te(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Oe(e){return[Y,Z,G,Q].some((function(t){return e[t]>=0}))}var Re=ce({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=M(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,he)})),a&&l.addEventListener("resize",n.update,he),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,he)})),a&&l.removeEventListener("resize",n.update,he)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=me({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,u={placement:de(t.placement),variation:fe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ve(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ve(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];S(i)&&I(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});S(r)&&I(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=oe.reduce((function(e,n){return e[n]=function(e,t,n){var r=de(e),i=[Q,Y].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Q,Z].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,u=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,h=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,p=void 0===f||f,m=n.allowedAutoPlacements,g=t.options.placement,v=de(g),y=l||(v!==g&&p?function(e){if(de(e)===J)return[];var t=be(e);return[Ae(e),t,Ae(t)]}(g):[be(g)]),b=[g].concat(y).reduce((function(e,n){return e.concat(de(n)===J?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?oe:l,c=fe(r),h=c?a?ie:ie.filter((function(e){return fe(e)===c})):X,d=h.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=h);var f=d.reduce((function(t,n){return t[n]=xe(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[de(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:c,rootBoundary:h,padding:u,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,A=t.rects.popper,_=new Map,E=!0,M=b[0],k=0;k<b.length;k++){var S=b[k],x=de(S),C=fe(S)===ee,T=[Y,G].indexOf(x)>=0,O=T?"width":"height",R=xe(t,{placement:S,boundary:c,rootBoundary:h,altBoundary:d,padding:u}),P=T?C?Z:Q:C?G:Y;w[O]>A[O]&&(P=be(P));var N=be(P),L=[];if(o&&L.push(R[x]<=0),a&&L.push(R[P]<=0,R[N]<=0),L.every((function(e){return e}))){M=S,E=!1;break}_.set(S,L)}if(E)for(var I=function(e){var t=b.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},B=p?3:1;B>0&&"break"!==I(B);B--);t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,h=n.padding,d=n.tether,f=void 0===d||d,p=n.tetherOffset,m=void 0===p?0:p,g=xe(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:c}),v=de(t.placement),y=fe(t.placement),b=!y,w=pe(v),A="x"===w?"y":"x",_=t.modifiersData.popperOffsets,E=t.rects.reference,M=t.rects.popper,k="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,S="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),x=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(_){if(o){var R,P="y"===w?Y:Q,N="y"===w?G:Z,L="y"===w?"height":"width",I=_[w],B=I+g[P],D=I-g[N],j=f?-M[L]/2:0,F=y===ee?E[L]:M[L],U=y===ee?-M[L]:-E[L],z=t.elements.arrow,H=f&&z?q(z):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=K[P],W=K[N],J=Ce(0,E[L],H[L]),X=b?E[L]/2-j-J-V-S.mainAxis:F-J-V-S.mainAxis,te=b?-E[L]/2+j+J+W+S.mainAxis:U+J+W+S.mainAxis,ne=t.elements.arrow&&$(t.elements.arrow),re=ne?"y"===w?ne.clientTop||0:ne.clientLeft||0:0,ie=null!=(R=null==x?void 0:x[w])?R:0,oe=I+te-ie,se=Ce(f?T(B,I+X-ie-re):B,I,f?C(D,oe):D);_[w]=se,O[w]=se-I}if(a){var ae,le="x"===w?Y:Q,ue="x"===w?G:Z,ce=_[A],he="y"===A?"height":"width",me=ce+g[le],ge=ce-g[ue],ve=-1!==[Y,Q].indexOf(v),ye=null!=(ae=null==x?void 0:x[A])?ae:0,be=ve?me:ce-E[he]-M[he]-ye+S.altAxis,we=ve?ce+E[he]+M[he]-ye-S.altAxis:ge,Ae=f&&ve?function(e,t,n){var r=Ce(e,t,n);return r>n?n:r}(be,ce,we):Ce(f?be:me,ce,f?we:ge);_[A]=Ae,O[A]=Ae-ce}t.modifiersData[r]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=de(n.placement),l=pe(a),u=[Q,Z].indexOf(a)>=0?"height":"width";if(o&&s){var c=function(e,t){return ke("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Se(e,X))}(i.padding,n),h=q(o),d="y"===l?Y:Q,f="y"===l?G:Z,p=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],m=s[l]-n.rects.reference[l],g=$(o),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=p/2-m/2,b=c[d],w=v-h[u]-c[f],A=v/2-h[u]/2+y,_=Ce(b,A,w),E=l;n.modifiersData[r]=((t={})[E]=_,t.centerOffset=_-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&_e(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=xe(t,{elementContext:"reference"}),a=xe(t,{altBoundary:!0}),l=Te(s,r),u=Te(a,i,o),c=Oe(l),h=Oe(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}}]}),Pe=function(){return Pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pe.apply(this,arguments)},Ne=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Le={placement:"bottom",triggerType:"click",offsetSkidding:0,offsetDistance:10,delay:300,onShow:function(){},onHide:function(){},onToggle:function(){}},Ie=function(){function e(e,t,n){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=Le),this._targetEl=e,this._triggerEl=t,this._options=Pe(Pe({},Le),n),this._popperInstance=this._createPopperInstance(),this._visible=!1,this._init()}return e.prototype._init=function(){this._triggerEl&&this._setupEventListeners()},e.prototype._setupEventListeners=function(){var e=this,t=this._getTriggerEvents();"click"===this._options.triggerType&&t.showEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){e.toggle()}))})),"hover"===this._options.triggerType&&(t.showEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){"click"===t?e.toggle():setTimeout((function(){e.show()}),e._options.delay)})),e._targetEl.addEventListener(t,(function(){e.show()}))})),t.hideEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){setTimeout((function(){e._targetEl.matches(":hover")||e.hide()}),e._options.delay)})),e._targetEl.addEventListener(t,(function(){setTimeout((function(){e._triggerEl.matches(":hover")||e.hide()}),e._options.delay)}))})))},e.prototype._createPopperInstance=function(){return Re(this._triggerEl,this._targetEl,{placement:this._options.placement,modifiers:[{name:"offset",options:{offset:[this._options.offsetSkidding,this._options.offsetDistance]}}]})},e.prototype._setupClickOutsideListener=function(){var e=this;this._clickOutsideEventListener=function(t){e._handleClickOutside(t,e._targetEl)},document.body.addEventListener("click",this._clickOutsideEventListener,!0)},e.prototype._removeClickOutsideListener=function(){document.body.removeEventListener("click",this._clickOutsideEventListener,!0)},e.prototype._handleClickOutside=function(e,t){var n=e.target;n===t||t.contains(n)||this._triggerEl.contains(n)||!this.isVisible()||this.hide()},e.prototype._getTriggerEvents=function(){switch(this._options.triggerType){case"hover":return{showEvents:["mouseenter","click"],hideEvents:["mouseleave"]};case"click":default:return{showEvents:["click"],hideEvents:[]};case"none":return{showEvents:[],hideEvents:[]}}},e.prototype.toggle=function(){this.isVisible()?this.hide():this.show(),this._options.onToggle(this)},e.prototype.isVisible=function(){return this._visible},e.prototype.show=function(){this._targetEl.classList.remove("hidden"),this._targetEl.classList.add("block"),this._popperInstance.setOptions((function(e){return Pe(Pe({},e),{modifiers:Ne(Ne([],e.modifiers,!0),[{name:"eventListeners",enabled:!0}],!1)})})),this._setupClickOutsideListener(),this._popperInstance.update(),this._visible=!0,this._options.onShow(this)},e.prototype.hide=function(){this._targetEl.classList.remove("block"),this._targetEl.classList.add("hidden"),this._popperInstance.setOptions((function(e){return Pe(Pe({},e),{modifiers:Ne(Ne([],e.modifiers,!0),[{name:"eventListeners",enabled:!1}],!1)})})),this._visible=!1,this._removeClickOutsideListener(),this._options.onHide(this)},e}();function Be(){document.querySelectorAll("[data-dropdown-toggle]").forEach((function(e){var t=e.getAttribute("data-dropdown-toggle"),n=document.getElementById(t);if(n){var r=e.getAttribute("data-dropdown-placement"),i=e.getAttribute("data-dropdown-offset-skidding"),o=e.getAttribute("data-dropdown-offset-distance"),s=e.getAttribute("data-dropdown-trigger"),a=e.getAttribute("data-dropdown-delay");new Ie(n,e,{placement:r||Le.placement,triggerType:s||Le.triggerType,offsetSkidding:i?parseInt(i):Le.offsetSkidding,offsetDistance:o?parseInt(o):Le.offsetDistance,delay:a?parseInt(a):Le.delay})}else console.error('The dropdown element with id "'.concat(t,'" does not exist. Please check the data-dropdown-toggle attribute.'))}))}"undefined"!=typeof window&&(window.Dropdown=Ie);const De=Ie;var je=function(){return je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},je.apply(this,arguments)},Fe={placement:"center",backdropClasses:"bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40",backdrop:"dynamic",closable:!0,onHide:function(){},onShow:function(){},onToggle:function(){}},Ue=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=Fe),this._targetEl=e,this._options=je(je({},Fe),t),this._isHidden=!0,this._backdropEl=null,this._init()}return e.prototype._init=function(){var e=this;this._targetEl&&this._getPlacementClasses().map((function(t){e._targetEl.classList.add(t)}))},e.prototype._createBackdrop=function(){var e;if(this._isHidden){var t=document.createElement("div");t.setAttribute("modal-backdrop",""),(e=t.classList).add.apply(e,this._options.backdropClasses.split(" ")),document.querySelector("body").append(t),this._backdropEl=t}},e.prototype._destroyBackdropEl=function(){this._isHidden||document.querySelector("[modal-backdrop]").remove()},e.prototype._setupModalCloseEventListeners=function(){var e=this;"dynamic"===this._options.backdrop&&(this._clickOutsideEventListener=function(t){e._handleOutsideClick(t.target)},this._targetEl.addEventListener("click",this._clickOutsideEventListener,!0)),this._keydownEventListener=function(t){"Escape"===t.key&&e.hide()},document.body.addEventListener("keydown",this._keydownEventListener,!0)},e.prototype._removeModalCloseEventListeners=function(){"dynamic"===this._options.backdrop&&this._targetEl.removeEventListener("click",this._clickOutsideEventListener,!0),document.body.removeEventListener("keydown",this._keydownEventListener,!0)},e.prototype._handleOutsideClick=function(e){(e===this._targetEl||e===this._backdropEl&&this.isVisible())&&this.hide()},e.prototype._getPlacementClasses=function(){switch(this._options.placement){case"top-left":return["justify-start","items-start"];case"top-center":return["justify-center","items-start"];case"top-right":return["justify-end","items-start"];case"center-left":return["justify-start","items-center"];case"center":default:return["justify-center","items-center"];case"center-right":return["justify-end","items-center"];case"bottom-left":return["justify-start","items-end"];case"bottom-center":return["justify-center","items-end"];case"bottom-right":return["justify-end","items-end"]}},e.prototype.toggle=function(){this._isHidden?this.show():this.hide(),this._options.onToggle(this)},e.prototype.show=function(){this.isHidden&&(this._targetEl.classList.add("flex"),this._targetEl.classList.remove("hidden"),this._targetEl.setAttribute("aria-modal","true"),this._targetEl.setAttribute("role","dialog"),this._targetEl.removeAttribute("aria-hidden"),this._createBackdrop(),this._isHidden=!1,document.body.classList.add("overflow-hidden"),this._options.closable&&this._setupModalCloseEventListeners(),this._options.onShow(this))},e.prototype.hide=function(){this.isVisible&&(this._targetEl.classList.add("hidden"),this._targetEl.classList.remove("flex"),this._targetEl.setAttribute("aria-hidden","true"),this._targetEl.removeAttribute("aria-modal"),this._targetEl.removeAttribute("role"),this._destroyBackdropEl(),this._isHidden=!0,document.body.classList.remove("overflow-hidden"),this._options.closable&&this._removeModalCloseEventListeners(),this._options.onHide(this))},e.prototype.isVisible=function(){return!this._isHidden},e.prototype.isHidden=function(){return this._isHidden},e}();"undefined"!=typeof window&&(window.Modal=Ue);var qe=function(e,t){return t.some((function(t){return t.id===e}))?t.find((function(t){return t.id===e})):null};function ze(){var e=[];document.querySelectorAll("[data-modal-target]").forEach((function(t){var n=t.getAttribute("data-modal-target"),r=document.getElementById(n);if(r){var i=r.getAttribute("data-modal-placement"),o=r.getAttribute("data-modal-backdrop");qe(n,e)||e.push({id:n,object:new Ue(r,{placement:i||Fe.placement,backdrop:o||Fe.backdrop})})}else console.error("Modal with id ".concat(n," does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?."))})),document.querySelectorAll("[data-modal-toggle]").forEach((function(t){var n=t.getAttribute("data-modal-toggle"),r=document.getElementById(n);if(r){var i=r.getAttribute("data-modal-placement"),o=r.getAttribute("data-modal-backdrop"),s=qe(n,e);s||(s={id:n,object:new Ue(r,{placement:i||Fe.placement,backdrop:o||Fe.backdrop})},e.push(s)),t.addEventListener("click",(function(){s.object.toggle()}))}else console.error("Modal with id ".concat(n," does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?"))})),document.querySelectorAll("[data-modal-show]").forEach((function(t){var n=t.getAttribute("data-modal-show");if(document.getElementById(n)){var r=qe(n,e);r?t.addEventListener("click",(function(){r.object.isHidden&&r.object.show()})):console.error("Modal with id ".concat(n," has not been initialized. Please initialize it using the data-modal-target attribute."))}else console.error("Modal with id ".concat(n," does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?"))})),document.querySelectorAll("[data-modal-hide]").forEach((function(t){var n=t.getAttribute("data-modal-hide");if(document.getElementById(n)){var r=qe(n,e);r?t.addEventListener("click",(function(){r.object.isVisible&&r.object.hide()})):console.error("Modal with id ".concat(n," has not been initialized. Please initialize it using the data-modal-target attribute."))}else console.error("Modal with id ".concat(n," does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?"))}))}const He=Ue;var Ke=function(){return Ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ke.apply(this,arguments)},Ve={placement:"left",bodyScrolling:!1,backdrop:!0,edge:!1,edgeOffset:"bottom-[60px]",backdropClasses:"bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-30",onShow:function(){},onHide:function(){},onToggle:function(){}},We=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=Ve),this._targetEl=e,this._options=Ke(Ke({},Ve),t),this._visible=!1,this._init()}return e.prototype._init=function(){var e=this;this._targetEl&&(this._targetEl.setAttribute("aria-hidden","true"),this._targetEl.classList.add("transition-transform")),this._getPlacementClasses(this._options.placement).base.map((function(t){e._targetEl.classList.add(t)})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&e.isVisible()&&e.hide()}))},e.prototype.hide=function(){var e=this;this._options.edge?(this._getPlacementClasses(this._options.placement+"-edge").active.map((function(t){e._targetEl.classList.remove(t)})),this._getPlacementClasses(this._options.placement+"-edge").inactive.map((function(t){e._targetEl.classList.add(t)}))):(this._getPlacementClasses(this._options.placement).active.map((function(t){e._targetEl.classList.remove(t)})),this._getPlacementClasses(this._options.placement).inactive.map((function(t){e._targetEl.classList.add(t)}))),this._targetEl.setAttribute("aria-hidden","true"),this._targetEl.removeAttribute("aria-modal"),this._targetEl.removeAttribute("role"),this._options.bodyScrolling||document.body.classList.remove("overflow-hidden"),this._options.backdrop&&this._destroyBackdropEl(),this._visible=!1,this._options.onHide(this)},e.prototype.show=function(){var e=this;this._options.edge?(this._getPlacementClasses(this._options.placement+"-edge").active.map((function(t){e._targetEl.classList.add(t)})),this._getPlacementClasses(this._options.placement+"-edge").inactive.map((function(t){e._targetEl.classList.remove(t)}))):(this._getPlacementClasses(this._options.placement).active.map((function(t){e._targetEl.classList.add(t)})),this._getPlacementClasses(this._options.placement).inactive.map((function(t){e._targetEl.classList.remove(t)}))),this._targetEl.setAttribute("aria-modal","true"),this._targetEl.setAttribute("role","dialog"),this._targetEl.removeAttribute("aria-hidden"),this._options.bodyScrolling||document.body.classList.add("overflow-hidden"),this._options.backdrop&&this._createBackdrop(),this._visible=!0,this._options.onShow(this)},e.prototype.toggle=function(){this.isVisible()?this.hide():this.show()},e.prototype._createBackdrop=function(){var e,t=this;if(!this._visible){var n=document.createElement("div");n.setAttribute("drawer-backdrop",""),(e=n.classList).add.apply(e,this._options.backdropClasses.split(" ")),document.querySelector("body").append(n),n.addEventListener("click",(function(){t.hide()}))}},e.prototype._destroyBackdropEl=function(){this._visible&&document.querySelector("[drawer-backdrop]").remove()},e.prototype._getPlacementClasses=function(e){switch(e){case"top":return{base:["top-0","left-0","right-0"],active:["transform-none"],inactive:["-translate-y-full"]};case"right":return{base:["right-0","top-0"],active:["transform-none"],inactive:["translate-x-full"]};case"bottom":return{base:["bottom-0","left-0","right-0"],active:["transform-none"],inactive:["translate-y-full"]};case"left":default:return{base:["left-0","top-0"],active:["transform-none"],inactive:["-translate-x-full"]};case"bottom-edge":return{base:["left-0","top-0"],active:["transform-none"],inactive:["translate-y-full",this._options.edgeOffset]}}},e.prototype.isHidden=function(){return!this._visible},e.prototype.isVisible=function(){return this._visible},e}();"undefined"!=typeof window&&(window.Drawer=We);var $e=function(e,t){if(t.some((function(t){return t.id===e})))return t.find((function(t){return t.id===e}))};function Ye(){var e=[];document.querySelectorAll("[data-drawer-target]").forEach((function(t){var n=t.getAttribute("data-drawer-target"),r=document.getElementById(n);if(r){var i=t.getAttribute("data-drawer-placement"),o=t.getAttribute("data-drawer-body-scrolling"),s=t.getAttribute("data-drawer-backdrop"),a=t.getAttribute("data-drawer-edge"),l=t.getAttribute("data-drawer-edge-offset");$e(n,e)||e.push({id:n,object:new We(r,{placement:i||Ve.placement,bodyScrolling:o?"true"===o:Ve.bodyScrolling,backdrop:s?"true"===s:Ve.backdrop,edge:a?"true"===a:Ve.edge,edgeOffset:l||Ve.edgeOffset})})}else console.error("Drawer with id ".concat(n," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?"))})),document.querySelectorAll("[data-drawer-toggle]").forEach((function(t){var n=t.getAttribute("data-drawer-toggle");if(document.getElementById(n)){var r=$e(n,e);r?t.addEventListener("click",(function(){r.object.toggle()})):console.error("Drawer with id ".concat(n," has not been initialized. Please initialize it using the data-drawer-target attribute."))}else console.error("Drawer with id ".concat(n," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?"))})),document.querySelectorAll("[data-drawer-dismiss], [data-drawer-hide]").forEach((function(t){var n=t.getAttribute("data-drawer-dismiss")?t.getAttribute("data-drawer-dismiss"):t.getAttribute("data-drawer-hide");if(document.getElementById(n)){var r=$e(n,e);r?t.addEventListener("click",(function(){r.object.hide()})):console.error("Drawer with id ".concat(n," has not been initialized. Please initialize it using the data-drawer-target attribute."))}else console.error("Drawer with id ".concat(n," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id"))})),document.querySelectorAll("[data-drawer-show]").forEach((function(t){var n=t.getAttribute("data-drawer-show");if(document.getElementById(n)){var r=$e(n,e);r?t.addEventListener("click",(function(){r.object.show()})):console.error("Drawer with id ".concat(n," has not been initialized. Please initialize it using the data-drawer-target attribute."))}else console.error("Drawer with id ".concat(n," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?"))}))}const Ge=We;var Ze=function(){return Ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ze.apply(this,arguments)},Qe={defaultTabId:null,activeClasses:"text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500",inactiveClasses:"dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300",onShow:function(){}},Je=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=Qe),this._items=e,this._activeTab=t?this.getTab(t.defaultTabId):null,this._options=Ze(Ze({},Qe),t),this._init()}return e.prototype._init=function(){var e=this;this._items.length&&(this._activeTab||this._setActiveTab(this._items[0]),this.show(this._activeTab.id,!0),this._items.map((function(t){t.triggerEl.addEventListener("click",(function(){e.show(t.id)}))})))},e.prototype.getActiveTab=function(){return this._activeTab},e.prototype._setActiveTab=function(e){this._activeTab=e},e.prototype.getTab=function(e){return this._items.filter((function(t){return t.id===e}))[0]},e.prototype.show=function(e,t){var n,r,i=this;void 0===t&&(t=!1);var o=this.getTab(e);(o!==this._activeTab||t)&&(this._items.map((function(e){var t,n;e!==o&&((t=e.triggerEl.classList).remove.apply(t,i._options.activeClasses.split(" ")),(n=e.triggerEl.classList).add.apply(n,i._options.inactiveClasses.split(" ")),e.targetEl.classList.add("hidden"),e.triggerEl.setAttribute("aria-selected","false"))})),(n=o.triggerEl.classList).add.apply(n,this._options.activeClasses.split(" ")),(r=o.triggerEl.classList).remove.apply(r,this._options.inactiveClasses.split(" ")),o.triggerEl.setAttribute("aria-selected","true"),o.targetEl.classList.remove("hidden"),this._setActiveTab(o),this._options.onShow(this,o))},e}();function Xe(){document.querySelectorAll("[data-tabs-toggle]").forEach((function(e){var t=[],n=null;e.querySelectorAll('[role="tab"]').forEach((function(e){var r="true"===e.getAttribute("aria-selected"),i={id:e.getAttribute("data-tabs-target"),triggerEl:e,targetEl:document.querySelector(e.getAttribute("data-tabs-target"))};t.push(i),r&&(n=i.id)})),new Je(t,{defaultTabId:n})}))}"undefined"!=typeof window&&(window.Tabs=Je);const et=Je;var tt=function(){return tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tt.apply(this,arguments)},nt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},rt={placement:"top",triggerType:"hover",onShow:function(){},onHide:function(){},onToggle:function(){}},it=function(){function e(e,t,n){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=rt),this._targetEl=e,this._triggerEl=t,this._options=tt(tt({},rt),n),this._popperInstance=this._createPopperInstance(),this._visible=!1,this._init()}return e.prototype._init=function(){this._triggerEl&&this._setupEventListeners()},e.prototype._setupEventListeners=function(){var e=this,t=this._getTriggerEvents();t.showEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){e.show()}))})),t.hideEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){e.hide()}))}))},e.prototype._createPopperInstance=function(){return Re(this._triggerEl,this._targetEl,{placement:this._options.placement,modifiers:[{name:"offset",options:{offset:[0,8]}}]})},e.prototype._getTriggerEvents=function(){switch(this._options.triggerType){case"hover":default:return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]};case"click":return{showEvents:["click","focus"],hideEvents:["focusout","blur"]};case"none":return{showEvents:[],hideEvents:[]}}},e.prototype._setupKeydownListener=function(){var e=this;this._keydownEventListener=function(t){"Escape"===t.key&&e.hide()},document.body.addEventListener("keydown",this._keydownEventListener,!0)},e.prototype._removeKeydownListener=function(){document.body.removeEventListener("keydown",this._keydownEventListener,!0)},e.prototype._setupClickOutsideListener=function(){var e=this;this._clickOutsideEventListener=function(t){e._handleClickOutside(t,e._targetEl)},document.body.addEventListener("click",this._clickOutsideEventListener,!0)},e.prototype._removeClickOutsideListener=function(){document.body.removeEventListener("click",this._clickOutsideEventListener,!0)},e.prototype._handleClickOutside=function(e,t){var n=e.target;n===t||t.contains(n)||this._triggerEl.contains(n)||!this.isVisible()||this.hide()},e.prototype.isVisible=function(){return this._visible},e.prototype.toggle=function(){this.isVisible()?this.hide():this.show()},e.prototype.show=function(){this._targetEl.classList.remove("opacity-0","invisible"),this._targetEl.classList.add("opacity-100","visible"),this._popperInstance.setOptions((function(e){return tt(tt({},e),{modifiers:nt(nt([],e.modifiers,!0),[{name:"eventListeners",enabled:!0}],!1)})})),this._setupClickOutsideListener(),this._setupKeydownListener(),this._popperInstance.update(),this._visible=!0,this._options.onShow(this)},e.prototype.hide=function(){this._targetEl.classList.remove("opacity-100","visible"),this._targetEl.classList.add("opacity-0","invisible"),this._popperInstance.setOptions((function(e){return tt(tt({},e),{modifiers:nt(nt([],e.modifiers,!0),[{name:"eventListeners",enabled:!1}],!1)})})),this._removeClickOutsideListener(),this._removeKeydownListener(),this._visible=!1,this._options.onHide(this)},e}();function ot(){document.querySelectorAll("[data-tooltip-target]").forEach((function(e){var t=e.getAttribute("data-tooltip-target"),n=document.getElementById(t);if(n){var r=e.getAttribute("data-tooltip-trigger"),i=e.getAttribute("data-tooltip-placement");new it(n,e,{placement:i||rt.placement,triggerType:r||rt.triggerType})}else console.error('The tooltip element with id "'.concat(t,'" does not exist. Please check the data-tooltip-target attribute.'))}))}"undefined"!=typeof window&&(window.Tooltip=it);const st=it;var at=function(){return at=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},at.apply(this,arguments)},lt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ut={placement:"top",offset:10,triggerType:"hover",onShow:function(){},onHide:function(){},onToggle:function(){}},ct=function(){function e(e,t,n){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=ut),this._targetEl=e,this._triggerEl=t,this._options=at(at({},ut),n),this._popperInstance=this._createPopperInstance(),this._visible=!1,this._init()}return e.prototype._init=function(){this._triggerEl&&this._setupEventListeners()},e.prototype._setupEventListeners=function(){var e=this,t=this._getTriggerEvents();t.showEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){e.show()})),e._targetEl.addEventListener(t,(function(){e.show()}))})),t.hideEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){setTimeout((function(){e._targetEl.matches(":hover")||e.hide()}),100)})),e._targetEl.addEventListener(t,(function(){setTimeout((function(){e._triggerEl.matches(":hover")||e.hide()}),100)}))}))},e.prototype._createPopperInstance=function(){return Re(this._triggerEl,this._targetEl,{placement:this._options.placement,modifiers:[{name:"offset",options:{offset:[0,this._options.offset]}}]})},e.prototype._getTriggerEvents=function(){switch(this._options.triggerType){case"hover":default:return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]};case"click":return{showEvents:["click","focus"],hideEvents:["focusout","blur"]};case"none":return{showEvents:[],hideEvents:[]}}},e.prototype._setupKeydownListener=function(){var e=this;this._keydownEventListener=function(t){"Escape"===t.key&&e.hide()},document.body.addEventListener("keydown",this._keydownEventListener,!0)},e.prototype._removeKeydownListener=function(){document.body.removeEventListener("keydown",this._keydownEventListener,!0)},e.prototype._setupClickOutsideListener=function(){var e=this;this._clickOutsideEventListener=function(t){e._handleClickOutside(t,e._targetEl)},document.body.addEventListener("click",this._clickOutsideEventListener,!0)},e.prototype._removeClickOutsideListener=function(){document.body.removeEventListener("click",this._clickOutsideEventListener,!0)},e.prototype._handleClickOutside=function(e,t){var n=e.target;n===t||t.contains(n)||this._triggerEl.contains(n)||!this.isVisible()||this.hide()},e.prototype.isVisible=function(){return this._visible},e.prototype.toggle=function(){this.isVisible()?this.hide():this.show(),this._options.onToggle(this)},e.prototype.show=function(){this._targetEl.classList.remove("opacity-0","invisible"),this._targetEl.classList.add("opacity-100","visible"),this._popperInstance.setOptions((function(e){return at(at({},e),{modifiers:lt(lt([],e.modifiers,!0),[{name:"eventListeners",enabled:!0}],!1)})})),this._setupClickOutsideListener(),this._setupKeydownListener(),this._popperInstance.update(),this._visible=!0,this._options.onShow(this)},e.prototype.hide=function(){this._targetEl.classList.remove("opacity-100","visible"),this._targetEl.classList.add("opacity-0","invisible"),this._popperInstance.setOptions((function(e){return at(at({},e),{modifiers:lt(lt([],e.modifiers,!0),[{name:"eventListeners",enabled:!1}],!1)})})),this._removeClickOutsideListener(),this._removeKeydownListener(),this._visible=!1,this._options.onHide(this)},e}();function ht(){document.querySelectorAll("[data-popover-target]").forEach((function(e){var t=e.getAttribute("data-popover-target"),n=document.getElementById(t);if(n){var r=e.getAttribute("data-popover-trigger"),i=e.getAttribute("data-popover-placement"),o=e.getAttribute("data-popover-offset");new ct(n,e,{placement:i||ut.placement,offset:o?parseInt(o):ut.offset,triggerType:r||ut.triggerType})}else console.error('The popover element with id "'.concat(t,'" does not exist. Please check the data-popover-target attribute.'))}))}"undefined"!=typeof window&&(window.Popover=ct);const dt=ct;var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ft.apply(this,arguments)},pt={triggerType:"hover",onShow:function(){},onHide:function(){},onToggle:function(){}},mt=function(){function e(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=pt),this._parentEl=e,this._triggerEl=t,this._targetEl=n,this._options=ft(ft({},pt),r),this._visible=!1,this._init()}return e.prototype._init=function(){var e=this;if(this._triggerEl){var t=this._getTriggerEventTypes(this._options.triggerType);t.showEvents.forEach((function(t){e._triggerEl.addEventListener(t,(function(){e.show()})),e._targetEl.addEventListener(t,(function(){e.show()}))})),t.hideEvents.forEach((function(t){e._parentEl.addEventListener(t,(function(){e._parentEl.matches(":hover")||e.hide()}))}))}},e.prototype.hide=function(){this._targetEl.classList.add("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","false"),this._visible=!1,this._options.onHide(this)},e.prototype.show=function(){this._targetEl.classList.remove("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","true"),this._visible=!0,this._options.onShow(this)},e.prototype.toggle=function(){this._visible?this.hide():this.show()},e.prototype.isHidden=function(){return!this._visible},e.prototype.isVisible=function(){return this._visible},e.prototype._getTriggerEventTypes=function(e){switch(e){case"hover":default:return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]};case"click":return{showEvents:["click","focus"],hideEvents:["focusout","blur"]};case"none":return{showEvents:[],hideEvents:[]}}},e}();function gt(){document.querySelectorAll("[data-dial-init]").forEach((function(e){var t=e.querySelector("[data-dial-toggle]");if(t){var n=t.getAttribute("data-dial-toggle"),r=document.getElementById(n);if(r){var i=t.getAttribute("data-dial-trigger");new mt(e,t,r,{triggerType:i||pt.triggerType})}else console.error("Dial with id ".concat(n," does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?"))}else console.error("Dial with id ".concat(e.id," does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?"))}))}"undefined"!=typeof window&&(window.Dial=mt);const vt=mt;function yt(){a(),d(),v(),_(),Be(),ze(),Ye(),Xe(),ot(),ht(),gt()}new r("load",[a,d,v,_,Be,ze,Ye,Xe,ot,ht,gt]).init()},3715:(e,t,n)=>{var r=t;r.utils=n(6436),r.common=n(5772),r.sha=n(9041),r.ripemd=n(2949),r.hmac=n(2344),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},5772:(e,t,n)=>{"use strict";var r=n(6436),i=n(9746);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},2344:(e,t,n)=>{"use strict";var r=n(6436),i=n(9746);function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},2949:(e,t,n)=>{"use strict";var r=n(6436),i=n(5772),o=r.rotl32,s=r.sum32,a=r.sum32_3,l=r.sum32_4,u=i.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function f(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(c,u),t.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],i=this.h[2],u=this.h[3],c=this.h[4],y=n,b=r,w=i,A=u,_=c,E=0;E<80;E++){var M=s(o(l(n,h(E,r,i,u),e[p[E]+t],d(E)),g[E]),c);n=c,c=u,u=o(i,10),i=r,r=M,M=s(o(l(y,h(79-E,b,w,A),e[m[E]+t],f(E)),v[E]),_),y=_,_=A,A=o(w,10),w=b,b=M}M=a(this.h[1],i,A),this.h[1]=a(this.h[2],u,_),this.h[2]=a(this.h[3],c,y),this.h[3]=a(this.h[4],n,b),this.h[4]=a(this.h[0],r,w),this.h[0]=M},c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(e,t,n)=>{"use strict";t.sha1=n(4761),t.sha224=n(799),t.sha256=n(9344),t.sha384=n(772),t.sha512=n(5900)},4761:(e,t,n)=>{"use strict";var r=n(6436),i=n(5772),o=n(7038),s=r.rotl32,a=r.sum32,l=r.sum32_5,u=o.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,c),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],d=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=l(s(i,5),u(p,o,c,d),f,n[r],h[p]);f=d,d=c,c=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],f)},d.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},799:(e,t,n)=>{"use strict";var r=n(6436),i=n(9344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},9344:(e,t,n)=>{"use strict";var r=n(6436),i=n(5772),o=n(7038),s=n(9746),a=r.sum32,l=r.sum32_4,u=r.sum32_5,c=o.ch32,h=o.maj32,d=o.s0_256,f=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=l(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],y=this.h[4],b=this.h[5],w=this.h[6],A=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var _=u(A,f(y),c(y,b,w),this.k[r],n[r]),E=a(d(i),h(i,o,g));A=w,w=b,b=y,y=a(v,_),v=g,g=o,o=i,i=a(_,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],b),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],A)},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},772:(e,t,n)=>{"use strict";var r=n(6436),i=n(5900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},5900:(e,t,n)=>{"use strict";var r=n(6436),i=n(5772),o=n(9746),s=r.rotr64_hi,a=r.rotr64_lo,l=r.shr64_hi,u=r.shr64_lo,c=r.sum64,h=r.sum64_hi,d=r.sum64_lo,f=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,v=i.BlockHash,y=[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];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function w(e,t,n,r,i){var o=e&n^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,n,r,i,o){var s=t&r^~t&o;return s<0&&(s+=4294967296),s}function _(e,t,n,r,i){var o=e&n^e&i^n&i;return o<0&&(o+=4294967296),o}function E(e,t,n,r,i,o){var s=t&r^t&o^r&o;return s<0&&(s+=4294967296),s}function M(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function k(e,t){var n=a(e,t,28)^a(t,e,2)^a(t,e,7);return n<0&&(n+=4294967296),n}function S(e,t){var n=a(e,t,14)^a(e,t,18)^a(t,e,9);return n<0&&(n+=4294967296),n}function x(e,t){var n=s(e,t,1)^s(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function C(e,t){var n=a(e,t,1)^a(e,t,8)^u(e,t,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=a(e,t,19)^a(t,e,29)^u(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=(g=n[r-4],v=n[r-3],y=void 0,(y=s(g,v,19)^s(v,g,29)^l(g,v,6))<0&&(y+=4294967296),y),o=T(n[r-4],n[r-3]),a=n[r-14],u=n[r-13],c=x(n[r-30],n[r-29]),h=C(n[r-30],n[r-29]),d=n[r-32],m=n[r-31];n[r]=f(i,o,a,u,c,h,d,m),n[r+1]=p(i,o,a,u,c,h,d,m)}var g,v,y},b.prototype._update=function(e,t){this._prepareBlock(e,t);var n,r,i,a=this.W,l=this.h[0],u=this.h[1],f=this.h[2],p=this.h[3],v=this.h[4],y=this.h[5],b=this.h[6],x=this.h[7],C=this.h[8],T=this.h[9],O=this.h[10],R=this.h[11],P=this.h[12],N=this.h[13],L=this.h[14],I=this.h[15];o(this.k.length===a.length);for(var B=0;B<a.length;B+=2){var D=L,j=I,F=(i=void 0,(i=s(n=C,r=T,14)^s(n,r,18)^s(r,n,9))<0&&(i+=4294967296),i),U=S(C,T),q=w(C,0,O,0,P),z=A(0,T,0,R,0,N),H=this.k[B],K=this.k[B+1],V=a[B],W=a[B+1],$=m(D,j,F,U,q,z,H,K,V,W),Y=g(D,j,F,U,q,z,H,K,V,W);D=M(l,u),j=k(l,u),F=_(l,0,f,0,v),U=E(0,u,0,p,0,y);var G=h(D,j,F,U),Z=d(D,j,F,U);L=P,I=N,P=O,N=R,O=C,R=T,C=h(b,x,$,Y),T=d(x,x,$,Y),b=v,x=y,v=f,y=p,f=l,p=u,l=h($,Y,G,Z),u=d($,Y,G,Z)}c(this.h,0,l,u),c(this.h,2,f,p),c(this.h,4,v,y),c(this.h,6,b,x),c(this.h,8,C,T),c(this.h,10,O,R),c(this.h,12,P,N),c(this.h,14,L,I)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},7038:(e,t,n)=>{"use strict";var r=n(6436).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function s(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?s(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},6436:(e,t,n)=>{"use strict";var r=n(9746),i=n(5717);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=a(e[n].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];"little"===t&&(i=s(i)),n+=l(i.toString(16))}return n},t.zero2=a,t.zero8=l,t.join32=function(e,t,n,i){var o=n-t;r(o%4==0);for(var s=new Array(o/4),a=0,l=t;a<s.length;a++,l+=4){var u;u="big"===i?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],s[a]=u>>>0}return s},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,s=(o<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,s,a){var l=0,u=t;return l+=(u=u+r>>>0)<t?1:0,l+=(u=u+o>>>0)<o?1:0,e+n+i+s+(l+=(u=u+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,i,o,s,a){return t+r+o+a>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,s,a,l,u){var c=0,h=t;return c+=(h=h+r>>>0)<t?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+a>>>0)<a?1:0,e+n+i+s+l+(c+=(h=h+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,i,o,s,a,l,u){return t+r+o+a+u>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1094:(e,t,n)=>{var r;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?s=n.g:a&&(s=self);var l=!s.JS_SHA3_NO_COMMON_JS&&e.exports,u=n.amdO,c=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),d=[4,1024,262144,67108864],f=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],g=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],y={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!c||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var b=function(e,t,n){return function(r){return new L(e,t,e).update(r)[n]()}},w=function(e,t,n){return function(r,i){return new L(e,t,i).update(r)[n]()}},A=function(e,t,n){return function(t,r,i,o){return S["cshake"+e].update(t,r,i,o)[n]()}},_=function(e,t,n){return function(t,r,i,o){return S["kmac"+e].update(t,r,i,o)[n]()}},E=function(e,t,n,r){for(var i=0;i<v.length;++i){var o=v[i];e[o]=t(n,r,o)}return e},M=function(e,t){var n=b(e,t,"hex");return n.create=function(){return new L(e,t,e)},n.update=function(e){return n.create().update(e)},E(n,b,e,t)},k=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:M},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:M},{name:"shake",padding:[31,7936,2031616,520093696],bits:g,createMethod:function(e,t){var n=w(e,t,"hex");return n.create=function(n){return new L(e,t,n)},n.update=function(e,t){return n.create(t).update(e)},E(n,w,e,t)}},{name:"cshake",padding:d,bits:g,createMethod:function(e,t){var n=y[e],r=A(e,0,"hex");return r.create=function(r,i,o){return i||o?new L(e,t,r).bytepad([i,o],n):S["shake"+e].create(r)},r.update=function(e,t,n,i){return r.create(t,n,i).update(e)},E(r,A,e,t)}},{name:"kmac",padding:d,bits:g,createMethod:function(e,t){var n=y[e],r=_(e,0,"hex");return r.create=function(r,i,o){return new I(e,t,i).bytepad(["KMAC",o],n).bytepad([r],n)},r.update=function(e,t,n,i){return r.create(e,n,i).update(t)},E(r,_,e,t)}}],S={},x=[],C=0;C<k.length;++C)for(var T=k[C],O=T.bits,R=0;R<O.length;++R){var P=T.name+"_"+O[R];if(x.push(P),S[P]=T.createMethod(O[R],T.padding),"sha3"!==T.name){var N=T.name+O[R];x.push(N),S[N]=S[P]}}function L(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function I(e,t,n){L.call(this,e,t,n)}L.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||c&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var r,o,s=this.blocks,a=this.byteCount,l=e.length,u=this.blockCount,h=0,d=this.s;h<l;){if(this.reset)for(this.reset=!1,s[0]=this.block,r=1;r<u+1;++r)s[r]=0;if(t)for(r=this.start;h<l&&r<a;++h)s[r>>2]|=e[h]<<f[3&r++];else for(r=this.start;h<l&&r<a;++h)(o=e.charCodeAt(h))<128?s[r>>2]|=o<<f[3&r++]:o<2048?(s[r>>2]|=(192|o>>6)<<f[3&r++],s[r>>2]|=(128|63&o)<<f[3&r++]):o<55296||o>=57344?(s[r>>2]|=(224|o>>12)<<f[3&r++],s[r>>2]|=(128|o>>6&63)<<f[3&r++],s[r>>2]|=(128|63&o)<<f[3&r++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++h)),s[r>>2]|=(240|o>>18)<<f[3&r++],s[r>>2]|=(128|o>>12&63)<<f[3&r++],s[r>>2]|=(128|o>>6&63)<<f[3&r++],s[r>>2]|=(128|63&o)<<f[3&r++]);if(this.lastByteIndex=r,r>=a){for(this.start=r-a,this.block=s[u],r=0;r<u;++r)d[r]^=s[r];B(d),this.reset=!0}else this.start=r}return this},L.prototype.encode=function(e,t){var n=255&e,r=1,i=[n];for(n=255&(e>>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},L.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(i);if(null===e)throw new Error(i);if(c&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||c&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var r=0,o=e.length;if(t)r=o;else for(var s=0;s<e.length;++s){var a=e.charCodeAt(s);a<128?r+=1:a<2048?r+=2:a<55296||a>=57344?r+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),r+=4)}return r+=this.encode(8*r),this.update(e),r},L.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r<e.length;++r)n+=this.encodeString(e[r]);var i=t-n%t,o=[];return o.length=i,this.update(o),this},L.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];B(r)}},L.prototype.toString=L.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,s=0,a="";s<r;){for(o=0;o<t&&s<r;++o,++s)e=n[o],a+=h[e>>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];s%t==0&&(B(n),o=0)}return i&&(e=n[o],a+=h[e>>4&15]+h[15&e],i>1&&(a+=h[e>>12&15]+h[e>>8&15]),i>2&&(a+=h[e>>20&15]+h[e>>16&15])),a},L.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var l=new Uint32Array(e);s<r;){for(o=0;o<t&&s<r;++o,++s)l[s]=n[o];s%t==0&&B(n)}return i&&(l[o]=n[o],e=e.slice(0,a)),e},L.prototype.buffer=L.prototype.arrayBuffer,L.prototype.digest=L.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,l=[];a<i;){for(s=0;s<n&&a<i;++s,++a)e=a<<2,t=r[s],l[e]=255&t,l[e+1]=t>>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;a%n==0&&B(r)}return o&&(e=a<<2,t=r[s],l[e]=255&t,o>1&&(l[e+1]=t>>8&255),o>2&&(l[e+2]=t>>16&255)),l},I.prototype=new L,I.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)};var B=function(e){var t,n,r,i,o,s,a,l,u,c,h,d,f,m,g,v,y,b,w,A,_,E,M,k,S,x,C,T,O,R,P,N,L,I,B,D,j,F,U,q,z,H,K,V,W,$,Y,G,Z,Q,J,X,ee,te,ne,re,ie,oe,se,ae,le,ue,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),n=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(l<<1|u>>>31),n=o^(u<<1|l>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(c<<1|h>>>31),n=a^(h<<1|c>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=l^(d<<1|f>>>31),n=u^(f<<1|d>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=c^(i<<1|o>>>31),n=h^(o<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[0],g=e[1],$=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,I=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,G=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,R=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,L=e[44]<<29|e[45]>>>3,k=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,M=e[49]<<14|e[48]>>>18,e[0]=m^~v&b,e[1]=g^~y&w,e[10]=k^~x&T,e[11]=S^~C&O,e[20]=I^~D&F,e[21]=B^~j&U,e[30]=V^~$&G,e[31]=W^~Y&Z,e[40]=te^~re&oe,e[41]=ne^~ie&se,e[2]=v^~b&A,e[3]=y^~w&_,e[12]=x^~T&R,e[13]=C^~O&P,e[22]=D^~F&q,e[23]=j^~U&z,e[32]=$^~G&Q,e[33]=Y^~Z&J,e[42]=re^~oe&ae,e[43]=ie^~se&le,e[4]=b^~A&E,e[5]=w^~_&M,e[14]=T^~R&N,e[15]=O^~P&L,e[24]=F^~q&H,e[25]=U^~z&K,e[34]=G^~Q&X,e[35]=Z^~J&ee,e[44]=oe^~ae&ue,e[45]=se^~le&ce,e[6]=A^~E&m,e[7]=_^~M&g,e[16]=R^~N&k,e[17]=P^~L&S,e[26]=q^~H&I,e[27]=z^~K&B,e[36]=Q^~X&V,e[37]=J^~ee&W,e[46]=ae^~ue&te,e[47]=le^~ce&ne,e[8]=E^~m&v,e[9]=M^~g&y,e[18]=N^~k&x,e[19]=L^~S&C,e[28]=H^~I&D,e[29]=K^~B&j,e[38]=X^~V&$,e[39]=ee^~W&Y,e[48]=ue^~te&re,e[49]=ce^~ne&ie,e[0]^=p[r],e[1]^=p[r+1]};if(l)e.exports=S;else{for(C=0;C<x.length;++C)s[x[C]]=S[x[C]];u&&(void 0===(r=function(){return S}.call(t,n,t,e))||(e.exports=r))}}()},1296:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),h=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||s.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,s,a,l,u=0,c=!1,h=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,u=t,s=e.apply(o,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function w(){var e=p();if(b(e))return A(e);a=setTimeout(w,function(e){var n=t-(e-l);return h?f(n,o-(e-u)):n}(e))}function A(e){return a=void 0,v&&r?y(e):(r=i=void 0,s)}function _(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return function(e){return u=e,a=setTimeout(w,t),c?y(e):s}(l);if(h)return a=setTimeout(w,t),y(l)}return void 0===a&&(a=setTimeout(w,t)),s}return t=g(t)||0,m(n)&&(c=!!n.leading,o=(h="maxWait"in n)?d(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),_.cancel=function(){void 0!==a&&clearTimeout(a),u=0,r=l=i=a=void 0},_.flush=function(){return void 0===a?s:A(p())},_}},9746:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},7635:function(e){"use strict";!function(t){const n=2147483647;function r(e){const t=new Uint32Array([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]);let n=1779033703,r=3144134277,i=1013904242,o=2773480762,s=1359893119,a=2600822924,l=528734635,u=1541459225;const c=new Uint32Array(64);function h(e){let h=0,d=e.length;for(;d>=64;){let f,p,m,g,v,y=n,b=r,w=i,A=o,_=s,E=a,M=l,k=u;for(p=0;p<16;p++)m=h+4*p,c[p]=(255&e[m])<<24|(255&e[m+1])<<16|(255&e[m+2])<<8|255&e[m+3];for(p=16;p<64;p++)f=c[p-2],g=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,f=c[p-15],v=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,c[p]=(g+c[p-7]|0)+(v+c[p-16]|0)|0;for(p=0;p<64;p++)g=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&E^~_&M)|0)+(k+(t[p]+c[p]|0)|0)|0,v=((y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10))+(y&b^y&w^b&w)|0,k=M,M=E,E=_,_=A+g|0,A=w,w=b,b=y,y=g+v|0;n=n+y|0,r=r+b|0,i=i+w|0,o=o+A|0,s=s+_|0,a=a+E|0,l=l+M|0,u=u+k|0,h+=64,d-=64}}h(e);let d,f=e.length%64,p=e.length/536870912|0,m=e.length<<3,g=f<56?56:120,v=e.slice(e.length-f,e.length);for(v.push(128),d=f+1;d<g;d++)v.push(0);return v.push(p>>>24&255),v.push(p>>>16&255),v.push(p>>>8&255),v.push(p>>>0&255),v.push(m>>>24&255),v.push(m>>>16&255),v.push(m>>>8&255),v.push(m>>>0&255),h(v),[n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function i(e,t,n){e=e.length<=64?e:r(e);const i=64+t.length+4,o=new Array(i),s=new Array(64);let a,l=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a<e.length;a++)o[a]^=e[a];for(a=0;a<t.length;a++)o[64+a]=t[a];for(a=i-4;a<i;a++)o[a]=0;for(a=0;a<64;a++)s[a]=92;for(a=0;a<e.length;a++)s[a]^=e[a];function u(){for(let e=i-1;e>=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;n>=32;)u(),l=l.concat(r(s.concat(r(o)))),n-=32;return n>0&&(u(),l=l.concat(r(s.concat(r(o))).slice(0,n))),l}function o(e,t,n,r,i){let o;for(u(e,16*(2*n-1),i,0,16),o=0;o<2*n;o++)l(e,16*o,i,16),a(i,r),u(i,0,e,t+16*o,16);for(o=0;o<n;o++)u(e,t+2*o*16,e,16*o,16);for(o=0;o<n;o++)u(e,t+16*(2*o+1),e,16*(o+n),16)}function s(e,t){return e<<t|e>>>32-t}function a(e,t){u(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(let n=0;n<16;++n)e[n]+=t[n]}function l(e,t,n,r){for(let i=0;i<r;i++)n[i]^=e[t+i]}function u(e,t,n,r,i){for(;i--;)n[r++]=e[t++]}function c(e){if(!e||"number"!=typeof e.length)return!1;for(let t=0;t<e.length;t++){const n=e[t];if("number"!=typeof n||n%1||n<0||n>=256)return!1}return!0}function h(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,t,r,s,a,d,f){if(r=h(r,"N"),s=h(s,"r"),a=h(a,"p"),d=h(d,"dkLen"),0===r||0!=(r&r-1))throw new Error("N must be power of 2");if(r>n/128/s)throw new Error("N too large");if(s>n/128/a)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let p=i(e,t,128*a*s);const m=new Uint32Array(32*a*s);for(let e=0;e<m.length;e++){const t=4*e;m[e]=(255&p[t+3])<<24|(255&p[t+2])<<16|(255&p[t+1])<<8|(255&p[t+0])<<0}const g=new Uint32Array(64*s),v=new Uint32Array(32*s*r),y=32*s,b=new Uint32Array(16),w=new Uint32Array(16),A=a*r*2;let _,E,M=0,k=null,S=!1,x=0,C=0;const T=f?parseInt(1e3/s):4294967295,O="undefined"!=typeof setImmediate?setImmediate:setTimeout,R=function(){if(S)return f(new Error("cancelled"),M/A);let t;switch(x){case 0:E=32*C*s,u(m,E,g,0,y),x=1,_=0;case 1:t=r-_,t>T&&(t=T);for(let e=0;e<t;e++)u(g,0,v,(_+e)*y,y),o(g,y,s,b,w);if(_+=t,M+=t,f){const e=parseInt(1e3*M/A);if(e!==k){if(S=f(null,M/A),S)break;k=e}}if(_<r)break;_=0,x=2;case 2:t=r-_,t>T&&(t=T);for(let e=0;e<t;e++){const e=g[16*(2*s-1)]&r-1;l(v,e*y,g,y),o(g,y,s,b,w)}if(_+=t,M+=t,f){const e=parseInt(1e3*M/A);if(e!==k){if(S=f(null,M/A),S)break;k=e}}if(_<r)break;if(u(g,0,m,E,y),C++,C<a){x=0;break}p=[];for(let e=0;e<m.length;e++)p.push(m[e]>>0&255),p.push(m[e]>>8&255),p.push(m[e]>>16&255),p.push(m[e]>>24&255);const n=i(e,p,d);return f&&f(null,1,n),n}f&&O(R)};if(!f)for(;;){const e=R();if(null!=e)return e}R()}const f={scrypt:function(e,t,n,r,i,o,s){return new Promise((function(a,l){let u=0;s&&s(0),d(e,t,n,r,i,o,(function(e,t,n){if(e)l(e);else if(n)s&&1!==u&&s(1),a(new Uint8Array(n));else if(s&&t!==u)return u=t,s(t)}))}))},syncScrypt:function(e,t,n,r,i,o){return new Uint8Array(d(e,t,n,r,i,o))}};e.exports=f}()},2156:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedMessage=void 0;const i=r(n(5528)),o=r(n(8737));t.ParsedMessage=class{constructor(e){const t=new i.default('\nsign-in-with-ethereum =\n domain %s" wants you to sign in with your Ethereum account:" LF\n address LF\n LF\n [ statement LF ]\n LF\n %s"URI: " URI LF\n %s"Version: " version LF\n %s"Chain ID: " chain-id LF\n %s"Nonce: " nonce LF\n %s"Issued At: " issued-at\n [ LF %s"Expiration Time: " expiration-time ]\n [ LF %s"Not Before: " not-before ]\n [ LF %s"Request ID: " request-id ]\n [ LF %s"Resources:"\n resources ]\n\ndomain = authority\n\naddress = "0x" 40*40HEXDIG\n ; Must also conform to captilization\n ; checksum encoding specified in EIP-55\n ; where applicable (EOAs).\n\nstatement = *( reserved / unreserved / " " )\n ; The purpose is to exclude LF (line breaks).\n\nversion = "1"\n\nnonce = 8*( ALPHA / DIGIT )\n\nissued-at = date-time\nexpiration-time = date-time\nnot-before = date-time\n\nrequest-id = *pchar\n\nchain-id = 1*DIGIT\n ; See EIP-155 for valid CHAIN_IDs.\n\nresources = *( LF resource )\n\nresource = "- " URI\n\n; ------------------------------------------------------------------------------\n; RFC 3986\n\nURI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]\n\nhier-part = "//" authority path-abempty\n / path-absolute\n / path-rootless\n / path-empty\n\nscheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )\n\nauthority = [ userinfo "@" ] host [ ":" port ]\nuserinfo = *( unreserved / pct-encoded / sub-delims / ":" )\nhost = IP-literal / IPv4address / reg-name\nport = *DIGIT\n\nIP-literal = "[" ( IPv6address / IPvFuture ) "]"\n\nIPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )\n\nIPv6address = 6( h16 ":" ) ls32\n / "::" 5( h16 ":" ) ls32\n / [ h16 ] "::" 4( h16 ":" ) ls32\n / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32\n / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32\n / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32\n / [ *4( h16 ":" ) h16 ] "::" ls32\n / [ *5( h16 ":" ) h16 ] "::" h16\n / [ *6( h16 ":" ) h16 ] "::"\n\nh16 = 1*4HEXDIG\nls32 = ( h16 ":" h16 ) / IPv4address\nIPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet\ndec-octet = DIGIT ; 0-9\n / %x31-39 DIGIT ; 10-99\n / "1" 2DIGIT ; 100-199\n / "2" %x30-34 DIGIT ; 200-249\n / "25" %x30-35 ; 250-255\n\nreg-name = *( unreserved / pct-encoded / sub-delims )\n\npath-abempty = *( "/" segment )\npath-absolute = "/" [ segment-nz *( "/" segment ) ]\npath-rootless = segment-nz *( "/" segment )\npath-empty = 0pchar\n\nsegment = *pchar\nsegment-nz = 1*pchar\n\npchar = unreserved / pct-encoded / sub-delims / ":" / "@"\n\nquery = *( pchar / "/" / "?" )\n\nfragment = *( pchar / "/" / "?" )\n\npct-encoded = "%" HEXDIG HEXDIG\n\nunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\nreserved = gen-delims / sub-delims\ngen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"\nsub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n / "*" / "+" / "," / ";" / "="\n\n; ------------------------------------------------------------------------------\n; RFC 3339\n\ndate-fullyear = 4DIGIT\ndate-month = 2DIGIT ; 01-12\ndate-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on\n ; month/year\ntime-hour = 2DIGIT ; 00-23\ntime-minute = 2DIGIT ; 00-59\ntime-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second\n ; rules\ntime-secfrac = "." 1*DIGIT\ntime-numoffset = ("+" / "-") time-hour ":" time-minute\ntime-offset = "Z" / time-numoffset\n\npartial-time = time-hour ":" time-minute ":" time-second\n [time-secfrac]\nfull-date = date-fullyear "-" date-month "-" date-mday\nfull-time = partial-time time-offset\n\ndate-time = full-date "T" full-time\n\n; ------------------------------------------------------------------------------\n; RFC 5234\n\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\nLF = %x0A\n ; linefeed\nDIGIT = %x30-39\n ; 0-9\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n');if(t.generate(),t.errors.length)throw console.error(t.errorsToAscii()),console.error(t.linesToAscii()),console.log(t.displayAttributeErrors()),new Error("ABNF grammar has errors");const n=t.toObject(),r=new o.default.parser;r.ast=new o.default.ast;const s=o.default.ids;r.ast.callbacks.domain=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.domain=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks.address=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.address=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks.statement=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.statement=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks.uri=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.uri||(i.uri=o.default.utils.charsToString(t,n,r))),a},r.ast.callbacks.version=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.version=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks["chain-id"]=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.chainId=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks.nonce=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.nonce=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks["issued-at"]=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.issuedAt=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks["expiration-time"]=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.expirationTime=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks["not-before"]=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.notBefore=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks["request-id"]=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.requestId=o.default.utils.charsToString(t,n,r)),a},r.ast.callbacks.resources=function(e,t,n,r,i){const a=s.SEM_OK;return e===s.SEM_PRE&&(i.resources=o.default.utils.charsToString(t,n,r).slice(3).split("\n- ")),a};const a=r.parse(n,"sign-in-with-ethereum",e);if(!a.success)throw new Error(`Invalid message: ${JSON.stringify(a)}`);const l={};r.ast.translate(l);for(const[e,t]of Object.entries(l))this[e]=t}}},7956:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.generateNonce=t.checkContractWalletSignature=t.SiweMessage=t.SignatureType=t.ErrorTypes=void 0;const i=n(1416),o=n(1949),s=n(2156),a=n(3270);var l;!function(e){e.INVALID_SIGNATURE="Invalid signature.",e.EXPIRED_MESSAGE="Expired message.",e.MALFORMED_SESSION="Malformed session."}(l=t.ErrorTypes||(t.ErrorTypes={})),(t.SignatureType||(t.SignatureType={})).PERSONAL_SIGNATURE="Personal signature";class u{constructor(e){if("string"==typeof e){const t=new s.ParsedMessage(e);this.domain=t.domain,this.address=t.address,this.statement=t.statement,this.uri=t.uri,this.version=t.version,this.nonce=t.nonce,this.issuedAt=t.issuedAt,this.expirationTime=t.expirationTime,this.notBefore=t.notBefore,this.requestId=t.requestId,this.chainId=t.chainId,this.resources=t.resources}else Object.assign(this,e)}regexFromMessage(e){return new a.ParsedMessage(e).match}toMessage(){const e=`${this.domain} wants you to sign in with your Ethereum account:`,n=`URI: ${this.uri}`;let r=[e,this.address].join("\n");const i=`Version: ${this.version}`;this.nonce||(this.nonce=(0,t.generateNonce)());const o=[n,i,"Chain ID: "+this.chainId||0,`Nonce: ${this.nonce}`];if(this.issuedAt&&Date.parse(this.issuedAt),this.issuedAt=this.issuedAt?this.issuedAt:(new Date).toISOString(),o.push(`Issued At: ${this.issuedAt}`),this.expirationTime){const e=`Expiration Time: ${this.expirationTime}`;o.push(e)}this.notBefore&&o.push(`Not Before: ${this.notBefore}`),this.requestId&&o.push(`Request ID: ${this.requestId}`),this.resources&&o.push(["Resources:",...this.resources.map((e=>`- ${e}`))].join("\n"));let s=o.join("\n");return this.statement&&(r=[r,this.statement].join("\n\n")),[r,s].join("\n\n")}signMessage(){return console&&console.warn&&console.warn("signMessage method is deprecated, use prepareMessage instead."),this.prepareMessage()}prepareMessage(){let e;return this.version,e=this.toMessage(),e}validate(e=this.signature,n){return r(this,void 0,void 0,(function*(){return new Promise(((i,s)=>r(this,void 0,void 0,(function*(){const r=this.prepareMessage();try{let s=[];if(r||s.push("`message`"),e||s.push("`signature`"),this.address||s.push("`address`"),s.length>0)throw new Error(`${l.MALFORMED_SESSION} missing: ${s.join(", ")}.`);const a=o.ethers.utils.verifyMessage(r,e);if(a!==this.address)try{if(!(yield(0,t.checkContractWalletSignature)(this,n)))throw new Error(`${l.INVALID_SIGNATURE}: ${a} !== ${this.address}`)}catch(e){throw e}const c=new u(r);if(c.expirationTime){const e=new Date(c.expirationTime).getTime();if(isNaN(e))throw new Error(`${l.MALFORMED_SESSION} invalid expiration date.`);if((new Date).getTime()>=e)throw new Error(l.EXPIRED_MESSAGE)}i(c)}catch(e){s(e)}}))))}))}}t.SiweMessage=u,t.checkContractWalletSignature=(e,t)=>r(void 0,void 0,void 0,(function*(){if(!t)return!1;const n=["function isValidSignature(bytes32 _message, bytes _signature) public view returns (bool)"];try{const r=new o.Contract(e.address,n,t),i=o.utils.hashMessage(e.signMessage());return yield r.isValidSignature(i,e.signature)}catch(e){throw e}})),t.generateNonce=()=>(0,i.randomStringForEntropy)(96)},3270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedMessage=void 0;const n="(([^:?#]+):)?(([^?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))",r="([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))",i=`^(?<domain>([^?#]*)) wants you to sign in with your Ethereum account:\\n(?<address>0x[a-zA-Z0-9]{40})\\n\\n((?<statement>[^\\n]+)\\n)?\\nURI: (?<uri>${n}?)\\nVersion: (?<version>1)\\nChain ID: (?<chainId>[0-9]+)\\nNonce: (?<nonce>[a-zA-Z0-9]{8,})\\nIssued At: (?<issuedAt>${r})(\\nExpiration Time: (?<expirationTime>${r}))?(\\nNot Before: (?<notBefore>${r}))?(\\nRequest ID: (?<requestId>[-._~!$&'()*+,;=:@%a-zA-Z0-9]*))?(\\nResources:(?<resources>(\\n- ${n}?)+))?$`;t.ParsedMessage=class{constructor(e){var t,n,r,o,s,a,l,u,c,h,d,f,p;let m=new RegExp(i,"g").exec(e);if(!m)throw new Error("Message did not match the regular expression.");this.match=m,this.domain=null===(t=null==m?void 0:m.groups)||void 0===t?void 0:t.domain,this.address=null===(n=null==m?void 0:m.groups)||void 0===n?void 0:n.address,this.statement=null===(r=null==m?void 0:m.groups)||void 0===r?void 0:r.statement,this.uri=null===(o=null==m?void 0:m.groups)||void 0===o?void 0:o.uri,this.version=null===(s=null==m?void 0:m.groups)||void 0===s?void 0:s.version,this.nonce=null===(a=null==m?void 0:m.groups)||void 0===a?void 0:a.nonce,this.chainId=null===(l=null==m?void 0:m.groups)||void 0===l?void 0:l.chainId,this.issuedAt=null===(u=null==m?void 0:m.groups)||void 0===u?void 0:u.issuedAt,this.expirationTime=null===(c=null==m?void 0:m.groups)||void 0===c?void 0:c.expirationTime,this.notBefore=null===(h=null==m?void 0:m.groups)||void 0===h?void 0:h.notBefore,this.requestId=null===(d=null==m?void 0:m.groups)||void 0===d?void 0:d.requestId,this.resources=null===(p=null===(f=null==m?void 0:m.groups)||void 0===f?void 0:f.resources)||void 0===p?void 0:p.split("\n- ").slice(1)}}},7544:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(7956),t)},1949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseContract:()=>Gn,BigNumber:()=>b,Contract:()=>Zn,ContractFactory:()=>Qn,FixedNumber:()=>lr,Signer:()=>Et,VoidSigner:()=>Mt,Wallet:()=>Bi,Wordlist:()=>Fr,constants:()=>i,errors:()=>d.jK,ethers:()=>l,getDefaultProvider:()=>Ta,logger:()=>sl,providers:()=>o,utils:()=>a,version:()=>ol,wordlists:()=>Hr});var r={};n.r(r),n.d(r,{decode:()=>J,encode:()=>G});var i={};n.r(i),n.d(i,{AddressZero:()=>Fi,EtherSymbol:()=>qi,HashZero:()=>Ui,MaxInt256:()=>Oe,MaxUint256:()=>Ce,MinInt256:()=>Te,NegativeOne:()=>Ee,One:()=>ke,Two:()=>Se,WeiPerEther:()=>xe,Zero:()=>Me});var o={};n.r(o),n.d(o,{AlchemyProvider:()=>Ds,AlchemyWebSocketProvider:()=>Bs,AnkrProvider:()=>qs,BaseProvider:()=>ds,CloudflareProvider:()=>Hs,EtherscanProvider:()=>Qs,FallbackProvider:()=>da,Formatter:()=>jo,InfuraProvider:()=>va,InfuraWebSocketProvider:()=>ga,IpcProvider:()=>fa,JsonRpcBatchProvider:()=>ya,JsonRpcProvider:()=>ks,JsonRpcSigner:()=>_s,NodesmithProvider:()=>wa,PocketProvider:()=>Ea,Provider:()=>yt,Resolver:()=>us,StaticJsonRpcProvider:()=>Ps,UrlJsonRpcProvider:()=>Ns,Web3Provider:()=>xa,WebSocketProvider:()=>Os,getDefaultProvider:()=>Ta,getNetwork:()=>Gi,isCommunityResourcable:()=>Fo,isCommunityResource:()=>Uo,showThrottleMessage:()=>zo});var s={};n.r(s),n.d(s,{decode:()=>Zi,encode:()=>Qi});var a={};n.r(a),n.d(a,{AbiCoder:()=>st,ConstructorFragment:()=>Ge,ErrorFragment:()=>Je,EventFragment:()=>Ve,FormatTypes:()=>Ue,Fragment:()=>Ke,FunctionFragment:()=>Ze,HDNode:()=>ei,Indexed:()=>dt,Interface:()=>mt,LogDescription:()=>ut,Logger:()=>d.Yd,ParamType:()=>ze,RLP:()=>r,SigningKey:()=>mn,SupportedAlgorithm:()=>Rr,TransactionDescription:()=>ct,TransactionTypes:()=>bn,UnicodeNormalizationForm:()=>ce.Uj,Utf8ErrorFuncs:()=>ce.te,Utf8ErrorReason:()=>ce.Uw,_TypedDataEncoder:()=>Cr,_fetchData:()=>Ro,_toEscapedUtf8String:()=>ce.U$,accessListify:()=>Cn,arrayify:()=>u.lE,base58:()=>Or,base64:()=>s,checkProperties:()=>T,checkResultErrors:()=>j,commify:()=>el,computeAddress:()=>Mn,computeHmac:()=>Br,computePublicKey:()=>vn,concat:()=>u.zo,deepCopy:()=>L,defaultAbiCoder:()=>at,defaultPath:()=>Xr,defineReadOnly:()=>S,dnsEncode:()=>Mo,entropyToMnemonic:()=>ri,fetchJson:()=>Po,formatBytes32String:()=>Za,formatEther:()=>rl,formatUnits:()=>tl,getAccountPath:()=>oi,getAddress:()=>oe,getContractAddress:()=>le,getCreate2Address:()=>ue,getIcapAddress:()=>ae,getJsonWalletAddress:()=>Pi,getStatic:()=>x,hashMessage:()=>dr,hexConcat:()=>u.xs,hexDataLength:()=>u.E1,hexDataSlice:()=>u.p3,hexStripZeros:()=>u.Ou,hexValue:()=>u.$P,hexZeroPad:()=>u.$m,hexlify:()=>u.Dv,id:()=>he,isAddress:()=>se,isBytes:()=>u._t,isBytesLike:()=>u.Zq,isHexString:()=>u.A7,isValidMnemonic:()=>ii,isValidName:()=>_o,joinSignature:()=>u.gV,keccak256:()=>K,mnemonicToEntropy:()=>ni,mnemonicToSeed:()=>ti,namehash:()=>Eo,nameprep:()=>Ga,parseBytes32String:()=>Qa,parseEther:()=>il,parseTransaction:()=>Ln,parseUnits:()=>nl,poll:()=>No,randomBytes:()=>ui,recoverAddress:()=>kn,recoverPublicKey:()=>gn,resolveProperties:()=>C,ripemd160:()=>Nr,serializeTransaction:()=>Pn,sha256:()=>Lr,sha512:()=>Ir,shallowCopy:()=>O,shuffled:()=>Js,solidityKeccak256:()=>Da,solidityPack:()=>Ba,soliditySha256:()=>ja,splitSignature:()=>u.N,stripZeros:()=>u.G1,toUtf8Bytes:()=>ce.Y0,toUtf8CodePoints:()=>ce.XL,toUtf8String:()=>ce.ZN,verifyMessage:()=>Di,verifyTypedData:()=>ji,zeroPad:()=>u.Bu});var l={};n.r(l),n.d(l,{BaseContract:()=>Gn,BigNumber:()=>b,Contract:()=>Zn,ContractFactory:()=>Qn,FixedNumber:()=>lr,Signer:()=>Et,VoidSigner:()=>Mt,Wallet:()=>Bi,Wordlist:()=>Fr,constants:()=>i,errors:()=>d.jK,getDefaultProvider:()=>Ta,logger:()=>sl,providers:()=>o,utils:()=>a,version:()=>ol,wordlists:()=>Hr});var u=n(3286),c=n(3877),h=n.n(c),d=n(711);const f="bignumber/5.7.0";var p=h().BN;const m=new d.Yd(f),g={},v=9007199254740991;let y=!1;class b{constructor(e,t){e!==g&&m.throwError("cannot call constructor directly; use BigNumber.from",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return A(_(this).fromTwos(e))}toTwos(e){return A(_(this).toTwos(e))}abs(){return"-"===this._hex[0]?b.from(this._hex.substring(1)):this}add(e){return A(_(this).add(_(e)))}sub(e){return A(_(this).sub(_(e)))}div(e){return b.from(e).isZero()&&E("division-by-zero","div"),A(_(this).div(_(e)))}mul(e){return A(_(this).mul(_(e)))}mod(e){const t=_(e);return t.isNeg()&&E("division-by-zero","mod"),A(_(this).umod(t))}pow(e){const t=_(e);return t.isNeg()&&E("negative-power","pow"),A(_(this).pow(t))}and(e){const t=_(e);return(this.isNegative()||t.isNeg())&&E("unbound-bitwise-result","and"),A(_(this).and(t))}or(e){const t=_(e);return(this.isNegative()||t.isNeg())&&E("unbound-bitwise-result","or"),A(_(this).or(t))}xor(e){const t=_(e);return(this.isNegative()||t.isNeg())&&E("unbound-bitwise-result","xor"),A(_(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&E("negative-width","mask"),A(_(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&E("negative-width","shl"),A(_(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&E("negative-width","shr"),A(_(this).shrn(e))}eq(e){return _(this).eq(_(e))}lt(e){return _(this).lt(_(e))}lte(e){return _(this).lte(_(e))}gt(e){return _(this).gt(_(e))}gte(e){return _(this).gte(_(e))}isNegative(){return"-"===this._hex[0]}isZero(){return _(this).isZero()}toNumber(){try{return _(this).toNumber()}catch(e){E("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return m.throwError("this platform does not support BigInt",d.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?y||(y=!0,m.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?m.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",d.Yd.errors.UNEXPECTED_ARGUMENT,{}):m.throwError("BigNumber.toString does not accept parameters",d.Yd.errors.UNEXPECTED_ARGUMENT,{})),_(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof b)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new b(g,w(e)):e.match(/^-?[0-9]+$/)?new b(g,w(new p(e))):m.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&E("underflow","BigNumber.from",e),(e>=v||e<=-v)&&E("overflow","BigNumber.from",e),b.from(String(e));const t=e;if("bigint"==typeof t)return b.from(t.toString());if((0,u._t)(t))return b.from((0,u.Dv)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return b.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,u.A7)(e)||"-"===e[0]&&(0,u.A7)(e.substring(1))))return b.from(e)}return m.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function w(e){if("string"!=typeof e)return w(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&m.throwArgumentError("invalid hex","value",e),"0x00"===(e=w(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function A(e){return b.from(w(e))}function _(e){const t=b.from(e).toHexString();return"-"===t[0]?new p("-"+t.substring(3),16):new p(t.substring(2),16)}function E(e,t,n){const r={fault:e,operation:t};return null!=n&&(r.value=n),m.throwError(e,d.Yd.errors.NUMERIC_FAULT,r)}var M=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const k=new d.Yd("properties/5.7.0");function S(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}function x(e,t){for(let n=0;n<32;n++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function C(e){return M(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const n=e[t];return Promise.resolve(n).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function T(e,t){e&&"object"==typeof e||k.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((n=>{t[n]||k.throwArgumentError("invalid object key - "+n,"transaction:"+n,e)}))}function O(e){const t={};for(const n in e)t[n]=e[n];return t}const R={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function P(e){if(null==e||R[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let n=0;n<t.length;n++){let r=null;try{r=e[t[n]]}catch(e){continue}if(!P(r))return!1}return!0}return k.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function N(e){if(P(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>L(e))));if("object"==typeof e){const t={};for(const n in e){const r=e[n];void 0!==r&&S(t,n,L(r))}return t}return k.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function L(e){return N(e)}class I{constructor(e){for(const t in e)this[t]=L(e[t])}}const B="abi/5.7.0",D=new d.Yd(B);function j(e){const t=[],n=function(e,r){if(Array.isArray(r))for(let i in r){const o=e.slice();o.push(i);try{n(o,r[i])}catch(e){t.push({path:o,error:e})}}};return n([],e),t}class F{constructor(e,t,n,r){this.name=e,this.type=t,this.localName=n,this.dynamic=r}_throwError(e,t){D.throwArgumentError(e,this.localName,t)}}class U{constructor(e){S(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,u.xs)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,u.zo)(e._data))}writeBytes(e){let t=(0,u.lE)(e);const n=t.length%this.wordSize;return n&&(t=(0,u.zo)([t,this._padding.slice(n)])),this._writeData(t)}_getValue(e){let t=(0,u.lE)(b.from(e));return t.length>this.wordSize&&D.throwError("value out-of-bounds",d.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,u.zo)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class q{constructor(e,t,n,r){S(this,"_data",(0,u.lE)(e)),S(this,"wordSize",t||32),S(this,"_coerceFunc",n),S(this,"allowLoose",r),this._offset=0}get data(){return(0,u.Dv)(this._data)}get consumed(){return this._offset}static coerce(e,t){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):q.coerce(e,t)}_peekBytes(e,t,n){let r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:D.throwError("data out-of-bounds",d.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}subReader(e){return new q(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}readValue(){return b.from(this.readBytes(this.wordSize))}}var z=n(1094),H=n.n(z);function K(e){return"0x"+H().keccak_256((0,u.lE)(e))}const V=new d.Yd("rlp/5.7.0");function W(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function $(e,t,n){let r=0;for(let i=0;i<n;i++)r=256*r+e[t+i];return r}function Y(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Y(e))})),t.length<=55)return t.unshift(192+t.length),t;const n=W(t.length);return n.unshift(247+n.length),n.concat(t)}(0,u.Zq)(e)||V.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call((0,u.lE)(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const n=W(t.length);return n.unshift(183+n.length),n.concat(t)}function G(e){return(0,u.Dv)(Y(e))}function Z(e,t,n,r){const i=[];for(;n<t+1+r;){const o=Q(e,n);i.push(o.result),(n+=o.consumed)>t+1+r&&V.throwError("child data too short",d.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:i}}function Q(e,t){if(0===e.length&&V.throwError("data too short",d.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){const n=e[t]-247;t+1+n>e.length&&V.throwError("data short segment too short",d.Yd.errors.BUFFER_OVERRUN,{});const r=$(e,t+1,n);return t+1+n+r>e.length&&V.throwError("data long segment too short",d.Yd.errors.BUFFER_OVERRUN,{}),Z(e,t,t+1+n,n+r)}if(e[t]>=192){const n=e[t]-192;return t+1+n>e.length&&V.throwError("data array too short",d.Yd.errors.BUFFER_OVERRUN,{}),Z(e,t,t+1,n)}if(e[t]>=184){const n=e[t]-183;t+1+n>e.length&&V.throwError("data array too short",d.Yd.errors.BUFFER_OVERRUN,{});const r=$(e,t+1,n);return t+1+n+r>e.length&&V.throwError("data array too short",d.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+n+r,result:(0,u.Dv)(e.slice(t+1+n,t+1+n+r))}}if(e[t]>=128){const n=e[t]-128;return t+1+n>e.length&&V.throwError("data too short",d.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+n,result:(0,u.Dv)(e.slice(t+1,t+1+n))}}return{consumed:1,result:(0,u.Dv)(e[t])}}function J(e){const t=(0,u.lE)(e),n=Q(t,0);return n.consumed!==t.length&&V.throwArgumentError("invalid rlp data","data",e),n.result}const X=new d.Yd("address/5.7.0");function ee(e){(0,u.A7)(e,20)||X.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);const r=(0,u.lE)(K(n));for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&r[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const te={};for(let e=0;e<10;e++)te[String(e)]=String(e);for(let e=0;e<26;e++)te[String.fromCharCode(65+e)]=String(10+e);const ne=Math.floor((re=9007199254740991,Math.log10?Math.log10(re):Math.log(re)/Math.LN10));var re;function ie(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>te[e])).join("");for(;t.length>=ne;){let e=t.substring(0,ne);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}function oe(e){let t=null;if("string"!=typeof e&&X.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=ee(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&X.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==ie(e)&&X.throwArgumentError("bad icap checksum","address",e),n=e.substring(4),t=new p(n,36).toString(16);t.length<40;)t="0"+t;t=ee("0x"+t)}else X.throwArgumentError("invalid address","address",e);var n;return t}function se(e){try{return oe(e),!0}catch(e){}return!1}function ae(e){let t=(n=oe(e).substring(2),new p(n,16).toString(36)).toUpperCase();for(var n;t.length<30;)t="0"+t;return"XE"+ie("XE00"+t)+t}function le(e){let t=null;try{t=oe(e.from)}catch(t){X.throwArgumentError("missing from address","transaction",e)}const n=(0,u.G1)((0,u.lE)(b.from(e.nonce).toHexString()));return oe((0,u.p3)(K(G([t,n])),12))}function ue(e,t,n){return 32!==(0,u.E1)(t)&&X.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,u.E1)(n)&&X.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),oe((0,u.p3)(K((0,u.zo)(["0xff",oe(e),t,n])),12))}var ce=n(4242);function he(e){return K((0,ce.Y0)(e))}class de extends F{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=oe(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return oe((0,u.$m)(e.readValue().toHexString(),20))}}class fe extends F{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const pe=new d.Yd(B);function me(e,t,n){let r=null;if(Array.isArray(n))r=n;else if(n&&"object"==typeof n){let e={};r=t.map((t=>{const r=t.localName;return r||pe.throwError("cannot encode object for signature with missing names",d.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:n}),e[r]&&pe.throwError("cannot encode object for signature with duplicate names",d.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:n}),e[r]=!0,n[r]}))}else pe.throwArgumentError("invalid tuple value","tuple",n);t.length!==r.length&&pe.throwArgumentError("types/value length mismatch","tuple",n);let i=new U(e.wordSize),o=new U(e.wordSize),s=[];t.forEach(((e,t)=>{let n=r[t];if(e.dynamic){let t=o.length;e.encode(o,n);let r=i.writeUpdatableValue();s.push((e=>{r(e+t)}))}else e.encode(i,n)})),s.forEach((e=>{e(i.length)}));let a=e.appendWriter(i);return a+=e.appendWriter(o),a}function ge(e,t){let n=[],r=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let n=e.readValue(),o=r.subReader(n.toNumber());try{i=t.decode(o)}catch(e){if(e.code===d.Yd.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===d.Yd.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&n.push(i)}));const i=t.reduce(((e,t)=>{const n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e}),{});t.forEach(((e,t)=>{let r=e.localName;if(!r||1!==i[r])return;if("length"===r&&(r="_length"),null!=n[r])return;const o=n[t];o instanceof Error?Object.defineProperty(n,r,{enumerable:!0,get:()=>{throw o}}):n[r]=o}));for(let e=0;e<n.length;e++){const t=n[e];t instanceof Error&&Object.defineProperty(n,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(n)}class ve extends F{constructor(e,t,n){super("array",e.type+"["+(t>=0?t:"")+"]",n,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let n=0;n<this.length;n++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let n=this.length;-1===n&&(n=t.length,e.writeValue(t.length)),pe.checkArgumentCount(t.length,n,"coder array"+(this.localName?" "+this.localName:""));let r=[];for(let e=0;e<t.length;e++)r.push(this.coder);return me(e,r,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&pe.throwError("insufficient data length",d.Yd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let n=[];for(let e=0;e<t;e++)n.push(new fe(this.coder));return e.coerce(this.name,ge(e,n))}}class ye extends F{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class be extends F{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,u.lE)(t);let n=e.writeValue(t.length);return n+=e.writeBytes(t),n}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class we extends be{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,(0,u.Dv)(super.decode(e)))}}class Ae extends F{constructor(e,t){let n="bytes"+String(e);super(n,n,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let n=(0,u.lE)(t);return n.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(n)}decode(e){return e.coerce(this.name,(0,u.Dv)(e.readBytes(this.size)))}}class _e extends F{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}const Ee=b.from(-1),Me=b.from(0),ke=b.from(1),Se=b.from(2),xe=b.from("1000000000000000000"),Ce=b.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Te=b.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Oe=b.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Re extends F{constructor(e,t,n){const r=(t?"int":"uint")+8*e;super(r,r,n,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let n=b.from(t),r=Ce.mask(8*e.wordSize);if(this.signed){let e=r.mask(8*this.size-1);(n.gt(e)||n.lt(e.add(ke).mul(Ee)))&&this._throwError("value out-of-bounds",t)}else(n.lt(Me)||n.gt(r.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return n=n.toTwos(8*this.size).mask(8*this.size),this.signed&&(n=n.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(n)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}class Pe extends be{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,ce.Y0)(t))}decode(e){return(0,ce.ZN)(super.decode(e))}}class Ne extends F{constructor(e,t){let n=!1;const r=[];e.forEach((e=>{e.dynamic&&(n=!0),r.push(e.type)})),super("tuple","tuple("+r.join(",")+")",t,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e}),{});return this.coders.forEach(((n,r)=>{let i=n.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[r]))})),Object.freeze(e)}encode(e,t){return me(e,this.coders,t)}decode(e){return e.coerce(this.name,ge(e,this.coders))}}const Le=new d.Yd(B),Ie={};let Be={calldata:!0,memory:!0,storage:!0},De={calldata:!0,memory:!0};function je(e,t){if("bytes"===e||"string"===e){if(Be[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&De[t])return!0;return(Be[t]||"payable"===t)&&Le.throwArgumentError("invalid modifier","name",t),!1}function Fe(e,t){for(let n in t)S(e,n,t[n])}const Ue=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),qe=new RegExp(/^(.*)\[([0-9]*)\]$/);class ze{constructor(e,t){e!==Ie&&Le.throwError("use fromString",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Fe(this,t);let n=this.type.match(qe);Fe(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:ze.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=Ue.sighash),Ue[e]||Le.throwArgumentError("invalid format type","format",e),e===Ue.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==Ue.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===Ue.full?", ":",")+")"):t+=this.type,e!==Ue.sighash&&(!0===this.indexed&&(t+=" indexed"),e===Ue.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?ze.fromString(e,t):ze.fromObject(e)}static fromObject(e){return ze.isParamType(e)?e:new ze(Ie,{name:e.name||null,type:Xe(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(ze.fromObject):null})}static fromString(e,t){return n=function(e,t){let n=e;function r(t){Le.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let n={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(n.indexed=!1),n}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let n=0;n<e.length;n++){let o=e[n];switch(o){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||r(n),s.state.allowType=!1,s.type=Xe(s.type),s.components=[i(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||r(n),s.indexed=!0,s.name=""),je(s.type,s.name)&&(s.name=""),s.type=Xe(s.type);let e=s;s=s.parent,s||r(n),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||r(n),s.indexed=!0,s.name=""),je(s.type,s.name)&&(s.name=""),s.type=Xe(s.type);let a=i(s.parent);s.parent.components.push(a),delete s.parent,s=a;break;case" ":s.state.allowType&&""!==s.type&&(s.type=Xe(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||r(n),s.indexed&&r(n),s.indexed=!0,s.name=""):je(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||r(n),s.type+=o,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||r(n),s.type+=o,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=o,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=o,delete s.state.allowArray):s.state.readArray?s.type+=o:r(n)}}return s.parent&&Le.throwArgumentError("unexpected eof","param",e),delete o.state,"indexed"===s.name?(t||r(n.length-7),s.indexed&&r(n.length-7),s.indexed=!0,s.name=""):je(s.type,s.name)&&(s.name=""),o.type=Xe(o.type),o}(e,!!t),ze.fromObject({name:n.name,type:n.type,indexed:n.indexed,components:n.components});var n}static isParamType(e){return!(null==e||!e._isParamType)}}function He(e,t){return function(e){e=e.trim();let t=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i];","===o&&0===r?(t.push(n),n=""):(n+=o,"("===o?r++:")"===o&&(r--,-1===r&&Le.throwArgumentError("unbalanced parenthesis","value",e)))}return n&&t.push(n),t}(e).map((e=>ze.fromString(e,t)))}class Ke{constructor(e,t){e!==Ie&&Le.throwError("use a static from method",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Fe(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return Ke.isFragment(e)?e:"string"==typeof e?Ke.fromString(e):Ke.fromObject(e)}static fromObject(e){if(Ke.isFragment(e))return e;switch(e.type){case"function":return Ze.fromObject(e);case"event":return Ve.fromObject(e);case"constructor":return Ge.fromObject(e);case"error":return Je.fromObject(e);case"fallback":case"receive":return null}return Le.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Ve.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?Ze.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?Ge.fromString(e.trim()):"error"===e.split(" ")[0]?Je.fromString(e.substring(5).trim()):Le.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class Ve extends Ke{format(e){if(e||(e=Ue.sighash),Ue[e]||Le.throwArgumentError("invalid format type","format",e),e===Ue.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Ue.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Ue.full?", ":",")+") ",e!==Ue.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?Ve.fromString(e):Ve.fromObject(e)}static fromObject(e){if(Ve.isEventFragment(e))return e;"event"!==e.type&&Le.throwArgumentError("invalid event object","value",e);const t={name:tt(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ze.fromObject):[],type:"event"};return new Ve(Ie,t)}static fromString(e){let t=e.match(nt);t||Le.throwArgumentError("invalid event string","value",e);let n=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":n=!0;break;case"":break;default:Le.warn("unknown modifier: "+e)}})),Ve.fromObject({name:t[1].trim(),anonymous:n,inputs:He(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function We(e,t){t.gas=null;let n=e.split("@");return 1!==n.length?(n.length>2&&Le.throwArgumentError("invalid human-readable ABI signature","value",e),n[1].match(/^[0-9]+$/)||Le.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=b.from(n[1]),n[0]):e}function $e(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function Ye(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&Le.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&Le.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||Le.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&Le.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&Le.throwArgumentError("unable to determine stateMutability","value",e),t}class Ge extends Ke{format(e){if(e||(e=Ue.sighash),Ue[e]||Le.throwArgumentError("invalid format type","format",e),e===Ue.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===Ue.sighash&&Le.throwError("cannot format a constructor for sighash",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===Ue.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?Ge.fromString(e):Ge.fromObject(e)}static fromObject(e){if(Ge.isConstructorFragment(e))return e;"constructor"!==e.type&&Le.throwArgumentError("invalid constructor object","value",e);let t=Ye(e);t.constant&&Le.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ze.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?b.from(e.gas):null};return new Ge(Ie,n)}static fromString(e){let t={type:"constructor"},n=(e=We(e,t)).match(nt);return n&&"constructor"===n[1].trim()||Le.throwArgumentError("invalid constructor string","value",e),t.inputs=He(n[2].trim(),!1),$e(n[3].trim(),t),Ge.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class Ze extends Ge{format(e){if(e||(e=Ue.sighash),Ue[e]||Le.throwArgumentError("invalid format type","format",e),e===Ue.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Ue.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Ue.full?", ":",")+") ",e!==Ue.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?Ze.fromString(e):Ze.fromObject(e)}static fromObject(e){if(Ze.isFunctionFragment(e))return e;"function"!==e.type&&Le.throwArgumentError("invalid function object","value",e);let t=Ye(e);const n={type:e.type,name:tt(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(ze.fromObject):[],outputs:e.outputs?e.outputs.map(ze.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?b.from(e.gas):null};return new Ze(Ie,n)}static fromString(e){let t={type:"function"},n=(e=We(e,t)).split(" returns ");n.length>2&&Le.throwArgumentError("invalid function string","value",e);let r=n[0].match(nt);if(r||Le.throwArgumentError("invalid function signature","value",e),t.name=r[1].trim(),t.name&&tt(t.name),t.inputs=He(r[2],!1),$e(r[3].trim(),t),n.length>1){let r=n[1].match(nt);""==r[1].trim()&&""==r[3].trim()||Le.throwArgumentError("unexpected tokens","value",e),t.outputs=He(r[2],!1)}else t.outputs=[];return Ze.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function Qe(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||Le.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class Je extends Ke{format(e){if(e||(e=Ue.sighash),Ue[e]||Le.throwArgumentError("invalid format type","format",e),e===Ue.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==Ue.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===Ue.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?Je.fromString(e):Je.fromObject(e)}static fromObject(e){if(Je.isErrorFragment(e))return e;"error"!==e.type&&Le.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:tt(e.name),inputs:e.inputs?e.inputs.map(ze.fromObject):[]};return Qe(new Je(Ie,t))}static fromString(e){let t={type:"error"},n=e.match(nt);return n||Le.throwArgumentError("invalid error signature","value",e),t.name=n[1].trim(),t.name&&tt(t.name),t.inputs=He(n[2],!1),Qe(Je.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function Xe(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const et=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function tt(e){return e&&e.match(et)||Le.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const nt=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),rt=new d.Yd(B),it=new RegExp(/^bytes([0-9]*)$/),ot=new RegExp(/^(u?int)([0-9]*)$/);class st{constructor(e){S(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new de(e.name);case"bool":return new ye(e.name);case"string":return new Pe(e.name);case"bytes":return new we(e.name);case"array":return new ve(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Ne((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new _e(e.name)}let t=e.type.match(ot);if(t){let n=parseInt(t[2]||"256");return(0===n||n>256||n%8!=0)&&rt.throwArgumentError("invalid "+t[1]+" bit length","param",e),new Re(n/8,"int"===t[1],e.name)}if(t=e.type.match(it),t){let n=parseInt(t[1]);return(0===n||n>32)&&rt.throwArgumentError("invalid bytes length","param",e),new Ae(n,e.name)}return rt.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new q(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new U(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(ze.from(e))));return new Ne(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&rt.throwError("types/values length mismatch",d.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const n=e.map((e=>this._getCoder(ze.from(e)))),r=new Ne(n,"_"),i=this._getWriter();return r.encode(i,t),i.data}decode(e,t,n){const r=e.map((e=>this._getCoder(ze.from(e))));return new Ne(r,"_").decode(this._getReader((0,u.lE)(t),n))}}const at=new st,lt=new d.Yd(B);class ut extends I{}class ct extends I{}class ht extends I{}class dt extends I{static isIndexed(e){return!(!e||!e._isIndexed)}}const ft={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function pt(e,t){const n=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return n.error=t,n}class mt{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,S(this,"fragments",t.map((e=>Ke.from(e))).filter((e=>null!=e))),S(this,"_abiCoder",x(new.target,"getAbiCoder")()),S(this,"functions",{}),S(this,"errors",{}),S(this,"events",{}),S(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void lt.warn("duplicate definition - constructor"):void S(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let n=e.format();t[n]?lt.warn("duplicate definition - "+n):t[n]=e})),this.deploy||S(this,"deploy",Ge.from({payable:!1,type:"constructor"})),S(this,"_isInterface",!0)}format(e){e||(e=Ue.full),e===Ue.sighash&<.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===Ue.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return at}static getAddress(e){return oe(e)}static getSighash(e){return(0,u.p3)(he(e.format()),0,4)}static getEventTopic(e){return he(e.format())}getFunction(e){if((0,u.A7)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];lt.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),n=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===n.length?lt.throwArgumentError("no matching function","name",t):n.length>1&<.throwArgumentError("multiple matching functions","name",t),this.functions[n[0]]}const t=this.functions[Ze.fromString(e).format()];return t||lt.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,u.A7)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];lt.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),n=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===n.length?lt.throwArgumentError("no matching event","name",t):n.length>1&<.throwArgumentError("multiple matching events","name",t),this.events[n[0]]}const t=this.events[Ve.fromString(e).format()];return t||lt.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,u.A7)(e)){const t=x(this.constructor,"getSighash");for(const n in this.errors)if(e===t(this.errors[n]))return this.errors[n];lt.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),n=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===n.length?lt.throwArgumentError("no matching error","name",t):n.length>1&<.throwArgumentError("multiple matching errors","name",t),this.errors[n[0]]}const t=this.errors[Ze.fromString(e).format()];return t||lt.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return x(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),x(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const n=(0,u.lE)(t);return(0,u.Dv)(n.slice(0,4))!==this.getSighash(e)&<.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,u.Dv)(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,u.Dv)((0,u.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const n=(0,u.lE)(t);return(0,u.Dv)(n.slice(0,4))!==this.getSighash(e)&<.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,u.Dv)(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,u.Dv)((0,u.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let n=(0,u.lE)(t),r=null,i="",o=null,s=null,a=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch(e){}break;case 4:{const e=(0,u.Dv)(n.slice(0,4)),t=ft[e];if(t)o=this._abiCoder.decode(t.inputs,n.slice(4)),s=t.name,a=t.signature,t.reason&&(r=o[0]),"Error"===s?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===s&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const t=this.getError(e);o=this._abiCoder.decode(t.inputs,n.slice(4)),s=t.name,a=t.format()}catch(e){}break}}return lt.throwError("call revert exception"+i,d.Yd.errors.CALL_EXCEPTION,{method:e.format(),data:(0,u.Dv)(t),errorArgs:o,errorName:s,errorSignature:a,reason:r})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,u.Dv)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&<.throwError("too many arguments for "+e.format(),d.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let n=[];e.anonymous||n.push(this.getEventTopic(e));const r=(e,t)=>"string"===e.type?he(t):"bytes"===e.type?K((0,u.Dv)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=b.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,u.$m)((0,u.Dv)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?n.push(null):"array"===o.baseType||"tuple"===o.baseType?lt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?n.push(t.map((e=>r(o,e)))):n.push(r(o,t)):null!=t&<.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));n.length&&null===n[n.length-1];)n.pop();return n}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const n=[],r=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),t.length!==e.inputs.length&<.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const s=t[o];if(e.indexed)if("string"===e.type)n.push(he(s));else if("bytes"===e.type)n.push(K(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");n.push(this._abiCoder.encode([e.type],[s]))}else r.push(e),i.push(s)})),{data:this._abiCoder.encode(r,i),topics:n}}decodeEventLog(e,t,n){if("string"==typeof e&&(e=this.getEvent(e)),null!=n&&!e.anonymous){let t=this.getEventTopic(e);(0,u.A7)(n[0],32)&&n[0].toLowerCase()===t||lt.throwError("fragment/topic mismatch",d.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:n[0]}),n=n.slice(1)}let r=[],i=[],o=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(r.push(ze.fromObject({type:"bytes32",name:e.name})),o.push(!0)):(r.push(e),o.push(!1)):(i.push(e),o.push(!1))}));let s=null!=n?this._abiCoder.decode(r,(0,u.zo)(n)):null,a=this._abiCoder.decode(i,t,!0),l=[],c=0,h=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)l[t]=new dt({_isIndexed:!0,hash:null});else if(o[t])l[t]=new dt({_isIndexed:!0,hash:s[h++]});else try{l[t]=s[h++]}catch(e){l[t]=e}else try{l[t]=a[c++]}catch(e){l[t]=e}if(e.name&&null==l[e.name]){const n=l[t];n instanceof Error?Object.defineProperty(l,e.name,{enumerable:!0,get:()=>{throw pt(`property ${JSON.stringify(e.name)}`,n)}}):l[e.name]=n}}));for(let e=0;e<l.length;e++){const t=l[e];t instanceof Error&&Object.defineProperty(l,e,{enumerable:!0,get:()=>{throw pt(`index ${e}`,t)}})}return Object.freeze(l)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ct({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:b.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new ut({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,u.Dv)(e);let n=this.getError(t.substring(0,10).toLowerCase());return n?new ht({args:this._abiCoder.decode(n.inputs,"0x"+t.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!(!e||!e._isInterface)}}const gt=new d.Yd("abstract-provider/5.7.0");class vt extends I{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class yt{constructor(){gt.checkAbstract(new.target,yt),S(this,"_isProvider",!0)}getFeeData(){return e=this,t=void 0,r=function*(){const{block:e,gasPrice:t}=yield C({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let n=null,r=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=b.from("1500000000"),r=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:r,maxPriorityFeePerGas:i,gasPrice:t}},new((n=void 0)||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}var bt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const wt=new d.Yd("abstract-signer/5.7.0"),At=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],_t=[d.Yd.errors.INSUFFICIENT_FUNDS,d.Yd.errors.NONCE_EXPIRED,d.Yd.errors.REPLACEMENT_UNDERPRICED];class Et{constructor(){wt.checkAbstract(new.target,Et),S(this,"_isSigner",!0)}getBalance(e){return bt(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return bt(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return bt(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield C(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return bt(this,void 0,void 0,(function*(){this._checkProvider("call");const n=yield C(this.checkTransaction(e));return yield this.provider.call(n,t)}))}sendTransaction(e){return bt(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),n=yield this.signTransaction(t);return yield this.provider.sendTransaction(n)}))}getChainId(){return bt(this,void 0,void 0,(function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return bt(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return bt(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return bt(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===At.indexOf(t)&&wt.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=O(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&wt.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return bt(this,void 0,void 0,(function*(){const t=yield C(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>bt(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&wt.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const n=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!n?0!==t.type&&1!==t.type||!n||wt.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):wt.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(n&&wt.throwError("network does not support EIP-1559",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):wt.throwError("failed to get consistent fee data",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(_t.indexOf(e.code)>=0)throw e;return wt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&wt.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield C(t)}))}_checkProvider(e){this.provider||wt.throwError("missing provider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class Mt extends Et{constructor(e,t){super(),S(this,"address",e),S(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{wt.throwError(e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new Mt(this.address,e)}}var kt=n(2500),St=n.n(kt),xt=n(3715),Ct=n.n(xt);function Tt(e,t,n){return n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},e(n,n.exports),n.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var Ot=Rt;function Rt(e,t){if(!e)throw new Error(t||"Assertion failed")}Rt.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)};var Pt=Tt((function(e,t){var n=t;function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16));else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}})),Nt=Tt((function(e,t){var n=t;n.assert=Ot,n.toArray=Pt.toArray,n.zero2=Pt.zero2,n.toHex=Pt.toHex,n.encode=Pt.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,o=e.clone(),s=0;s<r.length;s++){var a,l=o.andln(i-1);o.isOdd()?(a=l>(i>>1)-1?(i>>1)-l:l,o.isubn(a)):a=0,r[s]=a,o.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,l=e.andln(3)+i&3,u=t.andln(3)+o&3;3===l&&(l=-1),3===u&&(u=-1),s=0==(1&l)?0:3!=(r=e.andln(7)+i&7)&&5!==r||2!==u?l:-l,n[0].push(s),a=0==(1&u)?0:3!=(r=t.andln(7)+o&7)&&5!==r||2!==l?u:-u,n[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new(St())(e,"hex","le")}})),Lt=Nt.getNAF,It=Nt.getJSF,Bt=Nt.assert;function Dt(e,t){this.type=e,this.p=new(St())(t.p,16),this.red=t.prime?St().red(t.prime):St().mont(this.p),this.zero=new(St())(0).toRed(this.red),this.one=new(St())(1).toRed(this.red),this.two=new(St())(2).toRed(this.red),this.n=t.n&&new(St())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var jt=Dt;function Ft(e,t){this.curve=e,this.type=t,this.precomputed=null}Dt.prototype.point=function(){throw new Error("Not implemented")},Dt.prototype.validate=function(){throw new Error("Not implemented")},Dt.prototype._fixedNafMul=function(e,t){Bt(e.precomputed);var n=e._getDoubles(),r=Lt(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var o,s,a=[];for(o=0;o<r.length;o+=n.step){s=0;for(var l=o+n.step-1;l>=o;l--)s=(s<<1)+r[l];a.push(s)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<a.length;o++)(s=a[o])===h?c=c.mixedAdd(n.points[o]):s===-h&&(c=c.mixedAdd(n.points[o].neg()));u=u.add(c)}return u.toP()},Dt.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,o=Lt(t,n,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var l=0;a>=0&&0===o[a];a--)l++;if(a>=0&&l++,s=s.dblp(l),a<0)break;var u=o[a];Bt(0!==u),s="affine"===e.type?u>0?s.mixedAdd(i[u-1>>1]):s.mixedAdd(i[-u-1>>1].neg()):u>0?s.add(i[u-1>>1]):s.add(i[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},Dt.prototype._wnafMulAdd=function(e,t,n,r,i){var o,s,a,l=this._wnafT1,u=this._wnafT2,c=this._wnafT3,h=0;for(o=0;o<r;o++){var d=(a=t[o])._getNAFPoints(e);l[o]=d.wnd,u[o]=d.points}for(o=r-1;o>=1;o-=2){var f=o-1,p=o;if(1===l[f]&&1===l[p]){var m=[t[f],null,null,t[p]];0===t[f].y.cmp(t[p].y)?(m[1]=t[f].add(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg())):0===t[f].y.cmp(t[p].y.redNeg())?(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].add(t[p].neg())):(m[1]=t[f].toJ().mixedAdd(t[p]),m[2]=t[f].toJ().mixedAdd(t[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=It(n[f],n[p]);for(h=Math.max(v[0].length,h),c[f]=new Array(h),c[p]=new Array(h),s=0;s<h;s++){var y=0|v[0][s],b=0|v[1][s];c[f][s]=g[3*(y+1)+(b+1)],c[p][s]=0,u[f]=m}}else c[f]=Lt(n[f],l[f],this._bitLength),c[p]=Lt(n[p],l[p],this._bitLength),h=Math.max(c[f].length,h),h=Math.max(c[p].length,h)}var w=this.jpoint(null,null,null),A=this._wnafT4;for(o=h;o>=0;o--){for(var _=0;o>=0;){var E=!0;for(s=0;s<r;s++)A[s]=0|c[s][o],0!==A[s]&&(E=!1);if(!E)break;_++,o--}if(o>=0&&_++,w=w.dblp(_),o<0)break;for(s=0;s<r;s++){var M=A[s];0!==M&&(M>0?a=u[s][M-1>>1]:M<0&&(a=u[s][-M-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(o=0;o<r;o++)u[o]=null;return i?w:w.toP()},Dt.BasePoint=Ft,Ft.prototype.eq=function(){throw new Error("Not implemented")},Ft.prototype.validate=function(){return this.curve.validate(this)},Dt.prototype.decodePoint=function(e,t){e=Nt.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?Bt(e[e.length-1]%2==0):7===e[0]&&Bt(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},Ft.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Ft.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},Ft.prototype.encode=function(e,t){return Nt.encode(this._encode(t),e)},Ft.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Ft.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Ft.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},Ft.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},Ft.prototype._getBeta=function(){return null},Ft.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t};var Ut=Tt((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),qt=Nt.assert;function zt(e){jt.call(this,"short",e),this.a=new(St())(e.a,16).toRed(this.red),this.b=new(St())(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Ut(zt,jt);var Ht=zt;function Kt(e,t,n,r){jt.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new(St())(t,16),this.y=new(St())(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function Vt(e,t,n,r){jt.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(St())(0)):(this.x=new(St())(t,16),this.y=new(St())(n,16),this.z=new(St())(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}zt.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new(St())(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new(St())(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],qt(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new(St())(e.a,16),b:new(St())(e.b,16)}})):this._getEndoBasis(n)}}},zt.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:St().mont(e),n=new(St())(2).toRed(t).redInvm(),r=n.redNeg(),i=new(St())(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},zt.prototype._getEndoBasis=function(e){for(var t,n,r,i,o,s,a,l,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),f=new(St())(1),p=new(St())(0),m=new(St())(0),g=new(St())(1),v=0;0!==h.cmpn(0);){var y=d.div(h);l=d.sub(y.mul(h)),u=m.sub(y.mul(f));var b=g.sub(y.mul(p));if(!r&&l.cmp(c)<0)t=a.neg(),n=f,r=l.neg(),i=u;else if(r&&2==++v)break;a=l,d=h,h=l,m=f,f=u,g=p,p=b}o=l.neg(),s=u;var w=r.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(w)>=0&&(o=t,s=n),r.negative&&(r=r.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:r,b:i},{a:o,b:s}]},zt.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),a=o.mul(r.a),l=i.mul(n.b),u=o.mul(r.b);return{k1:e.sub(s).sub(a),k2:l.add(u).neg()}},zt.prototype.pointFromX=function(e,t){(e=new(St())(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(t&&!i||!t&&i)&&(r=r.redNeg()),this.point(e,r)},zt.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},zt.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],l=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),r[2*o]=a,r[2*o+1]=l,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var u=this._wnafMulAdd(1,r,i,2*o,n),c=0;c<2*o;c++)r[c]=null,i[c]=null;return u},Ut(Kt,jt.BasePoint),zt.prototype.point=function(e,t,n){return new Kt(this,e,t,n)},zt.prototype.pointFromJSON=function(e,t){return Kt.fromJSON(this,e,t)},Kt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},Kt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Kt.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var o=t[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},Kt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Kt.prototype.isInfinity=function(){return this.inf},Kt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},Kt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},Kt.prototype.getX=function(){return this.x.fromRed()},Kt.prototype.getY=function(){return this.y.fromRed()},Kt.prototype.mul=function(e){return e=new(St())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Kt.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},Kt.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},Kt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Kt.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},Kt.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Ut(Vt,jt.BasePoint),zt.prototype.jpoint=function(e,t,n){return new Vt(this,e,t,n)},Vt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},Vt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Vt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),a=r.redSub(i),l=o.redSub(s);if(0===a.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),h=r.redMul(u),d=l.redSqr().redIAdd(c).redISub(h).redISub(h),f=l.redMul(h.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,f,p)},Vt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=n.redSub(r),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),c=n.redMul(l),h=a.redSqr().redIAdd(u).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(i.redMul(u)),f=this.z.redMul(s);return this.curve.jpoint(h,d,f)},Vt.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,l=a.redSqr().redSqr(),u=s.redAdd(s);for(t=0;t<e;t++){var c=o.redSqr(),h=u.redSqr(),d=h.redSqr(),f=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(l)),p=o.redMul(h),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=f.redMul(g);v=v.redIAdd(v).redISub(d);var y=u.redMul(a);t+1<e&&(l=l.redMul(d)),o=m,a=y,u=v}return this.curve.jpoint(o,u.redMul(i),a)},Vt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Vt.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r),l=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=l,t=a.redMul(s.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),f=this.x.redAdd(h).redSqr().redISub(c).redISub(d);f=f.redIAdd(f);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(f).redISub(f),t=p.redMul(f.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},Vt.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),l=a.redSqr().redISub(s).redISub(s);e=l;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=a.redMul(s.redISub(l)).redISub(u),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),f=this.x.redSub(c).redMul(this.x.redAdd(c));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=f.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},Vt.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),s=n.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),l=t.redAdd(t),u=(l=l.redIAdd(l)).redMul(s),c=a.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(h).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,f,p)},Vt.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(l),c=t.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(a).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(u.redMul(l.redISub(u)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(a);return this.curve.jpoint(h,d,f)},Vt.prototype.mul=function(e,t){return e=new(St())(e,t),this.curve._wnafMul(this,e)},Vt.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},Vt.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},Vt.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Vt.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var Wt=Tt((function(e,t){var n=t;n.base=jt,n.short=Ht,n.mont=null,n.edwards=null})),$t=Tt((function(e,t){var n,r=t,i=Nt.assert;function o(e){"short"===e.type?this.curve=new Wt.short(e):"edwards"===e.type?this.curve=new Wt.edwards(e):this.curve=new Wt.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new o(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ct().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ct().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ct().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ct().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ct().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ct().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ct().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=null.crash()}catch(e){n=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ct().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})}));function Yt(e){if(!(this instanceof Yt))return new Yt(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Pt.toArray(e.entropy,e.entropyEnc||"hex"),n=Pt.toArray(e.nonce,e.nonceEnc||"hex"),r=Pt.toArray(e.pers,e.persEnc||"hex");Ot(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var Gt=Yt;Yt.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},Yt.prototype._hmac=function(){return new(Ct().hmac)(this.hash,this.K)},Yt.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},Yt.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=Pt.toArray(e,t),n=Pt.toArray(n,r),Ot(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},Yt.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=Pt.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(n),this._reseed++,Pt.encode(o,t)};var Zt=Nt.assert;function Qt(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var Jt=Qt;Qt.fromPublic=function(e,t,n){return t instanceof Qt?t:new Qt(e,{pub:t,pubEnc:n})},Qt.fromPrivate=function(e,t,n){return t instanceof Qt?t:new Qt(e,{priv:t,privEnc:n})},Qt.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Qt.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},Qt.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Qt.prototype._importPrivate=function(e,t){this.priv=new(St())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},Qt.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?Zt(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Zt(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},Qt.prototype.derive=function(e){return e.validate()||Zt(e.validate(),"public point not validated"),e.mul(this.priv).getX()},Qt.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},Qt.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Qt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Xt=Nt.assert;function en(e,t){if(e instanceof en)return e;this._importDER(e,t)||(Xt(e.r&&e.s,"Signature without r or s"),this.r=new(St())(e.r,16),this.s=new(St())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var tn=en;function nn(){this.place=0}function rn(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,s=t.place;o<r;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function on(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function sn(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}en.prototype._importDER=function(e,t){e=Nt.toArray(e,t);var n=new nn;if(48!==e[n.place++])return!1;var r=rn(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=rn(e,n);if(!1===i)return!1;var o=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var s=rn(e,n);if(!1===s)return!1;if(e.length!==s+n.place)return!1;var a=e.slice(n.place,s+n.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new(St())(o),this.s=new(St())(a),this.recoveryParam=null,!0},en.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=on(t),n=on(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];sn(r,t.length),(r=r.concat(t)).push(2),sn(r,n.length);var i=r.concat(n),o=[48];return sn(o,i.length),o=o.concat(i),Nt.encode(o,e)};var an=function(){throw new Error("unsupported")},ln=Nt.assert;function un(e){if(!(this instanceof un))return new un(e);"string"==typeof e&&(ln(Object.prototype.hasOwnProperty.call($t,e),"Unknown curve "+e),e=$t[e]),e instanceof $t.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var cn=un;un.prototype.keyPair=function(e){return new Jt(this,e)},un.prototype.keyFromPrivate=function(e,t){return Jt.fromPrivate(this,e,t)},un.prototype.keyFromPublic=function(e,t){return Jt.fromPublic(this,e,t)},un.prototype.genKeyPair=function(e){e||(e={});for(var t=new Gt({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||an(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new(St())(2));;){var i=new(St())(t.generate(n));if(!(i.cmp(r)>0))return i.iaddn(1),this.keyFromPrivate(i)}},un.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},un.prototype.sign=function(e,t,n,r){"object"==typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new(St())(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),s=e.toArray("be",i),a=new Gt({hash:this.hash,entropy:o,nonce:s,pers:r.pers,persEnc:r.persEnc||"utf8"}),l=this.n.sub(new(St())(1)),u=0;;u++){var c=r.k?r.k(u):new(St())(a.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(l)>=0)){var h=this.g.mul(c);if(!h.isInfinity()){var d=h.getX(),f=d.umod(this.n);if(0!==f.cmpn(0)){var p=c.invm(this.n).mul(f.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(h.getY().isOdd()?1:0)|(0!==d.cmp(f)?2:0);return r.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new tn({r:f,s:p,recoveryParam:m})}}}}}},un.prototype.verify=function(e,t,n,r){e=this._truncateToN(new(St())(e,16)),n=this.keyFromPublic(n,r);var i=(t=new tn(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,a=o.invm(this.n),l=a.mul(e).umod(this.n),u=a.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,n.getPublic(),u)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(l,n.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},un.prototype.recoverPubKey=function(e,t,n,r){ln((3&n)===n,"The recovery param is more than two bits"),t=new tn(t,r);var i=this.n,o=new(St())(e),s=t.r,a=t.s,l=1&n,u=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),l):this.curve.pointFromX(s,l);var c=t.r.invm(i),h=i.sub(o).mul(c).umod(i),d=a.mul(c).umod(i);return this.g.mulAdd(h,s,d)},un.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new tn(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")};var hn=Tt((function(e,t){var n=t;n.version="6.5.4",n.utils=Nt,n.rand=function(){throw new Error("unsupported")},n.curve=Wt,n.curves=$t,n.ec=cn,n.eddsa=null})).ec;const dn=new d.Yd("signing-key/5.7.0");let fn=null;function pn(){return fn||(fn=new hn("secp256k1")),fn}class mn{constructor(e){S(this,"curve","secp256k1"),S(this,"privateKey",(0,u.Dv)(e)),32!==(0,u.E1)(this.privateKey)&&dn.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=pn().keyFromPrivate((0,u.lE)(this.privateKey));S(this,"publicKey","0x"+t.getPublic(!1,"hex")),S(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),S(this,"_isSigningKey",!0)}_addPoint(e){const t=pn().keyFromPublic((0,u.lE)(this.publicKey)),n=pn().keyFromPublic((0,u.lE)(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const t=pn().keyFromPrivate((0,u.lE)(this.privateKey)),n=(0,u.lE)(e);32!==n.length&&dn.throwArgumentError("bad digest length","digest",e);const r=t.sign(n,{canonical:!0});return(0,u.N)({recoveryParam:r.recoveryParam,r:(0,u.$m)("0x"+r.r.toString(16),32),s:(0,u.$m)("0x"+r.s.toString(16),32)})}computeSharedSecret(e){const t=pn().keyFromPrivate((0,u.lE)(this.privateKey)),n=pn().keyFromPublic((0,u.lE)(vn(e)));return(0,u.$m)("0x"+t.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function gn(e,t){const n=(0,u.N)(t),r={r:(0,u.lE)(n.r),s:(0,u.lE)(n.s)};return"0x"+pn().recoverPubKey((0,u.lE)(e),r,n.recoveryParam).encode("hex",!1)}function vn(e,t){const n=(0,u.lE)(e);if(32===n.length){const e=new mn(n);return t?"0x"+pn().keyFromPrivate(n).getPublic(!0,"hex"):e.publicKey}return 33===n.length?t?(0,u.Dv)(n):"0x"+pn().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+pn().keyFromPublic(n).getPublic(!0,"hex"):(0,u.Dv)(n):dn.throwArgumentError("invalid public or private key","key","[REDACTED]")}const yn=new d.Yd("transactions/5.7.0");var bn;function wn(e){return"0x"===e?null:oe(e)}function An(e){return"0x"===e?Me:b.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(bn||(bn={}));const _n=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],En={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Mn(e){const t=vn(e);return oe((0,u.p3)(K((0,u.p3)(t,1)),12))}function kn(e,t){return Mn(gn((0,u.lE)(e),t))}function Sn(e,t){const n=(0,u.G1)(b.from(e).toHexString());return n.length>32&&yn.throwArgumentError("invalid length for "+t,"transaction:"+t,e),n}function xn(e,t){return{address:oe(e),storageKeys:(t||[]).map(((t,n)=>(32!==(0,u.E1)(t)&&yn.throwArgumentError("invalid access list storageKey",`accessList[${e}:${n}]`,t),t.toLowerCase())))}}function Cn(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&yn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),xn(e[0],e[1])):xn(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const n=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return xn(t,Object.keys(n).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function Tn(e){return Cn(e).map((e=>[e.address,e.storageKeys]))}function On(e,t){if(null!=e.gasPrice){const t=b.from(e.gasPrice),n=b.from(e.maxFeePerGas||0);t.eq(n)||yn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:n})}const n=[Sn(e.chainId||0,"chainId"),Sn(e.nonce||0,"nonce"),Sn(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Sn(e.maxFeePerGas||0,"maxFeePerGas"),Sn(e.gasLimit||0,"gasLimit"),null!=e.to?oe(e.to):"0x",Sn(e.value||0,"value"),e.data||"0x",Tn(e.accessList||[])];if(t){const e=(0,u.N)(t);n.push(Sn(e.recoveryParam,"recoveryParam")),n.push((0,u.G1)(e.r)),n.push((0,u.G1)(e.s))}return(0,u.xs)(["0x02",G(n)])}function Rn(e,t){const n=[Sn(e.chainId||0,"chainId"),Sn(e.nonce||0,"nonce"),Sn(e.gasPrice||0,"gasPrice"),Sn(e.gasLimit||0,"gasLimit"),null!=e.to?oe(e.to):"0x",Sn(e.value||0,"value"),e.data||"0x",Tn(e.accessList||[])];if(t){const e=(0,u.N)(t);n.push(Sn(e.recoveryParam,"recoveryParam")),n.push((0,u.G1)(e.r)),n.push((0,u.G1)(e.s))}return(0,u.xs)(["0x01",G(n)])}function Pn(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&yn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){T(e,En);const n=[];_n.forEach((function(t){let r=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),r=(0,u.lE)((0,u.Dv)(r,i)),t.length&&r.length!==t.length&&r.length>0&&yn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),t.maxLength&&(r=(0,u.G1)(r),r.length>t.maxLength&&yn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r)),n.push((0,u.Dv)(r))}));let r=0;if(null!=e.chainId?(r=e.chainId,"number"!=typeof r&&yn.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,u.Zq)(t)&&t.v>28&&(r=Math.floor((t.v-35)/2)),0!==r&&(n.push((0,u.Dv)(r)),n.push("0x"),n.push("0x")),!t)return G(n);const i=(0,u.N)(t);let o=27+i.recoveryParam;return 0!==r?(n.pop(),n.pop(),n.pop(),o+=2*r+8,i.v>28&&i.v!==o&&yn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&yn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),n.push((0,u.Dv)(o)),n.push((0,u.G1)((0,u.lE)(i.r))),n.push((0,u.G1)((0,u.lE)(i.s))),G(n)}(e,t);switch(e.type){case 1:return Rn(e,t);case 2:return On(e,t)}return yn.throwError(`unsupported transaction type: ${e.type}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function Nn(e,t,n){try{const n=An(t[0]).toNumber();if(0!==n&&1!==n)throw new Error("bad recid");e.v=n}catch(e){yn.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,u.$m)(t[1],32),e.s=(0,u.$m)(t[2],32);try{const t=K(n(e));e.from=kn(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function Ln(e){const t=(0,u.lE)(e);if(t[0]>127)return function(e){const t=J(e);9!==t.length&&6!==t.length&&yn.throwArgumentError("invalid raw transaction","rawTransaction",e);const n={nonce:An(t[0]).toNumber(),gasPrice:An(t[1]),gasLimit:An(t[2]),to:wn(t[3]),value:An(t[4]),data:t[5],chainId:0};if(6===t.length)return n;try{n.v=b.from(t[6]).toNumber()}catch(e){return n}if(n.r=(0,u.$m)(t[7],32),n.s=(0,u.$m)(t[8],32),b.from(n.r).isZero()&&b.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);let r=n.v-27;const i=t.slice(0,6);0!==n.chainId&&(i.push((0,u.Dv)(n.chainId)),i.push("0x"),i.push("0x"),r-=2*n.chainId+8);const o=K(G(i));try{n.from=kn(o,{r:(0,u.Dv)(n.r),s:(0,u.Dv)(n.s),recoveryParam:r})}catch(e){}n.hash=K(e)}return n.type=null,n}(t);switch(t[0]){case 1:return function(e){const t=J(e.slice(1));8!==t.length&&11!==t.length&&yn.throwArgumentError("invalid component count for transaction type: 1","payload",(0,u.Dv)(e));const n={type:1,chainId:An(t[0]).toNumber(),nonce:An(t[1]).toNumber(),gasPrice:An(t[2]),gasLimit:An(t[3]),to:wn(t[4]),value:An(t[5]),data:t[6],accessList:Cn(t[7])};return 8===t.length||(n.hash=K(e),Nn(n,t.slice(8),Rn)),n}(t);case 2:return function(e){const t=J(e.slice(1));9!==t.length&&12!==t.length&&yn.throwArgumentError("invalid component count for transaction type: 2","payload",(0,u.Dv)(e));const n=An(t[2]),r=An(t[3]),i={type:2,chainId:An(t[0]).toNumber(),nonce:An(t[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:r,gasPrice:null,gasLimit:An(t[4]),to:wn(t[5]),value:An(t[6]),data:t[7],accessList:Cn(t[8])};return 9===t.length||(i.hash=K(e),Nn(i,t.slice(9),On)),i}(t)}return yn.throwError(`unsupported transaction type: ${t[0]}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}var In=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Bn=new d.Yd("contracts/5.7.0"),Dn={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function jn(e,t){return In(this,void 0,void 0,(function*(){const n=yield t;"string"!=typeof n&&Bn.throwArgumentError("invalid address or ENS name","name",n);try{return oe(n)}catch(e){}e||Bn.throwError("a provider or signer is needed to resolve ENS names",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const r=yield e.resolveName(n);return null==r&&Bn.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r}))}function Fn(e,t,n){return In(this,void 0,void 0,(function*(){return Array.isArray(n)?yield Promise.all(n.map(((n,r)=>Fn(e,Array.isArray(t)?t[r]:t[n.name],n)))):"address"===n.type?yield jn(e,t):"tuple"===n.type?yield Fn(e,t,n.components):"array"===n.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>Fn(e,t,n.arrayChildren)))):Promise.reject(Bn.makeError("invalid value for array",d.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function Un(e,t,n){return In(this,void 0,void 0,(function*(){let r={};n.length===t.inputs.length+1&&"object"==typeof n[n.length-1]&&(r=O(n.pop())),Bn.checkArgumentCount(n.length,t.inputs.length,"passed to contract"),e.signer?r.from?r.from=C({override:jn(e.signer,r.from),signer:e.signer.getAddress()}).then((e=>In(this,void 0,void 0,(function*(){return oe(e.signer)!==e.override&&Bn.throwError("Contract with a Signer cannot override from",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):r.from=e.signer.getAddress():r.from&&(r.from=jn(e.provider,r.from));const i=yield C({args:Fn(e.signer||e.provider,n,t.inputs),address:e.resolvedAddress,overrides:C(r)||{}}),o=e.interface.encodeFunctionData(t,i.args),s={data:o,to:i.address},a=i.overrides;if(null!=a.nonce&&(s.nonce=b.from(a.nonce).toNumber()),null!=a.gasLimit&&(s.gasLimit=b.from(a.gasLimit)),null!=a.gasPrice&&(s.gasPrice=b.from(a.gasPrice)),null!=a.maxFeePerGas&&(s.maxFeePerGas=b.from(a.maxFeePerGas)),null!=a.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=b.from(a.maxPriorityFeePerGas)),null!=a.from&&(s.from=a.from),null!=a.type&&(s.type=a.type),null!=a.accessList&&(s.accessList=Cn(a.accessList)),null==s.gasLimit&&null!=t.gas){let e=21e3;const n=(0,u.lE)(o);for(let t=0;t<n.length;t++)e+=4,n[t]&&(e+=64);s.gasLimit=b.from(t.gas).add(e)}if(a.value){const e=b.from(a.value);e.isZero()||t.payable||Bn.throwError("non-payable method cannot override value",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:r.value}),s.value=e}a.customData&&(s.customData=O(a.customData)),a.ccipReadEnabled&&(s.ccipReadEnabled=!!a.ccipReadEnabled),delete r.nonce,delete r.gasLimit,delete r.gasPrice,delete r.from,delete r.value,delete r.type,delete r.accessList,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.customData,delete r.ccipReadEnabled;const l=Object.keys(r).filter((e=>null!=r[e]));return l.length&&Bn.throwError(`cannot override ${l.map((e=>JSON.stringify(e))).join(",")}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s}))}function qn(e,t){const n=t.wait.bind(t);t.wait=t=>n(t).then((t=>(t.events=t.logs.map((n=>{let r=L(n),i=null;try{i=e.interface.parseLog(n)}catch(e){}return i&&(r.args=i.args,r.decode=(t,n)=>e.interface.decodeEventLog(i.eventFragment,t,n),r.event=i.name,r.eventSignature=i.signature),r.removeListener=()=>e.provider,r.getBlock=()=>e.provider.getBlock(t.blockHash),r.getTransaction=()=>e.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>Promise.resolve(t),r})),t)))}function zn(e,t,n){const r=e.signer||e.provider;return function(...i){return In(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=O(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const s=yield Un(e,t,i),a=yield r.call(s,o);try{let r=e.interface.decodeFunctionResult(t,a);return n&&1===t.outputs.length&&(r=r[0]),r}catch(t){throw t.code===d.Yd.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=s),t}}))}}function Hn(e,t,n){return t.constant?zn(e,t,n):function(e,t){return function(...n){return In(this,void 0,void 0,(function*(){e.signer||Bn.throwError("sending a transaction requires a signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const r=yield Un(e,t,n),i=yield e.signer.sendTransaction(r);return qn(e,i),i}))}}(e,t)}function Kn(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class Vn{constructor(e,t){S(this,"tag",e),S(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((n=>!(!t&&n.listener===e&&(t=!0,1))))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const n=e.slice();return setTimeout((()=>{t.listener.apply(this,n)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class Wn extends Vn{constructor(){super("error",null)}}class $n extends Vn{constructor(e,t,n,r){const i={address:e};let o=t.getEventTopic(n);r?(o!==r[0]&&Bn.throwArgumentError("topic mismatch","topics",r),i.topics=r.slice()):i.topics=[o],super(Kn(i),i),S(this,"address",e),S(this,"interface",t),S(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=j(e.args);if(t.length)throw t[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class Yn extends Vn{constructor(e,t){super("*",{address:e}),S(this,"address",e),S(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,n)=>this.interface.decodeEventLog(t.eventFragment,e,n),e.args=t.args}catch(e){}}}class Gn{constructor(e,t,n){S(this,"interface",x(new.target,"getInterface")(t)),null==n?(S(this,"provider",null),S(this,"signer",null)):Et.isSigner(n)?(S(this,"provider",n.provider||null),S(this,"signer",n)):yt.isProvider(n)?(S(this,"provider",n),S(this,"signer",null)):Bn.throwArgumentError("invalid signer or provider","signerOrProvider",n),S(this,"callStatic",{}),S(this,"estimateGas",{}),S(this,"functions",{}),S(this,"populateTransaction",{}),S(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const n=this.interface.events[t];S(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(n,e)}))),e[n.name]||(e[n.name]=[]),e[n.name].push(t)})),Object.keys(e).forEach((t=>{const n=e[t];1===n.length?S(this.filters,t,this.filters[n[0]]):Bn.warn(`Duplicate definition of ${t} (${n.join(", ")})`)}))}if(S(this,"_runningEvents",{}),S(this,"_wrappedEmits",{}),null==e&&Bn.throwArgumentError("invalid contract address or ENS name","addressOrName",e),S(this,"address",e),this.provider)S(this,"resolvedAddress",jn(this.provider,e));else try{S(this,"resolvedAddress",Promise.resolve(oe(e)))}catch(e){Bn.throwError("provider is required to use ENS name as contract address",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const r={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])Bn.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const n=t.name;r[`%${n}`]||(r[`%${n}`]=[]),r[`%${n}`].push(e)}null==this[e]&&S(this,e,Hn(this,t,!0)),null==this.functions[e]&&S(this.functions,e,Hn(this,t,!1)),null==this.callStatic[e]&&S(this.callStatic,e,zn(this,t,!0)),null==this.populateTransaction[e]&&S(this.populateTransaction,e,function(e,t){return function(...n){return Un(e,t,n)}}(this,t)),null==this.estimateGas[e]&&S(this.estimateGas,e,function(e,t){const n=e.signer||e.provider;return function(...r){return In(this,void 0,void 0,(function*(){n||Bn.throwError("estimate require a provider or signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Un(e,t,r);return yield n.estimateGas(i)}))}}(this,t))}})),Object.keys(r).forEach((e=>{const t=r[e];if(t.length>1)return;e=e.substring(1);const n=t[0];try{null==this[e]&&S(this,e,this[n])}catch(e){}null==this.functions[e]&&S(this.functions,e,this.functions[n]),null==this.callStatic[e]&&S(this.callStatic,e,this.callStatic[n]),null==this.populateTransaction[e]&&S(this.populateTransaction,e,this.populateTransaction[n]),null==this.estimateGas[e]&&S(this.estimateGas,e,this.estimateGas[n])}))}static getContractAddress(e){return le(e)}static getInterface(e){return mt.isInterface(e)?e:new mt(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&Bn.throwError("contract not deployed",d.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||Bn.throwError("sending a transactions require a signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=O(e||{});return["from","to"].forEach((function(e){null!=t[e]&&Bn.throwError("cannot override "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new Mt(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&S(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return dt.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new Wn);if("event"===e)return this._normalizeRunningEvent(new Vn("event",null));if("*"===e)return this._normalizeRunningEvent(new Yn(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new $n(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const n=this.interface.getEvent(t);return this._normalizeRunningEvent(new $n(this.address,this.interface,n,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Vn(Kn(t),t))}return this._normalizeRunningEvent(new Yn(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,n){const r=L(t);return r.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},r.getBlock=()=>this.provider.getBlock(t.blockHash),r.getTransaction=()=>this.provider.getTransaction(t.transactionHash),r.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(r),r}_addEventListener(e,t,n){if(this.provider||Bn.throwError("events require a provider or a signer with a provider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const n=n=>{let r=this._wrapEvent(e,n,t);if(null==r.decodeError)try{const t=e.getEmit(r);this.emit(e.filter,...t)}catch(e){r.decodeError=e.error}null!=e.filter&&this.emit("event",r),null!=r.decodeError&&this.emit("error",r.decodeError,r)};this._wrappedEmits[e.tag]=n,null!=e.filter&&this.provider.on(e.filter,n)}}queryFilter(e,t,n){const r=this._getRunningEvent(e),i=O(r.filter);return"string"==typeof t&&(0,u.A7)(t,32)?(null!=n&&Bn.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=n?n:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(r,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const n=this._getRunningEvent(e),r=n.run(t)>0;return this._checkRunningEvents(n),r}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}removeListener(e,t){return this.off(e,t)}}class Zn extends Gn{}class Qn{constructor(e,t,n){let r=null;r="string"==typeof t?t:(0,u._t)(t)?(0,u.Dv)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==r.substring(0,2)&&(r="0x"+r),(!(0,u.A7)(r)||r.length%2)&&Bn.throwArgumentError("invalid bytecode","bytecode",t),n&&!Et.isSigner(n)&&Bn.throwArgumentError("invalid signer","signer",n),S(this,"bytecode",r),S(this,"interface",x(new.target,"getInterface")(e)),S(this,"signer",n||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=O(e.pop());for(const e in t)if(!Dn[e])throw new Error("unknown transaction override "+e)}return["data","from","to"].forEach((e=>{null!=t[e]&&Bn.throwError("cannot override "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value&&(b.from(t.value).isZero()||this.interface.deploy.payable||Bn.throwError("non-payable constructor cannot override value",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})),Bn.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,u.Dv)((0,u.zo)([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return In(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Bn.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const n=yield Fn(this.signer,e,this.interface.deploy.inputs);n.push(t);const r=this.getDeployTransaction(...n),i=yield this.signer.sendTransaction(r),o=x(this.constructor,"getContractAddress")(i),s=x(this.constructor,"getContract")(o,this.interface,this.signer);return qn(s,i),S(s,"deployTransaction",i),s}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&Bn.throwError("missing compiler output",d.Yd.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const n=e.abi;let r=null;return e.bytecode?r=e.bytecode:e.evm&&e.evm.bytecode&&(r=e.evm.bytecode),new this(n,r,t)}static getInterface(e){return Zn.getInterface(e)}static getContractAddress(e){return le(e)}static getContract(e,t,n){return new Zn(e,t,n)}}const Jn=new d.Yd(f),Xn={},er=b.from(0),tr=b.from(-1);function nr(e,t,n,r){const i={fault:t,operation:n};return void 0!==r&&(i.value=r),Jn.throwError(e,d.Yd.errors.NUMERIC_FAULT,i)}let rr="0";for(;rr.length<256;)rr+=rr;function ir(e){if("number"!=typeof e)try{e=b.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+rr.substring(0,e):Jn.throwArgumentError("invalid decimal size","decimals",e)}function or(e,t){null==t&&(t=0);const n=ir(t),r=(e=b.from(e)).lt(er);r&&(e=e.mul(tr));let i=e.mod(n).toString();for(;i.length<n.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const o=e.div(n).toString();return e=1===n.length?o:o+"."+i,r&&(e="-"+e),e}function sr(e,t){null==t&&(t=0);const n=ir(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||Jn.throwArgumentError("invalid decimal value","value",e);const r="-"===e.substring(0,1);r&&(e=e.substring(1)),"."===e&&Jn.throwArgumentError("missing value","value",e);const i=e.split(".");i.length>2&&Jn.throwArgumentError("too many decimal points","value",e);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");"0"===s[s.length-1];)s=s.substring(0,s.length-1);for(s.length>n.length-1&&nr("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.length<n.length-1;)s+="0";const a=b.from(o),l=b.from(s);let u=a.mul(n).add(l);return r&&(u=u.mul(tr)),u}class ar{constructor(e,t,n,r){e!==Xn&&Jn.throwError("cannot use FixedFormat constructor; use FixedFormat.from",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=n,this.decimals=r,this.name=(t?"":"u")+"fixed"+String(n)+"x"+String(r),this._multiplier=ir(r),Object.freeze(this)}static from(e){if(e instanceof ar)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,n=128,r=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||Jn.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],n=parseInt(i[2]),r=parseInt(i[3])}else if(e){const i=(t,n,r)=>null==e[t]?r:(typeof e[t]!==n&&Jn.throwArgumentError("invalid fixed format ("+t+" not "+n+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),n=i("width","number",n),r=i("decimals","number",r)}return n%8&&Jn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),r>80&&Jn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",r),new ar(Xn,t,n,r)}}class lr{constructor(e,t,n,r){e!==Xn&&Jn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=r,this._hex=t,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Jn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=sr(this._value,this.format.decimals),n=sr(e._value,e.format.decimals);return lr.fromValue(t.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=sr(this._value,this.format.decimals),n=sr(e._value,e.format.decimals);return lr.fromValue(t.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=sr(this._value,this.format.decimals),n=sr(e._value,e.format.decimals);return lr.fromValue(t.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=sr(this._value,this.format.decimals),n=sr(e._value,e.format.decimals);return lr.fromValue(t.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=lr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(t=t.subUnsafe(ur.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=lr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(t=t.addUnsafe(ur.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&Jn.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const n=lr.from("1"+rr.substring(0,e),this.format),r=cr.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(r).floor().divUnsafe(n)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&Jn.throwArgumentError("invalid byte width","width",e);const t=b.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,u.$m)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return lr.fromString(this._value,e)}static fromValue(e,t,n){return null!=n||null==t||function(e){return null!=e&&(b.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,u.A7)(e)||"bigint"==typeof e||(0,u._t)(e))}(t)||(n=t,t=null),null==t&&(t=0),null==n&&(n="fixed"),lr.fromString(or(e,t),ar.from(n))}static fromString(e,t){null==t&&(t="fixed");const n=ar.from(t),r=sr(e,n.decimals);!n.signed&&r.lt(er)&&nr("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=r.toTwos(n.width).toHexString():(i=r.toHexString(),i=(0,u.$m)(i,n.width/8));const o=or(r,n.decimals);return new lr(Xn,i,o,n)}static fromBytes(e,t){null==t&&(t="fixed");const n=ar.from(t);if((0,u.lE)(e).length>n.width/8)throw new Error("overflow");let r=b.from(e);n.signed&&(r=r.fromTwos(n.width));const i=r.toTwos((n.signed?0:1)+n.width).toHexString(),o=or(r,n.decimals);return new lr(Xn,i,o,n)}static from(e,t){if("string"==typeof e)return lr.fromString(e,t);if((0,u._t)(e))return lr.fromBytes(e,t);try{return lr.fromValue(e,0,t)}catch(e){if(e.code!==d.Yd.errors.INVALID_ARGUMENT)throw e}return Jn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const ur=lr.from(1),cr=lr.from("0.5"),hr="Ethereum Signed Message:\n";function dr(e){return"string"==typeof e&&(e=(0,ce.Y0)(e)),K((0,u.zo)([(0,ce.Y0)(hr),(0,ce.Y0)(String(e.length)),e]))}const fr="hash/5.7.0";const pr=new d.Yd(fr),mr=new Uint8Array(32);mr.fill(0);const gr=b.from(-1),vr=b.from(0),yr=b.from(1),br=b.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),wr=(0,u.$m)(yr.toHexString(),32),Ar=(0,u.$m)(vr.toHexString(),32),_r={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Er=["name","version","chainId","verifyingContract","salt"];function Mr(e){return function(t){return"string"!=typeof t&&pr.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const kr={name:Mr("name"),version:Mr("version"),chainId:function(e){try{return b.from(e).toString()}catch(e){}return pr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return oe(e).toLowerCase()}catch(e){}return pr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,u.lE)(e);if(32!==t.length)throw new Error("bad length");return(0,u.Dv)(t)}catch(e){}return pr.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function Sr(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const n=""===t[1],r=parseInt(t[2]||"256");(r%8!=0||r>256||t[2]&&t[2]!==String(r))&&pr.throwArgumentError("invalid numeric width","type",e);const i=br.mask(n?r-1:r),o=n?i.add(yr).mul(gr):vr;return function(t){const n=b.from(t);return(n.lt(o)||n.gt(i))&&pr.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,u.$m)(n.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const n=parseInt(t[1]);return(0===n||n>32||t[1]!==String(n))&&pr.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.lE)(t).length!==n&&pr.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,u.lE)(e),n=t.length%32;return n?(0,u.xs)([t,mr.slice(n)]):(0,u.Dv)(t)}(t)}}}switch(e){case"address":return function(e){return(0,u.$m)(oe(e),32)};case"bool":return function(e){return e?wr:Ar};case"bytes":return function(e){return K(e)};case"string":return function(e){return he(e)}}return null}function xr(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Cr{constructor(e){S(this,"types",Object.freeze(L(e))),S(this,"_encoderCache",{}),S(this,"_types",{});const t={},n={},r={};Object.keys(e).forEach((e=>{t[e]={},n[e]=[],r[e]={}}));for(const r in e){const i={};e[r].forEach((o=>{i[o.name]&&pr.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(r)}`,"types",e),i[o.name]=!0;const s=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===r&&pr.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e),Sr(s)||(n[s]||pr.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),n[s].push(r),t[r][s]=!0)}))}const i=Object.keys(n).filter((e=>0===n[e].length));0===i.length?pr.throwArgumentError("missing primary type","types",e):i.length>1&&pr.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),S(this,"primaryType",i[0]),function i(o,s){s[o]&&pr.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),s[o]=!0,Object.keys(t[o]).forEach((e=>{n[e]&&(i(e,s),Object.keys(s).forEach((t=>{r[t][e]=!0})))})),delete s[o]}(this.primaryType,{});for(const t in r){const n=Object.keys(r[t]);n.sort(),this._types[t]=xr(t,e[t])+n.map((t=>xr(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=Sr(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],n=this.getEncoder(e),r=parseInt(t[3]);return t=>{r>=0&&t.length!==r&&pr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(n);return this._types[e]&&(i=i.map(K)),K((0,u.xs)(i))}}const n=this.types[e];if(n){const t=he(this._types[e]);return e=>{const r=n.map((({name:t,type:n})=>{const r=this.getEncoder(n)(e[t]);return this._types[n]?K(r):r}));return r.unshift(t),(0,u.xs)(r)}}return pr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||pr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return K(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(Sr(e))return n(e,t);const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const e=r[1],i=parseInt(r[3]);return i>=0&&t.length!==i&&pr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,n)))}const i=this.types[e];return i?i.reduce(((e,{name:r,type:i})=>(e[r]=this._visit(i,t[r],n),e)),{}):pr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Cr(e)}static getPrimaryType(e){return Cr.from(e).primaryType}static hashStruct(e,t,n){return Cr.from(t).hashStruct(e,n)}static hashDomain(e){const t=[];for(const n in e){const r=_r[n];r||pr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:r})}return t.sort(((e,t)=>Er.indexOf(e.name)-Er.indexOf(t.name))),Cr.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return(0,u.xs)(["0x1901",Cr.hashDomain(e),Cr.from(t).hash(n)])}static hash(e,t,n){return K(Cr.encode(e,t,n))}static resolveNames(e,t,n,r){return i=this,o=void 0,a=function*(){e=O(e);const i={};e.verifyingContract&&!(0,u.A7)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Cr.from(t);o.visit(n,((e,t)=>("address"!==e||(0,u.A7)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield r(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:n}},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}l((a=a.apply(i,o||[])).next())}));var i,o,s,a}static getPayload(e,t,n){Cr.hashDomain(e);const r={},i=[];Er.forEach((t=>{const n=e[t];null!=n&&(r[t]=kr[t](n),i.push({name:t,type:_r[t]}))}));const o=Cr.from(t),s=O(t);return s.EIP712Domain?pr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=i,o.encode(n),{types:s,domain:r,primaryType:o.primaryType,message:o.visit(n,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,u.Dv)((0,u.lE)(t));if(e.match(/^u?int/))return b.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&pr.throwArgumentError("invalid string","value",t),t}return pr.throwArgumentError("unsupported type","type",e)}))}}}class Tr{constructor(e){S(this,"alphabet",e),S(this,"base",e.length),S(this,"_alphabetMap",{}),S(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=(0,u.lE)(e);if(0===t.length)return"";let n=[0];for(let e=0;e<t.length;++e){let r=t[e];for(let e=0;e<n.length;++e)r+=n[e]<<8,n[e]=r%this.base,r=r/this.base|0;for(;r>0;)n.push(r%this.base),r=r/this.base|0}let r="";for(let e=0;0===t[e]&&e<t.length-1;++e)r+=this._leader;for(let e=n.length-1;e>=0;--e)r+=this.alphabet[n[e]];return r}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let n=0;n<e.length;n++){let r=this._alphabetMap[e[n]];if(void 0===r)throw new Error("Non-base"+this.base+" character");let i=r;for(let e=0;e<t.length;++e)i+=t[e]*this.base,t[e]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(let n=0;e[n]===this._leader&&n<e.length-1;++n)t.push(0);return(0,u.lE)(new Uint8Array(t.reverse()))}}new Tr("abcdefghijklmnopqrstuvwxyz234567");const Or=new Tr("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var Rr;!function(e){e.sha256="sha256",e.sha512="sha512"}(Rr||(Rr={}));const Pr=new d.Yd("sha2/5.7.0");function Nr(e){return"0x"+Ct().ripemd160().update((0,u.lE)(e)).digest("hex")}function Lr(e){return"0x"+Ct().sha256().update((0,u.lE)(e)).digest("hex")}function Ir(e){return"0x"+Ct().sha512().update((0,u.lE)(e)).digest("hex")}function Br(e,t,n){return Rr[e]||Pr.throwError("unsupported algorithm "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+Ct().hmac(Ct()[e],(0,u.lE)(t)).update((0,u.lE)(n)).digest("hex")}function Dr(e,t,n,r,i){let o;e=(0,u.lE)(e),t=(0,u.lE)(t);let s=1;const a=new Uint8Array(r),l=new Uint8Array(t.length+4);let c,h;l.set(t);for(let d=1;d<=s;d++){l[t.length]=d>>24&255,l[t.length+1]=d>>16&255,l[t.length+2]=d>>8&255,l[t.length+3]=255&d;let f=(0,u.lE)(Br(i,e,l));o||(o=f.length,h=new Uint8Array(o),s=Math.ceil(r/o),c=r-(s-1)*o),h.set(f);for(let t=1;t<n;t++){f=(0,u.lE)(Br(i,e,f));for(let e=0;e<o;e++)h[e]^=f[e]}const p=(d-1)*o,m=d===s?c:o;a.set((0,u.lE)(h).slice(0,m),p)}return(0,u.Dv)(a)}const jr=new d.Yd("wordlists/5.7.0");class Fr{constructor(e){jr.checkAbstract(new.target,Fr),S(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let n=0;n<2048;n++){const r=e.getWord(n);if(n!==e.getWordIndex(r))return"0x";t.push(r)}return he(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let Ur=null;function qr(e){if(null==Ur&&(Ur="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==Fr.check(e)))throw Ur=null,new Error("BIP39 Wordlist for en (English) FAILED")}const zr=new class extends Fr{constructor(){super("en")}getWord(e){return qr(this),Ur[e]}getWordIndex(e){return qr(this),Ur.indexOf(e)}};Fr.register(zr);const Hr={en:zr},Kr=new d.Yd("hdnode/5.7.0"),Vr=b.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Wr=(0,ce.Y0)("Bitcoin seed"),$r=2147483648;function Yr(e){return(1<<e)-1<<8-e}function Gr(e){return(0,u.$m)((0,u.Dv)(e),32)}function Zr(e){return Or.encode((0,u.zo)([e,(0,u.p3)(Lr(Lr(e)),0,4)]))}function Qr(e){if(null==e)return Hr.en;if("string"==typeof e){const t=Hr[e];return null==t&&Kr.throwArgumentError("unknown locale","wordlist",e),t}return e}const Jr={},Xr="m/44'/60'/0'/0/0";class ei{constructor(e,t,n,r,i,o,s,a){if(e!==Jr)throw new Error("HDNode constructor cannot be called directly");if(t){const e=new mn(t);S(this,"privateKey",e.privateKey),S(this,"publicKey",e.compressedPublicKey)}else S(this,"privateKey",null),S(this,"publicKey",(0,u.Dv)(n));S(this,"parentFingerprint",r),S(this,"fingerprint",(0,u.p3)(Nr(Lr(this.publicKey)),0,4)),S(this,"address",Mn(this.publicKey)),S(this,"chainCode",i),S(this,"index",o),S(this,"depth",s),null==a?(S(this,"mnemonic",null),S(this,"path",null)):"string"==typeof a?(S(this,"mnemonic",null),S(this,"path",a)):(S(this,"mnemonic",a),S(this,"path",a.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Zr((0,u.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,u.Dv)(this.depth),this.parentFingerprint,(0,u.$m)((0,u.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,u.zo)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new ei(Jr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~$r));const n=new Uint8Array(37);if(e&$r){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set((0,u.lE)(this.privateKey),1),t&&(t+="'")}else n.set((0,u.lE)(this.publicKey));for(let t=24;t>=0;t-=8)n[33+(t>>3)]=e>>24-t&255;const r=(0,u.lE)(Br(Rr.sha512,this.chainCode,n)),i=r.slice(0,32),o=r.slice(32);let s=null,a=null;this.privateKey?s=Gr(b.from(i).add(this.privateKey).mod(Vr)):a=new mn((0,u.Dv)(i))._addPoint(this.publicKey);let l=t;const c=this.mnemonic;return c&&(l=Object.freeze({phrase:c.phrase,path:t,locale:c.locale||"en"})),new ei(Jr,s,a,this.fingerprint,Gr(o),e,this.depth+1,l)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let n=this;for(let e=0;e<t.length;e++){const r=t[e];if(r.match(/^[0-9]+'$/)){const e=parseInt(r.substring(0,r.length-1));if(e>=$r)throw new Error("invalid path index - "+r);n=n._derive($r+e)}else{if(!r.match(/^[0-9]+$/))throw new Error("invalid path component - "+r);{const e=parseInt(r);if(e>=$r)throw new Error("invalid path index - "+r);n=n._derive(e)}}}return n}static _fromSeed(e,t){const n=(0,u.lE)(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const r=(0,u.lE)(Br(Rr.sha512,Wr,n));return new ei(Jr,Gr(r.slice(0,32)),null,"0x00000000",Gr(r.slice(32)),0,0,t)}static fromMnemonic(e,t,n){return e=ri(ni(e,n=Qr(n)),n),ei._fromSeed(ti(e,t),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return ei._fromSeed(e,null)}static fromExtendedKey(e){const t=Or.decode(e);82===t.length&&Zr(t.slice(0,78))===e||Kr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=t[4],r=(0,u.Dv)(t.slice(5,9)),i=parseInt((0,u.Dv)(t.slice(9,13)).substring(2),16),o=(0,u.Dv)(t.slice(13,45)),s=t.slice(45,78);switch((0,u.Dv)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new ei(Jr,null,(0,u.Dv)(s),r,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new ei(Jr,(0,u.Dv)(s.slice(1)),null,r,o,i,n,null)}return Kr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function ti(e,t){t||(t="");const n=(0,ce.Y0)("mnemonic"+t,ce.Uj.NFKD);return Dr((0,ce.Y0)(e,ce.Uj.NFKD),n,2048,64,"sha512")}function ni(e,t){t=Qr(t),Kr.checkNormalize();const n=t.split(e);if(n.length%3!=0)throw new Error("invalid mnemonic");const r=(0,u.lE)(new Uint8Array(Math.ceil(11*n.length/8)));let i=0;for(let e=0;e<n.length;e++){let o=t.getWordIndex(n[e].normalize("NFKD"));if(-1===o)throw new Error("invalid mnemonic");for(let e=0;e<11;e++)o&1<<10-e&&(r[i>>3]|=1<<7-i%8),i++}const o=32*n.length/3,s=Yr(n.length/3);if(((0,u.lE)(Lr(r.slice(0,o/8)))[0]&s)!=(r[r.length-1]&s))throw new Error("invalid checksum");return(0,u.Dv)(r.slice(0,o/8))}function ri(e,t){if(t=Qr(t),(e=(0,u.lE)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const n=[0];let r=11;for(let t=0;t<e.length;t++)r>8?(n[n.length-1]<<=8,n[n.length-1]|=e[t],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=e[t]>>8-r,n.push(e[t]&(1<<8-r)-1),r+=3);const i=e.length/4,o=(0,u.lE)(Lr(e))[0]&Yr(i);return n[n.length-1]<<=i,n[n.length-1]|=o>>8-i,t.join(n.map((e=>t.getWord(e))))}function ii(e,t){try{return ni(e,t),!0}catch(e){}return!1}function oi(e){return("number"!=typeof e||e<0||e>=$r||e%1)&&Kr.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}const si=new d.Yd("random/5.7.0"),ai=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("unable to locate global object")}();let li=ai.crypto||ai.msCrypto;function ui(e){(e<=0||e>1024||e%1||e!=e)&&si.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return li.getRandomValues(t),(0,u.lE)(t)}li&&li.getRandomValues||(si.warn("WARNING: Missing strong random number source"),li={getRandomValues:function(e){return si.throwError("no secure random source avaialble",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var ci=n(8826),hi=n.n(ci),di=n(7635),fi=n.n(di);function pi(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,u.lE)(e)}function mi(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function gi(e){return"string"==typeof e?(0,ce.Y0)(e,ce.Uj.NFKC):(0,u.lE)(e)}function vi(e,t){let n=e;const r=t.toLowerCase().split("/");for(let e=0;e<r.length;e++){let t=null;for(const i in n)if(i.toLowerCase()===r[e]){t=n[i];break}if(null===t)return null;n=t}return n}function yi(e){const t=(0,u.lE)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;const n=(0,u.Dv)(t);return[n.substring(2,10),n.substring(10,14),n.substring(14,18),n.substring(18,22),n.substring(22,34)].join("-")}const bi="json-wallets/5.7.0";const wi=new d.Yd(bi);function Ai(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class _i extends I{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function Ei(e,t){const n=pi(vi(e,"crypto/ciphertext"));if((0,u.Dv)(K((0,u.zo)([t.slice(16,32),n]))).substring(2)!==vi(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const r=function(e,t,n){if("aes-128-ctr"===vi(e,"crypto/cipher")){const r=pi(vi(e,"crypto/cipherparams/iv")),i=new(hi().Counter)(r),o=new(hi().ModeOfOperation.ctr)(t,i);return(0,u.lE)(o.decrypt(n))}return null}(e,t.slice(0,16),n);r||wi.throwError("unsupported cipher",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=t.slice(32,64),o=Mn(r);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),oe(t)!==o)throw new Error("address mismatch")}const s={_isKeystoreAccount:!0,address:o,privateKey:(0,u.Dv)(r)};if("0.1"===vi(e,"x-ethers/version")){const t=pi(vi(e,"x-ethers/mnemonicCiphertext")),n=pi(vi(e,"x-ethers/mnemonicCounter")),r=new(hi().Counter)(n),o=new(hi().ModeOfOperation.ctr)(i,r),a=vi(e,"x-ethers/path")||Xr,l=vi(e,"x-ethers/locale")||"en",c=(0,u.lE)(o.decrypt(t));try{const e=ri(c,l),t=ei.fromMnemonic(e,null,l).derivePath(a);if(t.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=t.mnemonic}catch(e){if(e.code!==d.Yd.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e}}return new _i(s)}function Mi(e,t,n,r,i){return(0,u.lE)(Dr(e,t,n,r,i))}function ki(e,t,n,r,i){return Promise.resolve(Mi(e,t,n,r,i))}function Si(e,t,n,r,i){const o=gi(t),s=vi(e,"crypto/kdf");if(s&&"string"==typeof s){const t=function(e,t){return wi.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===s.toLowerCase()){const n=pi(vi(e,"crypto/kdfparams/salt")),a=parseInt(vi(e,"crypto/kdfparams/n")),l=parseInt(vi(e,"crypto/kdfparams/r")),u=parseInt(vi(e,"crypto/kdfparams/p"));a&&l&&u||t("kdf",s),0!=(a&a-1)&&t("N",a);const c=parseInt(vi(e,"crypto/kdfparams/dklen"));return 32!==c&&t("dklen",c),r(o,n,a,l,u,64,i)}if("pbkdf2"===s.toLowerCase()){const r=pi(vi(e,"crypto/kdfparams/salt"));let i=null;const s=vi(e,"crypto/kdfparams/prf");"hmac-sha256"===s?i="sha256":"hmac-sha512"===s?i="sha512":t("prf",s);const a=parseInt(vi(e,"crypto/kdfparams/c")),l=parseInt(vi(e,"crypto/kdfparams/dklen"));return 32!==l&&t("dklen",l),n(o,r,a,l,i)}}return wi.throwArgumentError("unsupported key-derivation function","kdf",s)}const xi=new d.Yd(bi);class Ci extends I{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function Ti(e,t){const n=JSON.parse(e);t=gi(t);const r=oe(vi(n,"ethaddr")),i=pi(vi(n,"encseed"));i&&i.length%16==0||xi.throwArgumentError("invalid encseed","json",e);const o=(0,u.lE)(Dr(t,t,2e3,32,"sha256")).slice(0,16),s=i.slice(0,16),a=i.slice(16),l=new(hi().ModeOfOperation.cbc)(o,s),c=hi().padding.pkcs7.strip((0,u.lE)(l.decrypt(a)));let h="";for(let e=0;e<c.length;e++)h+=String.fromCharCode(c[e]);const d=K((0,ce.Y0)(h));return new Ci({_isCrowdsaleAccount:!0,address:r,privateKey:d})}function Oi(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function Ri(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function Pi(e){if(Oi(e))try{return oe(JSON.parse(e).ethaddr)}catch(e){return null}if(Ri(e))try{return oe(JSON.parse(e).address)}catch(e){return null}return null}function Ni(e,t,n){if(Oi(e)){n&&n(0);const r=Ti(e,t);return n&&n(1),Promise.resolve(r)}return Ri(e)?function(e,t,n){return r=this,i=void 0,s=function*(){const r=JSON.parse(e);return Ei(r,yield Si(r,t,ki,fi().scrypt,n))},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,a)}l((s=s.apply(r,i||[])).next())}));var r,i,o,s}(e,t,n):Promise.reject(new Error("invalid JSON wallet"))}var Li=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Ii=new d.Yd("wallet/5.7.0");class Bi extends Et{constructor(e,t){if(super(),null!=(n=e)&&(0,u.A7)(n.privateKey,32)&&null!=n.address){const t=new mn(e.privateKey);if(S(this,"_signingKey",(()=>t)),S(this,"address",Mn(this.publicKey)),this.address!==oe(e.address)&&Ii.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;S(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||Xr,locale:t.locale||"en"})));const n=this.mnemonic;Mn(ei.fromMnemonic(n.phrase,null,n.locale).derivePath(n.path).privateKey)!==this.address&&Ii.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else S(this,"_mnemonic",(()=>null))}else{if(mn.isSigningKey(e))"secp256k1"!==e.curve&&Ii.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),S(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new mn(e);S(this,"_signingKey",(()=>t))}S(this,"_mnemonic",(()=>null)),S(this,"address",Mn(this.publicKey))}var n;t&&!yt.isProvider(t)&&Ii.throwArgumentError("invalid provider","provider",t),S(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Bi(this,e)}signTransaction(e){return C(e).then((t=>{null!=t.from&&(oe(t.from)!==this.address&&Ii.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const n=this._signingKey().signDigest(K(Pn(t)));return Pn(t,n)}))}signMessage(e){return Li(this,void 0,void 0,(function*(){return(0,u.gV)(this._signingKey().signDigest(dr(e)))}))}_signTypedData(e,t,n){return Li(this,void 0,void 0,(function*(){const r=yield Cr.resolveNames(e,t,n,(e=>(null==this.provider&&Ii.throwError("cannot resolve ENS names without a provider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,u.gV)(this._signingKey().signDigest(Cr.hash(r.domain,t,r.value)))}))}encrypt(e,t,n){if("function"!=typeof t||n||(n=t,t={}),n&&"function"!=typeof n)throw new Error("invalid callback");return t||(t={}),function(e,t,n,r){try{if(oe(e.address)!==Mn(e.privateKey))throw new Error("address/privateKey mismatch");if(Ai(e)){const t=e.mnemonic;if(ei.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||Xr).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof n||r||(r=n,n={}),n||(n={});const i=(0,u.lE)(e.privateKey),o=gi(t);let s=null,a=null,l=null;if(Ai(e)){const t=e.mnemonic;s=(0,u.lE)(ni(t.phrase,t.locale||"en")),a=t.path||Xr,l=t.locale||"en"}let c=n.client;c||(c="ethers.js");let h=null;h=n.salt?(0,u.lE)(n.salt):ui(32);let d=null;if(n.iv){if(d=(0,u.lE)(n.iv),16!==d.length)throw new Error("invalid iv")}else d=ui(16);let f=null;if(n.uuid){if(f=(0,u.lE)(n.uuid),16!==f.length)throw new Error("invalid uuid")}else f=ui(16);let p=1<<17,m=8,g=1;return n.scrypt&&(n.scrypt.N&&(p=n.scrypt.N),n.scrypt.r&&(m=n.scrypt.r),n.scrypt.p&&(g=n.scrypt.p)),fi().scrypt(o,h,p,m,g,64,r).then((t=>{const n=(t=(0,u.lE)(t)).slice(0,16),r=t.slice(16,32),o=t.slice(32,64),v=new(hi().Counter)(d),y=new(hi().ModeOfOperation.ctr)(n,v),b=(0,u.lE)(y.encrypt(i)),w=K((0,u.zo)([r,b])),A={address:e.address.substring(2).toLowerCase(),id:yi(f),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.Dv)(d).substring(2)},ciphertext:(0,u.Dv)(b).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.Dv)(h).substring(2),n:p,dklen:32,p:g,r:m},mac:w.substring(2)}};if(s){const e=ui(16),t=new(hi().Counter)(e),n=new(hi().ModeOfOperation.ctr)(o,t),r=(0,u.lE)(n.encrypt(s)),i=new Date,h=i.getUTCFullYear()+"-"+mi(i.getUTCMonth()+1,2)+"-"+mi(i.getUTCDate(),2)+"T"+mi(i.getUTCHours(),2)+"-"+mi(i.getUTCMinutes(),2)+"-"+mi(i.getUTCSeconds(),2)+".0Z";A["x-ethers"]={client:c,gethFilename:"UTC--"+h+"--"+A.address,mnemonicCounter:(0,u.Dv)(e).substring(2),mnemonicCiphertext:(0,u.Dv)(r).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(A)}))}(this,e,t,n)}static createRandom(e){let t=ui(16);e||(e={}),e.extraEntropy&&(t=(0,u.lE)((0,u.p3)(K((0,u.zo)([t,e.extraEntropy])),0,16)));const n=ri(t,e.locale);return Bi.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,t,n){return Ni(e,t,n).then((e=>new Bi(e)))}static fromEncryptedJsonSync(e,t){return new Bi(function(e,t){if(Oi(e))return Ti(e,t);if(Ri(e))return function(e,t){const n=JSON.parse(e);return Ei(n,Si(n,t,Mi,fi().syncScrypt))}(e,t);throw new Error("invalid JSON wallet")}(e,t))}static fromMnemonic(e,t,n){return t||(t=Xr),new Bi(ei.fromMnemonic(e,null,n).derivePath(t))}}function Di(e,t){return kn(dr(e),t)}function ji(e,t,n,r){return kn(Cr.hash(e,t,n),r)}const Fi="0x0000000000000000000000000000000000000000",Ui="0x0000000000000000000000000000000000000000000000000000000000000000",qi="Ξ",zi=new d.Yd("networks/5.7.1");function Hi(e){const t=function(t,n){null==n&&(n={});const r=[];if(t.InfuraProvider&&"-"!==n.infura)try{r.push(new t.InfuraProvider(e,n.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==n.etherscan)try{r.push(new t.EtherscanProvider(e,n.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==n.alchemy)try{r.push(new t.AlchemyProvider(e,n.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==n.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,n.pocket);o.network&&-1===i.indexOf(o.network.name)&&r.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==n.cloudflare)try{r.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==n.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,n.ankr);o.network&&-1===i.indexOf(o.network.name)&&r.push(o)}catch(e){}if(0===r.length)return null;if(t.FallbackProvider){let i=1;return null!=n.quorum?i=n.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(r,i)}return r[0]};return t.renetwork=function(e){return Hi(e)},t}function Ki(e,t){const n=function(n,r){return n.JsonRpcProvider?new n.JsonRpcProvider(e,t):null};return n.renetwork=function(t){return Ki(e,t)},n}const Vi={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Hi("homestead")},Wi={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Hi("ropsten")},$i={chainId:63,name:"classicMordor",_defaultProvider:Ki("https://www.ethercluster.com/mordor","classicMordor")},Yi={unspecified:{chainId:0,name:"unspecified"},homestead:Vi,mainnet:Vi,morden:{chainId:2,name:"morden"},ropsten:Wi,testnet:Wi,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Hi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Hi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Hi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Hi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Ki("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:$i,classicTestnet:$i,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ki("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Hi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Hi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function Gi(e){if(null==e)return null;if("number"==typeof e){for(const t in Yi){const n=Yi[t];if(n.chainId===e)return{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress||null,_defaultProvider:n._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=Yi[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=Yi[e.name];if(!t)return"number"!=typeof e.chainId&&zi.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&zi.throwArgumentError("network chainId mismatch","network",e);let n=e._defaultProvider||null;var r;return null==n&&t._defaultProvider&&(n=(r=t._defaultProvider)&&"function"==typeof r.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:n}}function Zi(e){e=atob(e);const t=[];for(let n=0;n<e.length;n++)t.push(e.charCodeAt(n));return(0,u.lE)(t)}function Qi(e){e=(0,u.lE)(e);let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ji(e,t){null==t&&(t=1);const n=[],r=n.forEach,i=function(e,t){r.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):n.push(e)}))};return i(e,t),n}function Xi(e){return 1&e?~e>>1:e>>1}function eo(e,t){let n=Array(e);for(let r=0,i=-1;r<e;r++)n[r]=i+=1+t();return n}function to(e,t){let n=Array(e);for(let r=0,i=0;r<e;r++)n[r]=i+=Xi(t());return n}function no(e,t){let n=eo(e(),e),r=e(),i=eo(r,e),o=function(e,t){let n=Array(e);for(let r=0;r<e;r++)n[r]=1+t();return n}(r,e);for(let e=0;e<r;e++)for(let t=0;t<o[e];t++)n.push(i[e]+t);return t?n.map((e=>t[e])):n}function ro(e,t,n){let r=Array(e).fill(void 0).map((()=>[]));for(let i=0;i<t;i++)to(e,n).forEach(((e,t)=>r[t].push(e)));return r}function io(e,t){let n=1+t(),r=t(),i=function(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(n)}return t}(t);return Ji(ro(i.length,1+e,t).map(((e,t)=>{const o=e[0],s=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*r;return[o+t*n,s.map((e=>e+i))]}))})))}function oo(e,t){return ro(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const so=function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function n(){return e[t++]<<8|e[t++]}let r=n(),i=1,o=[0,1];for(let e=1;e<r;e++)o.push(i+=n());let s=n(),a=t;t+=s;let l=0,u=0;function c(){return 0==l&&(u=u<<8|e[t++],l=8),u>>--l&1}const h=Math.pow(2,31),d=h>>>1,f=d>>1,p=h-1;let m=0;for(let e=0;e<31;e++)m=m<<1|c();let g=[],v=0,y=h;for(;;){let e=Math.floor(((m-v+1)*i-1)/y),t=0,n=r;for(;n-t>1;){let r=t+n>>>1;e<o[r]?n=r:t=r}if(0==t)break;g.push(t);let s=v+Math.floor(y*o[t]/i),a=v+Math.floor(y*o[t+1]/i)-1;for(;0==((s^a)&d);)m=m<<1&p|c(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&f;)m=m&d|m<<1&p>>>1|c(),s=s<<1^d,a=(a^d)<<1|d|1;v=s,y=1+a-s}let b=r-4;return g.map((t=>{switch(t-b){case 3:return b+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return b+256+(e[a++]<<8|e[a++]);case 1:return b+e[a++];default:return t-1}}))}(Zi("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))),ao=new Set(no(so)),lo=new Set(no(so)),uo=function(e){let t=[];for(;;){let n=e();if(0==n)break;t.push(io(n,e))}for(;;){let n=e()-1;if(n<0)break;t.push(oo(n,e))}return function(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[r[0]]=r[1]}return t}(Ji(t))}(so),co=function(e){let t=no(e).sort(((e,t)=>e-t));return function n(){let r=[];for(;;){let i=no(e,t);if(0==i.length)break;r.push({set:new Set(i),node:n()})}r.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:r,valid:o,fe0f:s,save:1==i,check:2==i}}()}(so),ho=45,fo=95;function po(e){return(0,ce.XL)(e)}function mo(e){return e.filter((e=>65039!=e))}function go(e){for(let t of e.split(".")){let e=po(t);try{for(let t=e.lastIndexOf(fo)-1;t>=0;t--)if(e[t]!==fo)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===ho&&e[3]===ho)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function vo(e,t){var n;let r,i,o=co,s=[],a=e.length;for(t&&(t.length=0);a;){let l=e[--a];if(o=null===(n=o.branches.find((e=>e.set.has(l))))||void 0===n?void 0:n.node,!o)break;if(o.save)i=l;else if(o.check&&l===i)break;s.push(l),o.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),o.valid&&(r=s.slice(),2==o.valid&&r.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return r}const yo=new d.Yd(fr),bo=new Uint8Array(32);function wo(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function Ao(e){const t=(0,ce.Y0)(function(e){return go(function(e,t){let n=po(e).reverse(),r=[];for(;n.length;){let e=vo(n);if(e){r.push(...t(e));continue}let i=n.pop();if(ao.has(i)){r.push(i);continue}if(lo.has(i))continue;let o=uo[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);r.push(...o)}return go(String.fromCodePoint(...r).normalize("NFC"))}(e,mo))}(e)),n=[];if(0===e.length)return n;let r=0;for(let e=0;e<t.length;e++)46===t[e]&&(n.push(wo(t.slice(r,e))),r=e+1);if(r>=t.length)throw new Error("invalid ENS name; empty component");return n.push(wo(t.slice(r))),n}function _o(e){try{return 0!==Ao(e).length}catch(e){}return!1}function Eo(e){"string"!=typeof e&&yo.throwArgumentError("invalid ENS name; not a string","name",e);let t=bo;const n=Ao(e);for(;n.length;)t=K((0,u.zo)([t,K(n.pop())]));return(0,u.Dv)(t)}function Mo(e){return(0,u.Dv)((0,u.zo)(Ao(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}bo.fill(0);var ko=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};function So(e,t){return ko(this,void 0,void 0,(function*(){null==t&&(t={});const n={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(n.mode="cors",n.cache="no-cache",n.credentials="same-origin",n.redirect="follow",n.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(n.mode=e.mode),e.cache&&(n.cache=e.cache),e.credentials&&(n.credentials=e.credentials),e.redirect&&(n.redirect=e.redirect),e.referrer&&(n.referrer=e.referrer)}const r=yield fetch(e,n),i=yield r.arrayBuffer(),o={};return r.headers.forEach?r.headers.forEach(((e,t)=>{o[t.toLowerCase()]=e})):r.headers.keys().forEach((e=>{o[e.toLowerCase()]=r.headers.get(e)})),{headers:o,statusCode:r.status,statusMessage:r.statusText,body:(0,u.lE)(new Uint8Array(i))}}))}var xo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Co=new d.Yd("web/5.7.1");function To(e){return new Promise((t=>{setTimeout(t,e)}))}function Oo(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,u.Zq)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,ce.ZN)(e)}catch(e){}return(0,u.Dv)(e)}return e}function Ro(e,t,n){const r="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;Co.assertArgument(r>0&&r%1==0,"invalid connection throttle limit","connection.throttleLimit",r);const i="object"==typeof e?e.throttleCallback:null,o="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;Co.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s="object"==typeof e&&!!e.errorPassThrough,a={};let l=null;const u={method:"GET"};let c=!1,h=12e4;if("string"==typeof e)l=e;else if("object"==typeof e){if(null!=e&&null!=e.url||Co.throwArgumentError("missing URL","connection.url",e),l=e.url,"number"==typeof e.timeout&&e.timeout>0&&(h=e.timeout),e.headers)for(const t in e.headers)a[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(c=!0);if(u.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==l.substring(0,6)&&!0!==e.allowInsecureAuthentication&&Co.throwError("basic authentication requires a secure https url",d.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+Qi((0,ce.Y0)(t))}}null!=e.skipFetchSetup&&(u.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(u.fetchOptions=O(e.fetchOptions))}const f=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),p=l?l.match(f):null;if(p)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":p[1]||"text/plain"},body:p[2]?Zi(p[3]):(m=p[3],(0,ce.Y0)(m.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return n&&(t=n(e.body,e)),Promise.resolve(t)}catch(e){Co.throwError("processing response error",d.Yd.errors.SERVER_ERROR,{body:Oo(p[1],p[2]),error:e,requestBody:null,requestMethod:"GET",url:l})}var m;t&&(u.method="POST",u.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));const g={};Object.keys(a).forEach((e=>{const t=a[e];g[t.key]=t.value})),u.headers=g;const v=function(){let e=null;return{promise:new Promise((function(t,n){h&&(e=setTimeout((()=>{null!=e&&(e=null,n(Co.makeError("timeout",d.Yd.errors.TIMEOUT,{requestBody:Oo(u.body,g["content-type"]),requestMethod:u.method,timeout:h,url:l})))}),h))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),y=function(){return xo(this,void 0,void 0,(function*(){for(let e=0;e<r;e++){let t=null;try{if(t=yield So(l,u),e<r)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===u.method&&e.match(/^https:/)){l=t.headers.location;continue}}else if(429===t.statusCode){let n=!0;if(i&&(n=yield i(e,l)),n){let n=0;const r=t.headers["retry-after"];n="string"==typeof r&&r.match(/^[1-9][0-9]*$/)?1e3*parseInt(r):o*parseInt(String(Math.random()*Math.pow(2,e))),yield To(n);continue}}}catch(e){t=e.response,null==t&&(v.cancel(),Co.throwError("missing response",d.Yd.errors.SERVER_ERROR,{requestBody:Oo(u.body,g["content-type"]),requestMethod:u.method,serverError:e,url:l}))}let a=t.body;if(c&&304===t.statusCode?a=null:!s&&(t.statusCode<200||t.statusCode>=300)&&(v.cancel(),Co.throwError("bad response",d.Yd.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:Oo(a,t.headers?t.headers["content-type"]:null),requestBody:Oo(u.body,g["content-type"]),requestMethod:u.method,url:l})),n)try{const e=yield n(a,t);return v.cancel(),e}catch(n){if(n.throttleRetry&&e<r){let t=!0;if(i&&(t=yield i(e,l)),t){const t=o*parseInt(String(Math.random()*Math.pow(2,e)));yield To(t);continue}}v.cancel(),Co.throwError("processing response error",d.Yd.errors.SERVER_ERROR,{body:Oo(a,t.headers?t.headers["content-type"]:null),error:n,requestBody:Oo(u.body,g["content-type"]),requestMethod:u.method,url:l})}return v.cancel(),a}return Co.throwError("failed response",d.Yd.errors.SERVER_ERROR,{requestBody:Oo(u.body,g["content-type"]),requestMethod:u.method,url:l})}))}();return Promise.race([v.promise,y])}function Po(e,t,n){let r=null;if(null!=t){r=(0,ce.Y0)(t);const n="string"==typeof e?{url:e}:O(e);n.headers?0!==Object.keys(n.headers).filter((e=>"content-type"===e.toLowerCase())).length||(n.headers=O(n.headers),n.headers["content-type"]="application/json"):n.headers={"content-type":"application/json"},e=n}return Ro(e,r,((e,t)=>{let r=null;if(null!=e)try{r=JSON.parse((0,ce.ZN)(e))}catch(t){Co.throwError("invalid JSON",d.Yd.errors.SERVER_ERROR,{body:e,error:t})}return n&&(r=n(r,t)),r}))}function No(e,t){return t||(t={}),null==(t=O(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(n,r){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{s()&&r(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let l=0;!function i(){return e().then((function(e){if(void 0!==e)s()&&n(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(l++,l>a)return void(s()&&r(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,l)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){s()&&r(e)}))}()}))}var Lo=n(2882),Io=n.n(Lo);const Bo="providers/5.7.2",Do=new d.Yd(Bo);class jo{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),n=this.bigNumber.bind(this),r=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),l=this.type.bind(this);return e.transaction={hash:o,type:l,accessList:jo.allowNull(this.accessList.bind(this),null),blockHash:jo.allowNull(o,null),blockNumber:jo.allowNull(a,null),transactionIndex:jo.allowNull(a,null),confirmations:jo.allowNull(a,null),from:t,gasPrice:jo.allowNull(n),maxPriorityFeePerGas:jo.allowNull(n),maxFeePerGas:jo.allowNull(n),gasLimit:n,to:jo.allowNull(t,null),value:n,nonce:a,data:i,r:jo.allowNull(this.uint256),s:jo.allowNull(this.uint256),v:jo.allowNull(a),creates:jo.allowNull(t,null),raw:jo.allowNull(i)},e.transactionRequest={from:jo.allowNull(t),nonce:jo.allowNull(a),gasLimit:jo.allowNull(n),gasPrice:jo.allowNull(n),maxPriorityFeePerGas:jo.allowNull(n),maxFeePerGas:jo.allowNull(n),to:jo.allowNull(t),value:jo.allowNull(n),data:jo.allowNull((e=>this.data(e,!0))),type:jo.allowNull(a),accessList:jo.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:o,address:t,topics:jo.arrayOf(o),data:i,logIndex:a,blockHash:o},e.receipt={to:jo.allowNull(this.address,null),from:jo.allowNull(this.address,null),contractAddress:jo.allowNull(t,null),transactionIndex:a,root:jo.allowNull(s),gasUsed:n,logsBloom:jo.allowNull(i),blockHash:o,transactionHash:o,logs:jo.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:jo.allowNull(a,null),cumulativeGasUsed:n,effectiveGasPrice:jo.allowNull(n),status:jo.allowNull(a),type:l},e.block={hash:jo.allowNull(o),parentHash:o,number:a,timestamp:a,nonce:jo.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:jo.allowNull(t),extraData:i,transactions:jo.allowNull(jo.arrayOf(o)),baseFeePerGas:jo.allowNull(n)},e.blockWithTransactions=O(e.block),e.blockWithTransactions.transactions=jo.allowNull(jo.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:jo.allowNull(r,void 0),toBlock:jo.allowNull(r,void 0),blockHash:jo.allowNull(o,void 0),address:jo.allowNull(t,void 0),topics:jo.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:jo.allowNull(a),blockHash:jo.allowNull(o),transactionIndex:a,removed:jo.allowNull(this.boolean.bind(this)),address:t,data:jo.allowFalsish(i,"0x"),topics:jo.arrayOf(o),transactionHash:o,logIndex:a},e}accessList(e){return Cn(e||[])}number(e){return"0x"===e?0:b.from(e).toNumber()}type(e){return"0x"===e||null==e?0:b.from(e).toNumber()}bigNumber(e){return b.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,u.A7)(e))?e.toLowerCase():Do.throwArgumentError("invalid hash","value",e)}data(e,t){const n=this.hex(e,t);if(n.length%2!=0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return oe(e)}callAddress(e){if(!(0,u.A7)(e,32))return null;const t=oe((0,u.p3)(e,12));return t===Fi?null:t}contractAddress(e){return le(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,u.A7)(e))return(0,u.$P)(e);throw new Error("invalid blockTag")}hash(e,t){const n=this.hex(e,t);return 32!==(0,u.E1)(n)?Do.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(null==e)return null;const t=b.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,u.A7)(e))throw new Error("invalid uint256");return(0,u.$m)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const n=null!=e._difficulty?e._difficulty:e.difficulty,r=jo.check(t,e);return r._difficulty=null==n?null:b.from(n),r}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return jo.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&b.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=jo.check(this.formats.transaction,e);if(null!=e.chainId){let n=e.chainId;(0,u.A7)(n)&&(n=b.from(n).toNumber()),t.chainId=n}else{let n=e.networkId;null==n&&null==t.v&&(n=e.chainId),(0,u.A7)(n)&&(n=b.from(n).toNumber()),"number"!=typeof n&&null!=t.v&&(n=(t.v-35)/2,n<0&&(n=0),n=parseInt(n)),"number"!=typeof n&&(n=0),t.chainId=n}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return Ln(e)}receiptLog(e){return jo.check(this.formats.receiptLog,e)}receipt(e){const t=jo.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=b.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&Do.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):Do.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&Do.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return jo.check(this.formats.filter,e)}filterLog(e){return jo.check(this.formats.filterLog,e)}static check(e,t){const n={};for(const r in e)try{const i=e[r](t[r]);void 0!==i&&(n[r]=i)}catch(e){throw e.checkKey=r,e.checkValue=t[r],e}return n}static allowNull(e,t){return function(n){return null==n?t:e(n)}}static allowFalsish(e,t){return function(n){return n?e(n):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const n=[];return t.forEach((function(t){n.push(e(t))})),n}}}function Fo(e){return e&&"function"==typeof e.isCommunityResource}function Uo(e){return Fo(e)&&e.isCommunityResource()}let qo=!1;function zo(){qo||(qo=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Ho=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Ko=new d.Yd(Bo);function Vo(e){return null==e?"null":(32!==(0,u.E1)(e)&&Ko.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Wo(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[Vo(e)]=!0}));const n=Object.keys(t);return n.sort(),n.join("|")}return Vo(e)})).join("&")}function $o(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,u.E1)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Wo(e);if(vt.isForkEvent(e))throw Ko.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+Wo(e.topics||[])}throw new Error("invalid event - "+e)}function Yo(){return(new Date).getTime()}function Go(e){return new Promise((t=>{setTimeout(t,e)}))}const Zo=["block","network","pending","poll"];class Qo{constructor(e,t,n){S(this,"tag",e),S(this,"listener",t),S(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],n=""===(r=e[2])?[]:r.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var r;const i={};return n.length>0&&(i.topics=n),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Zo.indexOf(this.tag)>=0}}const Jo={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Xo(e){return(0,u.$m)(b.from(e).toHexString(),32)}function es(e){return Or.encode((0,u.zo)([e,(0,u.p3)(Lr(Lr(e)),0,4)]))}const ts=new RegExp("^(ipfs)://(.*)$","i"),ns=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ts,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function rs(e,t){try{return(0,ce.ZN)(is(e,t))}catch(e){}return null}function is(e,t){if("0x"===e)return null;const n=b.from((0,u.p3)(e,t,t+32)).toNumber(),r=b.from((0,u.p3)(e,n,n+32)).toNumber();return(0,u.p3)(e,n+32,n+32+r)}function os(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Ko.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function ss(e){const t=(0,u.lE)(e);if(t.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(t,32-t.length),n}function as(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function ls(e){const t=[];let n=0;for(let r=0;r<e.length;r++)t.push(null),n+=32;for(let r=0;r<e.length;r++){const i=(0,u.lE)(e[r]);t[r]=ss(n),t.push(ss(i.length)),t.push(as(i)),n+=32+32*Math.ceil(i.length/32)}return(0,u.xs)(t)}class us{constructor(e,t,n,r){S(this,"provider",e),S(this,"name",n),S(this,"address",e.formatter.address(t)),S(this,"_resolvedAddress",r)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>b.from(e).eq(1))).catch((e=>{if(e.code===d.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return Ho(this,void 0,void 0,(function*(){const n={to:this.address,ccipReadEnabled:!0,data:(0,u.xs)([e,Eo(this.name),t||"0x"])};let r=!1;(yield this.supportsWildcard())&&(r=!0,n.data=(0,u.xs)(["0x9061b923",ls([Mo(this.name),n.data])]));try{let e=yield this.provider.call(n);return(0,u.lE)(e).length%32==4&&Ko.throwError("resolver threw error",d.Yd.errors.CALL_EXCEPTION,{transaction:n,data:e}),r&&(e=is(e,0)),e}catch(e){if(e.code===d.Yd.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return Ho(this,void 0,void 0,(function*(){const n=yield this._fetch(e,t);return null!=n?is(n,0):null}))}_getAddress(e,t){const n=Jo[String(e)];if(null==n&&Ko.throwError(`unsupported coin type: ${e}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===n.ilk)return this.provider.formatter.address(t);const r=(0,u.lE)(t);if(null!=n.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return es((0,u.zo)([[n.p2pkh],"0x"+e[2]]))}}if(null!=n.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return es((0,u.zo)([[n.p2sh],"0x"+e[2]]))}}if(null!=n.prefix){const e=r[1];let t=r[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&r.length===2+e&&e>=1&&e<=75){const e=Io().toWords(r.slice(2));return e.unshift(t),Io().encode(n.prefix,e)}}return null}getAddress(e){return Ho(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===Ui?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===d.Yd.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",Xo(e));if(null==t||"0x"===t)return null;const n=this._getAddress(e,t);return null==n&&Ko.throwError("invalid or unsupported coin data",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),n}))}getAvatar(){return Ho(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let n=0;n<ns.length;n++){const r=t.match(ns[n]);if(null==r)continue;const i=r[1].toLowerCase();switch(i){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:os(t)};case"erc721":case"erc1155":{const n="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});const o=this._resolvedAddress||(yield this.getAddress()),s=(r[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),l=(0,u.$m)(b.from(s[1]).toHexString(),32);if("erc721"===i){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:(0,u.xs)(["0x6352211e",l])}));if(o!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){const t=b.from(yield this.provider.call({to:a,data:(0,u.xs)(["0x00fdd58e",(0,u.$m)(o,32),l])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const c={to:this.provider.formatter.address(s[0]),data:(0,u.xs)([n,l])};let h=rs(yield this.provider.call(c),0);if(null==h)return null;e.push({type:"metadata-url-base",content:h}),"erc1155"===i&&(h=h.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:h})),h.match(/^ipfs:/i)&&(h=os(h)),e.push({type:"metadata-url",content:h});const d=yield Po(h);if(!d)return null;e.push({type:"metadata",content:JSON.stringify(d)});let f=d.image;if("string"!=typeof f)return null;if(f.match(/^(https:\/\/|data:)/i));else{if(null==f.match(ts))return null;e.push({type:"url-ipfs",content:f}),f=os(f)}return e.push({type:"url",content:f}),{linkage:e,url:f}}}}}catch(e){}return null}))}getContentHash(){return Ho(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+Or.encode("0x"+t[1])}const n=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(n){const e=parseInt(n[3],16);if(n[4].length===2*e)return"ipns://"+Or.encode("0x"+n[1])}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return"bzz://"+r[1];const i=e.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+Qi("0x"+i[1]).replace(/[=+\/]/g,(t=>e[t]))}return Ko.throwError("invalid or unsupported content hash data",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return Ho(this,void 0,void 0,(function*(){let t=(0,ce.Y0)(e);t=(0,u.zo)([Xo(64),Xo(t.length),t]),t.length%32!=0&&(t=(0,u.zo)([t,(0,u.$m)("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",(0,u.Dv)(t));return null==n||"0x"===n?null:(0,ce.ZN)(n)}))}}let cs=null,hs=1;class ds extends yt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),S(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=x(new.target,"getNetwork")(e);t?(S(this,"_network",t),this.emit("network",t,null)):Ko.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Ho(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||Ko.throwError("no network detected",d.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:S(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return No((()=>this._ready().then((e=>e),(e=>{if(e.code!==d.Yd.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==cs&&(cs=new jo),cs}static getNetwork(e){return Gi(null==e?"homestead":e)}ccipReadFetch(e,t,n){return Ho(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===n.length)return null;const r=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e<n.length;e++){const t=n[e],s=t.replace("{sender}",r).replace("{data}",i),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:r}),l=yield Po({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(l.data)return l.data;const u=l.message||"unknown error";if(l.status>=400&&l.status<500)return Ko.throwError(`response not found during CCIP fetch: ${u}`,d.Yd.errors.SERVER_ERROR,{url:t,errorMessage:u});o.push(u)}return Ko.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,d.Yd.errors.SERVER_ERROR,{urls:n,errorMessages:o})}))}_getInternalBlockNumber(e){return Ho(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const n=yield t;if(Yo()-n.respTime<=e)return n.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=Yo(),n=C({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:r})=>{if(r)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),r;const i=Yo();return(e=b.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:i}}));return this._internalBlockNumber=n,n.catch((e=>{this._internalBlockNumber===n&&(this._internalBlockNumber=null)})),(yield n).blockNumber}))}poll(){return Ho(this,void 0,void 0,(function*(){const e=hs++,t=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ko.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ko.makeError("network block skew detected",d.Yd.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let e=this._emitted.block+1;e<=n;e++)this.emit("block",e);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&n-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((e=>{switch(e.type){case"tx":{const n=e.hash;let r=this.getTransactionReceipt(n).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+n]=e.blockNumber,this.emit(n,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(r);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=n-1);const r=e.filter;r.fromBlock=e._lastBlockNumber+1,r.toBlock=n;const i=r.toBlock-this._maxFilterBlockRange;i>r.fromBlock&&(r.fromBlock=i),r.fromBlock<0&&(r.fromBlock=0);const o=this.getLogs(r).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(r,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=n,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Ho(this,void 0,void 0,(function*(){return Ko.throwError("provider does not support network detection",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return Ho(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Go(0),this._network;const n=Ko.makeError("underlying network changed",d.Yd.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",n),n}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=Yo();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=Yo(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,n){return Ho(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,n||0,null)}))}_waitForTransaction(e,t,n,r){return Ho(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const s=[];let a=!1;const l=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},u=e=>{e.confirmations<t||l()||i(e)};if(this.on(e,u),s.push((()=>{this.removeListener(e,u)})),r){let n=r.startBlock,i=null;const u=s=>Ho(this,void 0,void 0,(function*(){a||(yield Go(1e3),this.getTransactionCount(r.from).then((c=>Ho(this,void 0,void 0,(function*(){if(!a){if(c<=r.nonce)n=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=n-3,i<r.startBlock&&(i=r.startBlock));i<=s;){if(a)return;const n=yield this.getBlockWithTransactions(i);for(let i=0;i<n.transactions.length;i++){const s=n.transactions[i];if(s.hash===e)return;if(s.from===r.from&&s.nonce===r.nonce){if(a)return;const n=yield this.waitForTransaction(s.hash,t);if(l())return;let i="replaced";return s.data===r.data&&s.to===r.to&&s.value.eq(r.value)?i="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(i="cancelled"),void o(Ko.makeError("transaction was replaced",d.Yd.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(s),hash:e,receipt:n}))}}i++}}a||this.once("block",u)}}))),(e=>{a||this.once("block",u)})))}));if(a)return;this.once("block",u),s.push((()=>{this.removeListener("block",u)}))}if("number"==typeof n&&n>0){const e=setTimeout((()=>{l()||o(Ko.makeError("timeout exceeded",d.Yd.errors.TIMEOUT,{timeout:n}))}),n);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return Ho(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return b.from(e)}catch(t){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield C({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getBalance",n);try{return b.from(r)}catch(e){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"getBalance",params:n,result:r,error:e})}}))}getTransactionCount(e,t){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield C({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getTransactionCount",n);try{return b.from(r).toNumber()}catch(e){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:r,error:e})}}))}getCode(e,t){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield C({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),r=yield this.perform("getCode",n);try{return(0,u.Dv)(r)}catch(e){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"getCode",params:n,result:r,error:e})}}))}getStorageAt(e,t,n){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield C({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then((e=>(0,u.$P)(e)))}),i=yield this.perform("getStorageAt",r);try{return(0,u.Dv)(i)}catch(e){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:r,result:i,error:e})}}))}_wrapTransaction(e,t,n){if(null!=t&&32!==(0,u.E1)(t))throw new Error("invalid response - sendTransaction");const r=e;return null!=t&&e.hash!==t&&Ko.throwError("Transaction hash mismatch from Provider.sendTransaction.",d.Yd.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=(t,r)=>Ho(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==r&&(r=0),0!==t&&null!=n&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const o=yield this._waitForTransaction(e.hash,t,r,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&Ko.throwError("transaction failed",d.Yd.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),r}sendTransaction(e){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,u.Dv)(e))),n=this.formatter.transaction(e);null==n.confirmations&&(n.confirmations=0);const r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(n,e,r)}catch(e){throw e.transaction=n,e.transactionHash=n.hash,e}}))}_getTransactionRequest(e){return Ho(this,void 0,void 0,(function*(){const t=yield e,n={};return["from","to"].forEach((e=>{null!=t[e]&&(n[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(n[e]=Promise.resolve(t[e]).then((e=>e?b.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(n[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(n.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(n[e]=Promise.resolve(t[e]).then((e=>e?(0,u.Dv)(e):null)))})),this.formatter.transactionRequest(yield C(n))}))}_getFilter(e){return Ho(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((n=>{null!=e[n]&&(t[n]=e[n])})),["fromBlock","toBlock"].forEach((n=>{null!=e[n]&&(t[n]=this._getBlockTag(e[n]))})),this.formatter.filter(yield C(t))}))}_call(e,t,n){return Ho(this,void 0,void 0,(function*(){n>=10&&Ko.throwError("CCIP read exceeded maximum redirections",d.Yd.errors.SERVER_ERROR,{redirects:n,transaction:e});const r=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(n>=0&&"latest"===t&&null!=r&&"0x556f1830"===i.substring(0,10)&&(0,u.E1)(i)%32==4)try{const o=(0,u.p3)(i,4),s=(0,u.p3)(o,0,32);b.from(s).eq(r)||Ko.throwError("CCIP Read sender did not match",d.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const a=[],l=b.from((0,u.p3)(o,32,64)).toNumber(),c=b.from((0,u.p3)(o,l,l+32)).toNumber(),h=(0,u.p3)(o,l+32);for(let t=0;t<c;t++){const n=rs(h,32*t);null==n&&Ko.throwError("CCIP Read contained corrupt URL string",d.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i}),a.push(n)}const f=is(o,64);b.from((0,u.p3)(o,100,128)).isZero()||Ko.throwError("CCIP Read callback selector included junk",d.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const p=(0,u.p3)(o,96,100),m=is(o,128),g=yield this.ccipReadFetch(e,f,a);null==g&&Ko.throwError("CCIP Read disabled or provided no URLs",d.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const v={to:r,data:(0,u.xs)([p,ls([g,m])])};return this._call(v,t,n+1)}catch(e){if(e.code===d.Yd.errors.SERVER_ERROR)throw e}try{return(0,u.Dv)(i)}catch(n){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:i,error:n})}}))}call(e,t){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield C({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1)}))}estimateGas(e){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield C({transaction:this._getTransactionRequest(e)}),n=yield this.perform("estimateGas",t);try{return b.from(n)}catch(e){return Ko.throwError("bad result from backend",d.Yd.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:n,error:e})}}))}_getAddress(e){return Ho(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&Ko.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&Ko.throwError("ENS name not configured",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let n=-128;const r={includeTransactions:!!t};if((0,u.A7)(e,32))r.blockHash=e;else try{r.blockTag=yield this._getBlockTag(e),(0,u.A7)(r.blockTag)&&(n=parseInt(r.blockTag.substring(2),16))}catch(t){Ko.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return No((()=>Ho(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",r);if(null==e)return null!=r.blockHash&&null==this._emitted["b:"+r.blockHash]||null!=r.blockTag&&n>this._emitted.block?null:void 0;if(t){let t=null;for(let n=0;n<e.transactions.length;n++){const r=e.transactions[n];if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-r.blockNumber+1;e<=0&&(e=1),r.confirmations=e}}const n=this.formatter.blockWithTransactions(e);return n.transactions=n.transactions.map((e=>this._wrapTransaction(e))),n}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return No((()=>Ho(this,void 0,void 0,(function*(){const n=yield this.perform("getTransaction",t);if(null==n)return null==this._emitted["t:"+e]?null:void 0;const r=this.formatter.transactionResponse(n);if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;e<=0&&(e=1),r.confirmations=e}return this._wrapTransaction(r)}))),{oncePoll:this})}))}getTransactionReceipt(e){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return No((()=>Ho(this,void 0,void 0,(function*(){const n=yield this.perform("getTransactionReceipt",t);if(null==n)return null==this._emitted["t:"+e]?null:void 0;if(null==n.blockHash)return;const r=this.formatter.receipt(n);if(null==r.blockNumber)r.confirmations=0;else if(null==r.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-r.blockNumber+1;e<=0&&(e=1),r.confirmations=e}return r}))),{oncePoll:this})}))}getLogs(e){return Ho(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield C({filter:this._getFilter(e)}),n=yield this.perform("getLogs",t);return n.forEach((e=>{null==e.removed&&(e.removed=!1)})),jo.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)}))}getEtherPrice(){return Ho(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return Ho(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Ko.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return Ho(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const n=yield this._getResolver(t,"getResolver");if(null!=n){const r=new us(this,n,e);return t===e||(yield r.supportsWildcard())?r:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return Ho(this,void 0,void 0,(function*(){null==t&&(t="ENS");const n=yield this.getNetwork();n.ensAddress||Ko.throwError("network does not support ENS",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name});try{const t=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Eo(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return Ho(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,u.A7)(e))throw t}"string"!=typeof e&&Ko.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return Ho(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(t,"lookupAddress");if(null==n)return null;const r=rs(yield this.call({to:n,data:"0x691f3431"+Eo(t).substring(2)}),0);return(yield this.resolveName(r))!=e?null:r}))}getAvatar(e){return Ho(this,void 0,void 0,(function*(){let t=null;if((0,u.A7)(e)){const n=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(n,"getAvatar");if(!r)return null;t=new us(this,r,n);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==d.Yd.errors.CALL_EXCEPTION)throw e}try{const e=rs(yield this.call({to:r,data:"0x691f3431"+Eo(n).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==d.Yd.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const n=yield t.getAvatar();return null==n?null:n.url}))}perform(e,t){return Ko.throwError(e+" not implemented",d.Yd.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,n){const r=new Qo($o(e),t,n);return this._events.push(r),this._startEvent(r),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let n=!1,r=[],i=$o(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),n=!0,!e.once||(r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),n}listenerCount(e){if(!e)return this._events.length;let t=$o(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=$o(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const n=[];let r=!1,i=$o(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||!!r||(r=!0,n.push(e),!1))),n.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const n=$o(e);this._events=this._events.filter((e=>e.tag!==n||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var fs=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const ps=new d.Yd(Bo),ms=["call","estimateGas"];function gs(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const n=(0,u.A7)(e.data)?e.data:null;if(!t||n)return{message:e.message,data:n}}if("object"==typeof e){for(const n in e){const r=gs(e[n],t);if(r)return r}return null}if("string"==typeof e)try{return gs(JSON.parse(e),t)}catch(e){}return null}function vs(e,t,n){const r=n.transaction||n.signedTransaction;if("call"===e){const e=gs(t,!0);if(e)return e.data;ps.throwError("missing revert data in call exception; Transaction reverted without a reason string",d.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:r,error:t})}if("estimateGas"===e){let n=gs(t.body,!1);null==n&&(n=gs(t,!1)),n&&ps.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:n.message,method:e,transaction:r,error:t})}let i=t.message;throw t.code===d.Yd.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&ps.throwError("insufficient funds for intrinsic transaction cost",d.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),i.match(/nonce (is )?too low/i)&&ps.throwError("nonce has already been used",d.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&ps.throwError("replacement fee too low",d.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),i.match(/only replay-protected/i)&&ps.throwError("legacy pre-eip-155 transactions not supported",d.Yd.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:r}),ms.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&ps.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}function ys(e){return new Promise((function(t){setTimeout(t,e)}))}function bs(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function ws(e){return e?e.toLowerCase():e}const As={};class _s extends Et{constructor(e,t,n){if(super(),e!==As)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");S(this,"provider",t),null==n&&(n=0),"string"==typeof n?(S(this,"_address",this.provider.formatter.address(n)),S(this,"_index",null)):"number"==typeof n?(S(this,"_index",n),S(this,"_address",null)):ps.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return ps.throwError("cannot alter JSON-RPC Signer connection",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Es(As,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&ps.throwError("unknown account #"+this._index,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=O(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const n=O(e);n.from=t,e.gasLimit=this.provider.estimateGas(n)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>fs(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&ps.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),C({tx:C(e),sender:t}).then((({tx:t,sender:n})=>{null!=t.from?t.from.toLowerCase()!==n&&ps.throwArgumentError("from address mismatch","transaction",e):t.from=n;const r=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[r]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&ps.throwError("user rejected transaction",d.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),vs("sendTransaction",e,r))))}))}signTransaction(e){return ps.throwError("signing transactions is unsupported",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return fs(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield No((()=>fs(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(n);if(null!==e)return this.provider._wrapTransaction(e,n,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=n,e}}))}signMessage(e){return fs(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,ce.Y0)(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,u.Dv)(t),n.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&ps.throwError("user rejected signing",d.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),t}}))}_legacySignMessage(e){return fs(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,ce.Y0)(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),(0,u.Dv)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&ps.throwError("user rejected signing",d.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),t}}))}_signTypedData(e,t,n){return fs(this,void 0,void 0,(function*(){const r=yield Cr.resolveNames(e,t,n,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Cr.getPayload(r.domain,t,r.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&ps.throwError("user rejected signing",d.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:r.domain,types:t,value:r.value}}),e}}))}unlock(e){return fs(this,void 0,void 0,(function*(){const t=this.provider,n=yield this.getAddress();return t.send("personal_unlockAccount",[n.toLowerCase(),e,null])}))}}class Es extends _s{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const Ms={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ks extends ds{constructor(e,t){let n=t;null==n&&(n=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(n),e||(e=x(this.constructor,"defaultUrl")()),S(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(O(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return fs(this,void 0,void 0,(function*(){yield ys(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=x(this.constructor,"getNetwork");try{return t(b.from(e).toNumber())}catch(t){return ps.throwError("could not detect network",d.Yd.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return ps.throwError("could not detect network",d.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new _s(As,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:L(n),provider:this});const r=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(r&&this._cache[e])return this._cache[e];const i=Po(this.connection,JSON.stringify(n),bs).then((e=>(this.emit("debug",{action:"response",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:n,provider:this}),e}));return r&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ws(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ws(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ws(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ws(t.address),(0,u.$m)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[x(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[x(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=ws(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return fs(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&b.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const n=yield this.getFeeData();null==n.maxFeePerGas&&null==n.maxPriorityFeePerGas&&((t=O(t)).transaction=O(e),delete t.transaction.type)}}const n=this.prepareRequest(e,t);null==n&&ps.throwError(e+" not implemented",d.Yd.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(n){return vs(e,n,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(n){return function r(){e.send("eth_getFilterChanges",[n]).then((function(n){if(e._pendingFilter!=t)return null;let r=Promise.resolve();return n.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",r=r.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),r.then((function(){return ys(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){r()}),0),null;e.send("eth_uninstallFilter",[n])})).catch((e=>{}))}(),n})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const n=O(Ms);if(t)for(const e in t)t[e]&&(n[e]=!0);T(e,n);const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const n=(0,u.$P)(b.from(e[t]));"gasLimit"===t&&(t="gas"),r[t]=n})),["from","to","data"].forEach((function(t){null!=e[t]&&(r[t]=(0,u.Dv)(e[t]))})),e.accessList&&(r.accessList=Cn(e.accessList)),r}}let Ss=null;try{if(Ss=WebSocket,null==Ss)throw new Error("inject please")}catch(e){const t=new d.Yd(Bo);Ss=function(){t.throwError("WebSockets not supported in this environment",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var xs=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Cs=new d.Yd(Bo);let Ts=1;class Os extends ks{constructor(e,t){"any"===t&&Cs.throwError("WebSocketProvider does not support 'any' network yet",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,S(this,"_websocket","string"==typeof e?new Ss(this.connection.url):e),S(this,"_requests",{}),S(this,"_subs",{}),S(this,"_subIds",{}),S(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,n=JSON.parse(t);if(null!=n.id){const e=String(n.id),r=this._requests[e];if(delete this._requests[e],void 0!==n.result)r.callback(null,n.result),this.emit("debug",{action:"response",request:JSON.parse(r.payload),response:n.result,provider:this});else{let e=null;n.error?(e=new Error(n.error.message||"unknown error"),S(e,"code",n.error.code||null),S(e,"response",t)):e=new Error("unknown error"),r.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(r.payload),provider:this})}}else if("eth_subscription"===n.method){const e=this._subs[n.params.subscription];e&&e.processFunc(n.params.result)}else console.warn("this should not happen")};const n=setInterval((()=>{this.emit("poll")}),1e3);n.unref&&n.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){Cs.throwError("cannot reset events block on WebSocketProvider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Cs.throwError("cannot set polling interval on WebSocketProvider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return xs(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&Cs.throwError("cannot set polling on WebSocketProvider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const n=Ts++;return new Promise(((r,i)=>{const o=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(n)]={callback:function(e,t){return e?i(e):r(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,n){return xs(this,void 0,void 0,(function*(){let r=this._subIds[e];null==r&&(r=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=r);const i=yield r;this._subs[i]={tag:e,processFunc:n}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=b.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const n=this._subIds[t];n&&(delete this._subIds[t],n.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return xs(this,void 0,void 0,(function*(){this.websocket.readyState===Ss.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}const Rs=new d.Yd(Bo);class Ps extends ks{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return t=this,n=void 0,i=function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||Rs.throwError("no network detected",d.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(S(this,"_network",t),this.emit("network",t,null))),t},new((r=void 0)||(r=Promise))((function(e,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(s,a)}l((i=i.apply(t,n||[])).next())}));var t,n,r,i}}class Ns extends Ps{constructor(e,t){Rs.checkAbstract(new.target,Ns),e=x(new.target,"getNetwork")(e),t=x(new.target,"getApiKey")(t),super(x(new.target,"getUrl")(e,t),e),"string"==typeof t?S(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{S(this,e,t[e])}))}_startPending(){Rs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return Rs.throwError("API provider does not support signing",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return Rs.throwError("not implemented; sub-classes must override getUrl",d.Yd.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const Ls=new d.Yd(Bo),Is="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class Bs extends Os{constructor(e,t){const n=new Ds(e,t);super(n.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),n.network),S(this,"apiKey",n.apiKey)}isCommunityResource(){return this.apiKey===Is}}class Ds extends Ns{static getWebSocketProvider(e,t){return new Bs(e,t)}static getApiKey(e){return null==e?Is:(e&&"string"!=typeof e&&Ls.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.g.alchemy.com/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:Ls.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:(e,n)=>(t===Is&&zo(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Is}}const js=new d.Yd(Bo),Fs="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Us(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return js.throwArgumentError("unsupported network","name",e)}class qs extends Ns{isCommunityResource(){return this.apiKey===Fs}static getApiKey(e){return null==e?Fs:e}static getUrl(e,t){null==t&&(t=Fs);const n={allowGzip:!0,url:"https://"+Us(e.name)+t,throttleCallback:(e,n)=>(t.apiKey===Fs&&zo(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}}const zs=new d.Yd(Bo);class Hs extends Ns{static getApiKey(e){return null!=e&&zs.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let n=null;return"homestead"===e.name?n="https://cloudflare-eth.com/":zs.throwArgumentError("unsupported network","network",arguments[0]),n}perform(e,t){const n=Object.create(null,{perform:{get:()=>super.perform}});return r=this,i=void 0,s=function*(){return"getBlockNumber"===e?(yield n.perform.call(this,"getBlock",{blockTag:"latest"})).number:n.perform.call(this,e,t)},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,a)}l((s=s.apply(r,i||[])).next())}));var r,i,o,s}}var Ks=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const Vs=new d.Yd(Bo);function Ws(e){const t={};for(let n in e){if(null==e[n])continue;let r=e[n];"type"===n&&0===r||(r={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[n]?(0,u.$P)((0,u.Dv)(r)):"accessList"===n?"["+Cn(r).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,u.Dv)(r),t[n]=r)}return t}function $s(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Ys(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function Gs(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function Zs(e,t,n){if("call"===e&&t.code===d.Yd.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let n=e.data;if(n&&(n="0x"+n.replace(/^.*0x/i,"")),(0,u.A7)(n))return n;Vs.throwError("missing revert data in call exception",d.Yd.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let r=t.message;throw t.code===d.Yd.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?r=t.error.message:"string"==typeof t.body?r=t.body:"string"==typeof t.responseText&&(r=t.responseText)),r=(r||"").toLowerCase(),r.match(/insufficient funds/)&&Vs.throwError("insufficient funds for intrinsic transaction cost",d.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),r.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Vs.throwError("nonce has already been used",d.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),r.match(/another transaction with same nonce/)&&Vs.throwError("replacement fee too low",d.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),r.match(/execution failed due to an exception|execution reverted/)&&Vs.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",d.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}class Qs extends ds{constructor(e,t){super(e),S(this,"baseUrl",this.getBaseUrl()),S(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Vs.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const n=Object.keys(t).reduce(((e,n)=>{const r=t[n];return null!=r&&(e+=`&${n}=${r}`),e}),""),r=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${n}${r}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,n){return Ks(this,void 0,void 0,(function*(){const r=n?this.getPostUrl():this.getUrl(e,t),i=n?this.getPostData(e,t):null,o="proxy"===e?Ys:$s;this.emit("debug",{action:"request",request:r,provider:this});const s={url:r,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&zo(),Promise.resolve(!0))};let a=null;i&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},a=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const l=yield Po(s,a,o||Ys);return this.emit("debug",{action:"response",request:r,response:L(l),provider:this}),l}))}detectNetwork(){return Ks(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const n=Object.create(null,{perform:{get:()=>super.perform}});return Ks(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>Zs("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=Ws(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return Zs("call",e,t.transaction)}}case"estimateGas":{const e=Ws(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return Zs("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=Gs(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=Gs(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Vs.throwError("unsupported topic count",d.Yd.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const n=t.filter.topics[0];"string"==typeof n&&66===n.length||Vs.throwError("unsupported topic format",d.Yd.errors.UNSUPPORTED_OPERATION,{topic0:n}),e.topic0=n}const n=yield this.fetch("logs",e);let r={};for(let e=0;e<n.length;e++){const t=n[e];if(null==t.blockHash){if(null==r[t.blockNumber]){const e=yield this.getBlock(t.blockNumber);e&&(r[t.blockNumber]=e.hash)}t.blockHash=r[t.blockNumber]}}return n}case"getEtherPrice":return"homestead"!==this.network.name?0:parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return n.perform.call(this,e,t)}))}getHistory(e,t,n){return Ks(this,void 0,void 0,(function*(){const r={action:"txlist",address:yield this.resolveName(e),startblock:null==t?0:t,endblock:null==n?99999999:n,sort:"asc"};return(yield this.fetch("account",r)).map((e=>{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}function Js(e){for(let t=(e=e.slice()).length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}var Xs=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const ea=new d.Yd(Bo);function ta(){return(new Date).getTime()}function na(e){let t=null;for(let n=0;n<e.length;n++){const r=e[n];if(null==r)return null;t?t.name===r.name&&t.chainId===r.chainId&&(t.ensAddress===r.ensAddress||null==t.ensAddress&&null==r.ensAddress)||ea.throwArgumentError("provider mismatch","networks",e):t=r}return t}function ra(e,t){e=e.slice().sort();const n=Math.floor(e.length/2);if(e.length%2)return e[n];const r=e[n-1],i=e[n];return null!=t&&Math.abs(r-i)>t?null:(r+i)/2}function ia(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(b.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>ia(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let n=e[t];return n="function"==typeof n?"[function]":ia(n),JSON.stringify(t)+":"+n})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let oa=1;function sa(e){let t=null,n=null,r=new Promise((r=>{t=function(){n&&(clearTimeout(n),n=null),r()},n=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return r},wait:e=>(r=r.then(e),r)}}const aa=[d.Yd.errors.CALL_EXCEPTION,d.Yd.errors.INSUFFICIENT_FUNDS,d.Yd.errors.NONCE_EXPIRED,d.Yd.errors.REPLACEMENT_UNDERPRICED,d.Yd.errors.UNPREDICTABLE_GAS_LIMIT],la=["address","args","errorArgs","errorSignature","method","transaction"];function ua(e,t){const n={weight:e.weight};return Object.defineProperty(n,"provider",{get:()=>e.provider}),e.start&&(n.start=e.start),t&&(n.duration=t-e.start),e.done&&(e.error?n.error=e.error:n.result=e.result||null),n}function ca(e,t){return Xs(this,void 0,void 0,(function*(){const n=e.provider;return null!=n.blockNumber&&n.blockNumber>=t||-1===t?n:No((()=>new Promise(((r,i)=>{setTimeout((function(){return n.blockNumber>=t?r(n):e.cancelled?r(null):r(void 0)}),0)}))),{oncePoll:n})}))}function ha(e,t,n,r){return Xs(this,void 0,void 0,(function*(){let i=e.provider;switch(n){case"getBlockNumber":case"getGasPrice":return i[n]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return r.blockTag&&(0,u.A7)(r.blockTag)&&(i=yield ca(e,t)),i[n](r.address,r.blockTag||"latest");case"getStorageAt":return r.blockTag&&(0,u.A7)(r.blockTag)&&(i=yield ca(e,t)),i.getStorageAt(r.address,r.position,r.blockTag||"latest");case"getBlock":return r.blockTag&&(0,u.A7)(r.blockTag)&&(i=yield ca(e,t)),i[r.includeTransactions?"getBlockWithTransactions":"getBlock"](r.blockTag||r.blockHash);case"call":case"estimateGas":return r.blockTag&&(0,u.A7)(r.blockTag)&&(i=yield ca(e,t)),"call"===n&&r.blockTag?i[n](r.transaction,r.blockTag):i[n](r.transaction);case"getTransaction":case"getTransactionReceipt":return i[n](r.transactionHash);case"getLogs":{let n=r.filter;return(n.fromBlock&&(0,u.A7)(n.fromBlock)||n.toBlock&&(0,u.A7)(n.toBlock))&&(i=yield ca(e,t)),i.getLogs(n)}}return ea.throwError("unknown method error",d.Yd.errors.UNKNOWN_ERROR,{method:n,params:r})}))}class da extends ds{constructor(e,t){0===e.length&&ea.throwArgumentError("missing providers","providers",e);const n=e.map(((e,t)=>{if(yt.isProvider(e)){const t=Uo(e)?2e3:750,n=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:n})}const n=O(e);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=Uo(e)?2e3:750),null==n.weight&&(n.weight=1);const r=n.weight;return(r%1||r>512||r<1)&&ea.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,r),Object.freeze(n)})),r=n.reduce(((e,t)=>e+t.weight),0);null==t?t=r/2:t>r&&ea.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let i=na(n.map((e=>e.provider.network)));null==i&&(i=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(i),S(this,"providerConfigs",Object.freeze(n)),S(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Xs(this,void 0,void 0,(function*(){return na(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return Xs(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;t<e.length;t++){const n=e[t];if("string"==typeof n)return n}throw e[0]}-1===this._highestBlockNumber&&"getBlockNumber"!==e&&(yield this.getBlockNumber());const n=function(e,t,n){let r=ia;switch(t){case"getBlockNumber":return function(t){const n=t.map((e=>e.result));let r=ra(t.map((e=>e.result)),2);if(null!=r)return r=Math.ceil(r),n.indexOf(r+1)>=0&&r++,r>=e._highestBlockNumber&&(e._highestBlockNumber=r),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return ra(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":r=function(e){return null==e?null:((e=O(e)).confirmations=-1,ia(e))};break;case"getBlock":r=n.includeTransactions?function(e){return null==e?null:((e=O(e)).transactions=e.transactions.map((e=>((e=O(e)).confirmations=-1,e))),ia(e))}:function(e){return null==e?null:ia(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(n){const r={};n.forEach((t=>{const n=e(t.result);r[n]||(r[n]={count:0,result:t.result}),r[n].count++}));const i=Object.keys(r);for(let e=0;e<i.length;e++){const n=r[i[e]];if(n.count>=t)return n.result}}}(r,e.quorum)}(this,e,t),r=Js(this.providerConfigs.map(O));r.sort(((e,t)=>e.priority-t.priority));const i=this._highestBlockNumber;let o=0,s=!0;for(;;){const a=ta();let l=r.filter((e=>e.runner&&a-e.start<e.stallTimeout)).reduce(((e,t)=>e+t.weight),0);for(;l<this.quorum&&o<r.length;){const n=r[o++],s=oa++;n.start=ta(),n.staller=sa(n.stallTimeout),n.staller.wait((()=>{n.staller=null})),n.runner=ha(n,i,e,t).then((r=>{n.done=!0,n.result=r,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ua(n,ta()),request:{method:e,params:L(t)},provider:this})}),(r=>{n.done=!0,n.error=r,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ua(n,ta()),request:{method:e,params:L(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:ua(n,null),request:{method:e,params:L(t)},provider:this}),l+=n.weight}const u=[];r.forEach((e=>{!e.done&&e.runner&&(u.push(e.runner),e.staller&&u.push(e.staller.getPromise()))})),u.length&&(yield Promise.race(u));const c=r.filter((e=>e.done&&null==e.error));if(c.length>=this.quorum){const e=n(c);if(void 0!==e)return r.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;s||(yield sa(100).getPromise()),s=!1}const h=r.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const n=t.error.code;return aa.indexOf(n)>=0&&(e[n]||(e[n]={error:t.error,weight:0}),e[n].weight+=t.weight),e}),{});if(Object.keys(h).forEach((e=>{const t=h[e];if(t.weight<this.quorum)return;r.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0}));const n=t.error,i={};la.forEach((e=>{null!=n[e]&&(i[e]=n[e])})),ea.throwError(n.reason||n.message,e,i)})),0===r.filter((e=>!e.done)).length)break}return r.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),ea.throwError("failed to meet quorum",d.Yd.errors.SERVER_ERROR,{method:e,params:t,results:r.map((e=>ua(e))),provider:this})}))}}const fa=null,pa=new d.Yd(Bo),ma="84842078b09946638c03157f83405213";class ga extends Os{constructor(e,t){const n=new va(e,t),r=n.connection;r.password&&pa.throwError("INFURA WebSocket project secrets unsupported",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"}),super(r.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),S(this,"apiKey",n.projectId),S(this,"projectId",n.projectId),S(this,"projectSecret",n.projectSecret)}isCommunityResource(){return this.projectId===ma}}class va extends Ns{static getWebSocketProvider(e,t){return new ga(e,t)}static getApiKey(e){const t={apiKey:ma,projectId:ma,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(pa.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),pa.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"homestead":n="mainnet.infura.io";break;case"goerli":n="goerli.infura.io";break;case"sepolia":n="sepolia.infura.io";break;case"matic":n="polygon-mainnet.infura.io";break;case"maticmum":n="polygon-mumbai.infura.io";break;case"optimism":n="optimism-mainnet.infura.io";break;case"optimism-goerli":n="optimism-goerli.infura.io";break;case"arbitrum":n="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":n="arbitrum-goerli.infura.io";break;default:pa.throwError("unsupported network",d.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const r={allowGzip:!0,url:"https://"+n+"/v3/"+t.projectId,throttleCallback:(e,n)=>(t.projectId===ma&&zo(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}isCommunityResource(){return this.projectId===ma}}class ya extends ks{send(e,t){const n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((e,t)=>{r.resolve=e,r.reject=t}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:L(t),provider:this}),Po(this.connection,JSON.stringify(t)).then((n=>{this.emit("debug",{action:"response",request:t,response:n,provider:this}),e.forEach(((e,t)=>{const r=n[t];if(r.error){const t=new Error(r.error.message);t.code=r.error.code,t.data=r.error.data,e.reject(t)}else e.resolve(r.result)}))}),(n=>{this.emit("debug",{action:"response",error:n,request:t,provider:this}),e.forEach((e=>{e.reject(n)}))}))}),10)),i}}const ba=new d.Yd(Bo);class wa extends Ns{static getApiKey(e){return e&&"string"!=typeof e&&ba.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){ba.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let n=null;switch(e.name){case"homestead":n="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":n="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":n="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":n="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":n="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:ba.throwArgumentError("unsupported network","network",arguments[0])}return n+"?apiKey="+t}}const Aa=new d.Yd(Bo),_a="62e1ad51b37b8e00394bda3b";class Ea extends Ns{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=_a:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Aa.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let n=null;switch(e?e.name:"unknown"){case"goerli":n="eth-goerli.gateway.pokt.network";break;case"homestead":n="eth-mainnet.gateway.pokt.network";break;case"kovan":n="poa-kovan.gateway.pokt.network";break;case"matic":n="poly-mainnet.gateway.pokt.network";break;case"maticmum":n="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":n="eth-rinkeby.gateway.pokt.network";break;case"ropsten":n="eth-ropsten.gateway.pokt.network";break;default:Aa.throwError("unsupported network",d.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const r={headers:{},url:`https://${n}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(r.user="",r.password=t.applicationSecretKey),r}isCommunityResource(){return this.applicationId===_a}}const Ma=new d.Yd(Bo);let ka=1;function Sa(e,t){const n="Web3LegacyFetcher";return function(e,r){const i={method:e,params:r,id:ka++,jsonrpc:"2.0"};return new Promise(((e,r)=>{this.emit("debug",{action:"request",fetcher:n,request:L(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:n,error:t,request:i,provider:this}),r(t);if(this.emit("debug",{action:"response",fetcher:n,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,r(e)}e(o.result)}))}))}}class xa extends ks{constructor(e,t){null==e&&Ma.throwArgumentError("missing provider","provider",e);let n=null,r=null,i=null;"function"==typeof e?(n="unknown:",r=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(""===n&&(n="eip-1193:"),r=function(e){return function(t,n){null==n&&(n=[]);const r={method:t,params:n};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:L(r),provider:this}),e.request(r).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,error:e,provider:this}),e}))}}(e)):e.sendAsync?r=Sa(0,e.sendAsync.bind(e)):e.send?r=Sa(0,e.send.bind(e)):Ma.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,t),S(this,"jsonRpcFetchFunc",r),S(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const Ca=new d.Yd(Bo);function Ta(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new ks(e);case"ws":case"wss":return new Os(e);default:Ca.throwArgumentError("unsupported URL scheme","network",e)}}const n=Gi(e);return n&&n._defaultProvider||Ca.throwError("unsupported getDefaultProvider network",d.Yd.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),n._defaultProvider({FallbackProvider:da,AlchemyProvider:Ds,AnkrProvider:qs,CloudflareProvider:Hs,EtherscanProvider:Qs,InfuraProvider:va,JsonRpcProvider:ks,NodesmithProvider:wa,PocketProvider:Ea,Web3Provider:xa,IpcProvider:fa},t)}const Oa=new RegExp("^bytes([0-9]+)$"),Ra=new RegExp("^(u?int)([0-9]*)$"),Pa=new RegExp("^(.*)\\[([0-9]*)\\]$"),Na="0000000000000000000000000000000000000000000000000000000000000000",La=new d.Yd("solidity/5.7.0");function Ia(e,t,n){switch(e){case"address":return n?(0,u.Bu)(t,32):(0,u.lE)(t);case"string":return(0,ce.Y0)(t);case"bytes":return(0,u.lE)(t);case"bool":return t=t?"0x01":"0x00",n?(0,u.Bu)(t,32):(0,u.lE)(t)}let r=e.match(Ra);if(r){let i=parseInt(r[2]||"256");return(r[2]&&String(i)!==r[2]||i%8!=0||0===i||i>256)&&La.throwArgumentError("invalid number type","type",e),n&&(i=256),t=b.from(t).toTwos(i),(0,u.Bu)(t,i/8)}if(r=e.match(Oa),r){const i=parseInt(r[1]);return(String(i)!==r[1]||0===i||i>32)&&La.throwArgumentError("invalid bytes type","type",e),(0,u.lE)(t).byteLength!==i&&La.throwArgumentError(`invalid value for ${e}`,"value",t),n?(0,u.lE)((t+Na).substring(0,66)):t}if(r=e.match(Pa),r&&Array.isArray(t)){const n=r[1];parseInt(r[2]||String(t.length))!=t.length&&La.throwArgumentError(`invalid array length for ${e}`,"value",t);const i=[];return t.forEach((function(e){i.push(Ia(n,e,!0))})),(0,u.zo)(i)}return La.throwArgumentError("invalid type","type",e)}function Ba(e,t){e.length!=t.length&&La.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const n=[];return e.forEach((function(e,r){n.push(Ia(e,t[r]))})),(0,u.Dv)((0,u.zo)(n))}function Da(e,t){return K(Ba(e,t))}function ja(e,t){return Lr(Ba(e,t))}function Fa(e,t){t||(t=function(e){return[parseInt(e,16)]});let n=0,r={};return e.split(",").forEach((e=>{let i=e.split(":");n+=parseInt(i[0],16),r[n]=t(i[1])})),r}function Ua(e){let t=0;return e.split(",").map((e=>{let n=e.split("-");1===n.length?n[1]="0":""===n[1]&&(n[1]="1");let r=t+parseInt(n[0],16);return t=parseInt(n[1],16),{l:r,h:t}}))}function qa(e,t){let n=0;for(let r=0;r<t.length;r++){let i=t[r];if(n+=i.l,e>=n&&e<=n+i.h&&(e-n)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-n))continue;return i}}return null}const za=Ua("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Ha="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Ka=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Va=Fa("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Wa=Fa("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),$a=Fa("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let n=0;n<e.length;n+=4)t.push(parseInt(e.substring(n,n+4),16));return t})),Ya=Ua("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function Ga(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=(0,ce.XL)(e);var n;n=t.map((e=>{if(Ha.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=qa(e,Ka);if(t)return[e+t.s];let n=Va[e];if(n)return n;let r=Wa[e];return r?[e+r[0]]:$a[e]||null}(e);return t||[e]})),t=n.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,ce.XL)((0,ce.uu)(t),ce.Uj.NFKC),t.forEach((e=>{if(qa(e,Ya))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(qa(e,za))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let r=(0,ce.uu)(t);if("-"===r.substring(0,1)||"--"===r.substring(2,4)||"-"===r.substring(r.length-1))throw new Error("invalid hyphen");return r}function Za(e){const t=(0,ce.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,u.Dv)((0,u.zo)([t,Ui]).slice(0,32))}function Qa(e){const t=(0,u.lE)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let n=31;for(;0===t[n-1];)n--;return(0,ce.ZN)(t.slice(0,n))}const Ja=new d.Yd("units/5.7.0"),Xa=["wei","kwei","mwei","gwei","szabo","finney","ether"];function el(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Ja.throwArgumentError("invalid value","value",e);let n=t[0],r="";for("-"===n.substring(0,1)&&(r="-",n=n.substring(1));"0"===n.substring(0,1);)n=n.substring(1);""===n&&(n="0");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;n.length;){if(n.length<=3){o.unshift(n);break}{const e=n.length-3;o.unshift(n.substring(e)),n=n.substring(0,e)}}return r+o.join(",")+i}function tl(e,t){if("string"==typeof t){const e=Xa.indexOf(t);-1!==e&&(t=3*e)}return or(e,null!=t?t:18)}function nl(e,t){if("string"!=typeof e&&Ja.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=Xa.indexOf(t);-1!==e&&(t=3*e)}return sr(e,null!=t?t:18)}function rl(e){return tl(e,18)}function il(e){return nl(e,18)}const ol="ethers/5.7.2",sl=new d.Yd(ol);try{const e=window;null==e._ethers&&(e._ethers=l)}catch(e){}},1474:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:()=>bt,Sortable:()=>Ue,Swap:()=>lt,default:()=>_t});var c=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),h=u(/Edge/i),d=u(/firefox/i),f=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),p=u(/iP(ad|od|hone)/i),m=u(/chrome/i)&&u(/android/i),g={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!c&&g)}function y(e,t,n){e.removeEventListener(t,n,!c&&g)}function b(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function w(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function A(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&b(e,t):b(e,t))||r&&e===n)return e;if(e===n)break}while(e=w(e))}return null}var _,E=/\s+/g;function M(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(E," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(E," ")}}function k(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function S(e,t){var n="";if("string"==typeof e)n=e;else do{var r=k(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function x(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function C(){return document.scrollingElement||document.documentElement}function T(e,t,n,r,i){if(e.getBoundingClientRect||e===window){var o,s,a,l,u,h,d;if(e!==window&&e.parentNode&&e!==C()?(s=(o=e.getBoundingClientRect()).top,a=o.left,l=o.bottom,u=o.right,h=o.height,d=o.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,h=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!c))do{if(i&&i.getBoundingClientRect&&("none"!==k(i,"transform")||n&&"static"!==k(i,"position"))){var f=i.getBoundingClientRect();s-=f.top+parseInt(k(i,"border-top-width")),a-=f.left+parseInt(k(i,"border-left-width")),l=s+o.height,u=a+o.width;break}}while(i=i.parentNode);if(r&&e!==window){var p=S(i||e),m=p&&p.a,g=p&&p.d;p&&(l=(s/=g)+(h/=g),u=(a/=m)+(d/=m))}return{top:s,left:a,bottom:l,right:u,width:d,height:h}}}function O(e,t,n){for(var r=I(e,!0),i=T(e)[t];r;){var o=T(r)[n];if(!("top"===n||"left"===n?i>=o:i<=o))return r;if(r===C())break;r=I(r,!1)}return!1}function R(e,t,n,r){for(var i=0,o=0,s=e.children;o<s.length;){if("none"!==s[o].style.display&&s[o]!==Ue.ghost&&(r||s[o]!==Ue.dragged)&&A(s[o],n.draggable,e,!1)){if(i===t)return s[o];i++}o++}return null}function P(e,t){for(var n=e.lastElementChild;n&&(n===Ue.ghost||"none"===k(n,"display")||t&&!b(n,t));)n=n.previousElementSibling;return n||null}function N(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ue.clone||t&&!b(e,t)||n++;return n}function L(e){var t=0,n=0,r=C();if(e)do{var i=S(e),o=i.a,s=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*s}while(e!==r&&(e=e.parentNode));return[t,n]}function I(e,t){if(!e||!e.getBoundingClientRect)return C();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=k(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return C();if(r||t)return n;r=!0}}}while(n=n.parentNode);return C()}function B(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function D(e,t){return function(){if(!_){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),_=setTimeout((function(){_=void 0}),t)}}}function j(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function F(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function U(e,t){k(e,"position","absolute"),k(e,"top",t.top),k(e,"left",t.left),k(e,"width",t.width),k(e,"height",t.height)}function q(e){k(e,"position",""),k(e,"top",""),k(e,"left",""),k(e,"width",""),k(e,"height","")}var z="Sortable"+(new Date).getTime();var H=[],K={initializeByDefault:!0},V={mount:function(e){for(var t in K)K.hasOwnProperty(t)&&!(t in e)&&(e[t]=K[t]);H.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),H.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=e+"Global";H.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][o]&&t[r.pluginName][o](i({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](i({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var i in H.forEach((function(r){var i=r.pluginName;if(e.options[i]||r.initializeByDefault){var o=new r(e,t,e.options);o.sortable=e,o.options=e.options,e[i]=o,a(n,o.defaults)}})),e.options)if(e.options.hasOwnProperty(i)){var o=this.modifyOption(e,i,e.options[i]);void 0!==o&&(e.options[i]=o)}},getEventProperties:function(e,t){var n={};return H.forEach((function(r){"function"==typeof r.eventProperties&&a(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return H.forEach((function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(r=i.optionListeners[t].call(e[i.pluginName],n))})),r}};function W(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,s=e.cloneEl,a=e.toEl,l=e.fromEl,u=e.oldIndex,d=e.newIndex,f=e.oldDraggableIndex,p=e.newDraggableIndex,m=e.originalEvent,g=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[z]){var y,b=t.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||c||h?(y=document.createEvent("Event")).initEvent(r,!0,!0):y=new CustomEvent(r,{bubbles:!0,cancelable:!0}),y.to=a||n,y.from=l||n,y.item=o||n,y.clone=s,y.oldIndex=u,y.newIndex=d,y.oldDraggableIndex=f,y.newDraggableIndex=p,y.originalEvent=m,y.pullMode=g?g.lastPutMode:void 0;var A=i(i({},v),V.getEventProperties(r,t));for(var _ in A)y[_]=A[_];n&&n.dispatchEvent(y),b[w]&&b[w].call(t,y)}}var $=["evt"],Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,$);V.pluginEvent.bind(Ue)(e,t,i({dragEl:Z,parentEl:Q,ghostEl:J,rootEl:X,nextEl:ee,lastDownEl:te,cloneEl:ne,cloneHidden:re,dragStarted:ge,putSortable:ue,activeSortable:Ue.active,originalEvent:r,oldIndex:ie,oldDraggableIndex:se,newIndex:oe,newDraggableIndex:ae,hideGhostForTarget:Be,unhideGhostForTarget:De,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){G({sortable:t,name:e,originalEvent:r})}},o))};function G(e){W(i({putSortable:ue,cloneEl:ne,targetEl:Z,rootEl:X,oldIndex:ie,oldDraggableIndex:se,newIndex:oe,newDraggableIndex:ae},e))}var Z,Q,J,X,ee,te,ne,re,ie,oe,se,ae,le,ue,ce,he,de,fe,pe,me,ge,ve,ye,be,we,Ae=!1,_e=!1,Ee=[],Me=!1,ke=!1,Se=[],xe=!1,Ce=[],Te="undefined"!=typeof document,Oe=p,Re=h||c?"cssFloat":"float",Pe=Te&&!m&&!p&&"draggable"in document.createElement("div"),Ne=function(){if(Te){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Le=function(e,t){var n=k(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=R(e,0,t),o=R(e,1,t),s=i&&k(i),a=o&&k(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(i).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+T(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&"none"!==s.float){var c="left"===s.float?"left":"right";return!o||"both"!==a.clear&&a.clear!==c?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=r&&"none"===n[Re]||o&&"none"===n[Re]&&l+u>r)?"vertical":"horizontal"},Ie=function(e){function t(e,n){return function(r,i,o,s){var a=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==e&&(n||a))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,i,o,s),n)(r,i,o,s);var l=(n?r:i).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Be=function(){!Ne&&J&&k(J,"display","none")},De=function(){!Ne&&J&&k(J,"display","")};Te&&!m&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);var je=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,o=e.clientY,Ee.some((function(e){var t=e[z].options.emptyInsertThreshold;if(t&&!P(e)){var n=T(e),r=i>=n.left-t&&i<=n.right+t,a=o>=n.top-t&&o<=n.bottom+t;return r&&a?s=e:void 0}})),s);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[z]._onDragOver(n)}}var i,o,s},Fe=function(e){Z&&Z.parentNode[z]._isOutsideThisEl(e.target)};function Ue(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=a({},t),e[z]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Le(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ue.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var s in V.initializePlugins(this,e,o),o)!(s in t)&&(t[s]=o[s]);for(var l in Ie(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&Pe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Ee.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),a(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==k(e,"display")&&e!==Ue.ghost){r.push({target:e,rect:T(e)});var t=i({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=S(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var i=!1,o=0;r.forEach((function(e){var n=0,r=e.target,s=r.fromRect,a=T(r),l=r.prevFromRect,u=r.prevToRect,c=e.rect,h=S(r,!0);h&&(a.top-=h.f,a.left-=h.e),r.toRect=a,r.thisAnimationDuration&&B(l,a)&&!B(s,a)&&(c.top-a.top)/(c.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(c,l,u,t.options)),B(a,s)||(r.prevFromRect=s,r.prevToRect=a,n||(n=t.options.animation),t.animate(r,c,a,n)),n&&(i=!0,o=Math.max(o,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),i?n=setTimeout((function(){"function"==typeof e&&e()}),o):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){k(e,"transition",""),k(e,"transform","");var i=S(this.el),o=i&&i.a,s=i&&i.d,a=(t.left-n.left)/(o||1),l=(t.top-n.top)/(s||1);e.animatingX=!!a,e.animatingY=!!l,k(e,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),k(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),k(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){k(e,"transition",""),k(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function qe(e,t,n,r,i,o,s,a){var l,u,d=e[z],f=d.options.onMove;return!window.CustomEvent||c||h?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=i||t,l.relatedRect=o||T(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),f&&(u=f.call(d,l,s)),u}function ze(e){e.draggable=!1}function He(){xe=!1}function Ke(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ve(e){return setTimeout(e,0)}function We(e){return clearTimeout(e)}Ue.prototype={constructor:Ue,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ve=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,o=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,a=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||a,u=r.filter;if(function(e){Ce.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ce.push(r)}}(n),!Z&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!f||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=A(a,r.draggable,n,!1))&&a.animated||te===a)){if(ie=N(a),se=N(a,r.draggable),"function"==typeof u){if(u.call(this,e,a,this))return G({sortable:t,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),Y("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=A(l,r.trim(),n,!1))return G({sortable:t,rootEl:r,name:"filter",targetEl:a,fromEl:n,toEl:n}),Y("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!A(l,r.handle,n,!1)||this._prepareDragStart(e,s,a)}}},_prepareDragStart:function(e,t,n){var r,i=this,o=i.el,s=i.options,a=o.ownerDocument;if(n&&!Z&&n.parentNode===o){var l=T(n);if(X=o,Q=(Z=n).parentNode,ee=Z.nextSibling,te=n,le=s.group,Ue.dragged=Z,ce={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},pe=ce.clientX-l.left,me=ce.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",r=function(){Y("delayEnded",i,{evt:e}),Ue.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&(Z.draggable=!0),i._triggerDragStart(e,t),G({sortable:i,name:"choose",originalEvent:e}),M(Z,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){x(Z,e.trim(),ze)})),v(a,"dragover",je),v(a,"mousemove",je),v(a,"touchmove",je),v(a,"mouseup",i._onDrop),v(a,"touchend",i._onDrop),v(a,"touchcancel",i._onDrop),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),Y("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(h||c))r();else{if(Ue.eventCanceled)return void this._onDrop();v(a,"mouseup",i._disableDelayedDrag),v(a,"touchend",i._disableDelayedDrag),v(a,"touchcancel",i._disableDelayedDrag),v(a,"mousemove",i._delayedDragTouchMoveHandler),v(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&v(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&ze(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(Z,"dragend",this),v(X,"dragstart",this._onDragStart));try{document.selection?Ve((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Ae=!1,X&&Z){Y("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",Fe);var n=this.options;!e&&M(Z,n.dragClass,!1),M(Z,n.ghostClass,!0),Ue.active=this,e&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(he){this._lastX=he.clientX,this._lastY=he.clientY,Be();for(var e=document.elementFromPoint(he.clientX,he.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(he.clientX,he.clientY))!==t;)t=e;if(Z.parentNode[z]._isOutsideThisEl(e),t)do{if(t[z]&&t[z]._onDragOver({clientX:he.clientX,clientY:he.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);De()}},_onTouchMove:function(e){if(ce){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,o=J&&S(J,!0),s=J&&o&&o.a,a=J&&o&&o.d,l=Oe&&we&&L(we),u=(i.clientX-ce.clientX+r.x)/(s||1)+(l?l[0]-Se[0]:0)/(s||1),c=(i.clientY-ce.clientY+r.y)/(a||1)+(l?l[1]-Se[1]:0)/(a||1);if(!Ue.active&&!Ae){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(J){o?(o.e+=u-(de||0),o.f+=c-(fe||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");k(J,"webkitTransform",h),k(J,"mozTransform",h),k(J,"msTransform",h),k(J,"transform",h),de=u,fe=c,he=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!J){var e=this.options.fallbackOnBody?document.body:X,t=T(Z,!0,Oe,!0,e),n=this.options;if(Oe){for(we=e;"static"===k(we,"position")&&"none"===k(we,"transform")&&we!==document;)we=we.parentNode;we!==document.body&&we!==document.documentElement?(we===document&&(we=C()),t.top+=we.scrollTop,t.left+=we.scrollLeft):we=C(),Se=L(we)}M(J=Z.cloneNode(!0),n.ghostClass,!1),M(J,n.fallbackClass,!0),M(J,n.dragClass,!0),k(J,"transition",""),k(J,"transform",""),k(J,"box-sizing","border-box"),k(J,"margin",0),k(J,"top",t.top),k(J,"left",t.left),k(J,"width",t.width),k(J,"height",t.height),k(J,"opacity","0.8"),k(J,"position",Oe?"absolute":"fixed"),k(J,"zIndex","100000"),k(J,"pointerEvents","none"),Ue.ghost=J,e.appendChild(J),k(J,"transform-origin",pe/parseInt(J.style.width)*100+"% "+me/parseInt(J.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;Y("dragStart",this,{evt:e}),Ue.eventCanceled?this._onDrop():(Y("setupClone",this),Ue.eventCanceled||((ne=F(Z)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),M(ne,this.options.chosenClass,!1),Ue.clone=ne),n.cloneId=Ve((function(){Y("clone",n),Ue.eventCanceled||(n.options.removeCloneOnHide||X.insertBefore(ne,Z),n._hideClone(),G({sortable:n,name:"clone"}))})),!t&&M(Z,i.dragClass,!0),t?(_e=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Z)),v(document,"drop",n),k(Z,"transform","translateZ(0)")),Ae=!0,n._dragStartId=Ve(n._dragStarted.bind(n,t,e)),v(document,"selectstart",n),ge=!0,f&&k(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,o,s=this.el,a=e.target,l=this.options,u=l.group,c=Ue.active,h=le===u,d=l.sort,f=ue||c,p=this,m=!1;if(!xe){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=A(a,l.draggable,s,!0),F("dragOver"),Ue.eventCanceled)return m;if(Z.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return q(!1);if(_e=!1,c&&!l.disabled&&(h?d||(r=Q!==X):ue===this||(this.lastPutMode=le.checkPull(this,c,Z,e))&&u.checkPut(this,c,Z,e))){if(o="vertical"===this._getDirection(e,a),t=T(Z),F("dragOverValid"),Ue.eventCanceled)return m;if(r)return Q=X,U(),this._hideClone(),F("revert"),Ue.eventCanceled||(ee?X.insertBefore(Z,ee):X.appendChild(Z)),q(!0);var g=P(s,l.draggable);if(!g||function(e,t,n){var r=T(P(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,o,this)&&!g.animated){if(g===Z)return q(!1);if(g&&s===e.target&&(a=g),a&&(n=T(a)),!1!==qe(X,s,Z,t,a,n,e,!!a))return U(),g&&g.nextSibling?s.insertBefore(Z,g.nextSibling):s.appendChild(Z),Q=s,H(),q(!0)}else if(g&&function(e,t,n){var r=T(R(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,o,this)){var v=R(s,0,l,!0);if(v===Z)return q(!1);if(n=T(a=v),!1!==qe(X,s,Z,t,a,n,e,!1))return U(),s.insertBefore(Z,v),Q=s,H(),q(!0)}else if(a.parentNode===s){n=T(a);var y,b,w,_=Z.parentNode!==s,E=!function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,o=n?e.width:e.height,s=n?t.left:t.top,a=n?t.right:t.bottom,l=n?t.width:t.height;return r===s||i===a||r+o/2===s+l/2}(Z.animated&&Z.toRect||t,a.animated&&a.toRect||n,o),S=o?"top":"left",x=O(a,"top","top")||O(Z,"top","top"),C=x?x.scrollTop:void 0;if(ve!==a&&(b=n[S],Me=!1,ke=!E&&l.invertSwap||_),y=function(e,t,n,r,i,o,s,a){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,h=r?n.bottom:n.right,d=!1;if(!s)if(a&&be<u*i){if(!Me&&(1===ye?l>c+u*o/2:l<h-u*o/2)&&(Me=!0),Me)d=!0;else if(1===ye?l<c+be:l>h-be)return-ye}else if(l>c+u*(1-i)/2&&l<h-u*(1-i)/2)return function(e){return N(Z)<N(e)?1:-1}(t);return(d=d||s)&&(l<c+u*o/2||l>h-u*o/2)?l>c+u/2?1:-1:0}(e,a,n,o,E?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ke,ve===a),0!==y){var L=N(Z);do{L-=y,w=Q.children[L]}while(w&&("none"===k(w,"display")||w===J))}if(0===y||w===a)return q(!1);ve=a,ye=y;var I=a.nextElementSibling,B=!1,D=qe(X,s,Z,t,a,n,e,B=1===y);if(!1!==D)return 1!==D&&-1!==D||(B=1===D),xe=!0,setTimeout(He,30),U(),B&&!I?s.appendChild(Z):a.parentNode.insertBefore(Z,B?I:a),x&&j(x,0,C-x.scrollTop),Q=Z.parentNode,void 0===b||ke||(be=Math.abs(b-T(a)[S])),H(),q(!0)}if(s.contains(Z))return q(!1)}return!1}function F(l,u){Y(l,p,i({evt:e,isOwner:h,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:d,fromSortable:f,target:a,completed:q,onMove:function(n,r){return qe(X,s,Z,t,n,T(n),e,r)},changed:H},u))}function U(){F("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function q(t){return F("dragOverCompleted",{insertion:t}),t&&(h?c._hideClone():c._showClone(p),p!==f&&(M(Z,ue?ue.options.ghostClass:c.options.ghostClass,!1),M(Z,l.ghostClass,!0)),ue!==p&&p!==Ue.active?ue=p:p===Ue.active&&ue&&(ue=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){F("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Z&&!Z.animated||a===s&&!a.animated)&&(ve=null),l.dragoverBubble||e.rootEl||a===document||(Z.parentNode[z]._isOutsideThisEl(e.target),!t&&je(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function H(){oe=N(Z),ae=N(Z,l.draggable),G({sortable:p,name:"change",toEl:s,newIndex:oe,newDraggableIndex:ae,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",je),y(document,"mousemove",je),y(document,"touchmove",je)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;oe=N(Z),ae=N(Z,n.draggable),Y("drop",this,{evt:e}),Q=Z&&Z.parentNode,oe=N(Z),ae=N(Z,n.draggable),Ue.eventCanceled||(Ae=!1,ke=!1,Me=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),We(this.cloneId),We(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&k(document.body,"user-select",""),k(Z,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(X===Q||ue&&"clone"!==ue.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),Z&&(this.nativeDraggable&&y(Z,"dragend",this),ze(Z),Z.style["will-change"]="",ge&&!Ae&&M(Z,ue?ue.options.ghostClass:this.options.ghostClass,!1),M(Z,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),X!==Q?(oe>=0&&(G({rootEl:Q,name:"add",toEl:Q,fromEl:X,originalEvent:e}),G({sortable:this,name:"remove",toEl:Q,originalEvent:e}),G({rootEl:Q,name:"sort",toEl:Q,fromEl:X,originalEvent:e}),G({sortable:this,name:"sort",toEl:Q,originalEvent:e})),ue&&ue.save()):oe!==ie&&oe>=0&&(G({sortable:this,name:"update",toEl:Q,originalEvent:e}),G({sortable:this,name:"sort",toEl:Q,originalEvent:e})),Ue.active&&(null!=oe&&-1!==oe||(oe=ie,ae=se),G({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),X=Z=Q=J=ee=ne=te=re=ce=he=ge=oe=ae=ie=se=ve=ye=ue=le=Ue.dragged=Ue.ghost=Ue.clone=Ue.active=null,Ce.forEach((function(e){e.checked=!0})),Ce.length=de=fe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)A(e=n[r],o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||Ke(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){var i=r.children[t];A(i,this.options.draggable,r,!1)&&(n[e]=i)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return A(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=V.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Ie(n)},destroy:function(){Y("destroy",this);var e=this.el;e[z]=null,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),y(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ee.splice(Ee.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!re){if(Y("hideClone",this),Ue.eventCanceled)return;k(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),re=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(re){if(Y("showClone",this),Ue.eventCanceled)return;Z.parentNode!=X||this.options.group.revertClone?ee?X.insertBefore(ne,ee):X.appendChild(ne):X.insertBefore(ne,Z),this.options.group.revertClone&&this.animate(Z,ne),k(ne,"display",""),re=!1}}else this._hideClone()}},Te&&v(document,"touchmove",(function(e){(Ue.active||Ae)&&e.cancelable&&e.preventDefault()})),Ue.utils={on:v,off:y,css:k,find:x,is:function(e,t){return!!A(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:D,closest:A,toggleClass:M,clone:F,index:N,nextTick:Ve,cancelNextTick:We,detectDirection:Le,getChild:R},Ue.get=function(e){return e[z]},Ue.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Ue.utils=i(i({},Ue.utils),e.utils)),V.mount(e)}))},Ue.create=function(e,t){return new Ue(e,t)},Ue.version="1.15.0";var $e,Ye,Ge,Ze,Qe,Je,Xe=[],et=!1;function tt(){Xe.forEach((function(e){clearInterval(e.pid)})),Xe=[]}function nt(){clearInterval(Je)}var rt,it=D((function(e,t,n,r){if(t.scroll){var i,o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,u=C(),c=!1;Ye!==n&&(Ye=n,tt(),$e=t.scroll,i=t.scrollFn,!0===$e&&($e=I(n,!0)));var h=0,d=$e;do{var f=d,p=T(f),m=p.top,g=p.bottom,v=p.left,y=p.right,b=p.width,w=p.height,A=void 0,_=void 0,E=f.scrollWidth,M=f.scrollHeight,S=k(f),x=f.scrollLeft,O=f.scrollTop;f===u?(A=b<E&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),_=w<M&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(A=b<E&&("auto"===S.overflowX||"scroll"===S.overflowX),_=w<M&&("auto"===S.overflowY||"scroll"===S.overflowY));var R=A&&(Math.abs(y-o)<=a&&x+b<E)-(Math.abs(v-o)<=a&&!!x),P=_&&(Math.abs(g-s)<=a&&O+w<M)-(Math.abs(m-s)<=a&&!!O);if(!Xe[h])for(var N=0;N<=h;N++)Xe[N]||(Xe[N]={});Xe[h].vx==R&&Xe[h].vy==P&&Xe[h].el===f||(Xe[h].el=f,Xe[h].vx=R,Xe[h].vy=P,clearInterval(Xe[h].pid),0==R&&0==P||(c=!0,Xe[h].pid=setInterval(function(){r&&0===this.layer&&Ue.active._onTouchMove(Qe);var t=Xe[this.layer].vy?Xe[this.layer].vy*l:0,n=Xe[this.layer].vx?Xe[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(Ue.dragged.parentNode[z],n,t,e,Qe,Xe[this.layer].el)||j(Xe[this.layer].el,n,t)}.bind({layer:h}),24))),h++}while(t.bubbleScroll&&d!==u&&(d=I(d,!1)));et=c}}),30),ot=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,o=e.dispatchSortableEvent,s=e.hideGhostForTarget,a=e.unhideGhostForTarget;if(t){var l=n||i;s();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);a(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function st(){}function at(){}function lt(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;rt=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,i=e.activeSortable,o=e.changed,s=e.cancel;if(i.options.swap){var a=this.sortable.el,l=this.options;if(n&&n!==a){var u=rt;!1!==r(n)?(M(n,l.swapClass,!0),rt=n):rt=null,u&&u!==rt&&M(u,l.swapClass,!1)}o(),t(!0),s()}},drop:function(e){var t,n,r,i,o,s,a=e.activeSortable,l=e.putSortable,u=e.dragEl,c=l||this.sortable,h=this.options;rt&&M(rt,h.swapClass,!1),rt&&(h.swap||l&&l.options.swap)&&u!==rt&&(c.captureAnimationState(),c!==a&&a.captureAnimationState(),n=rt,o=(t=u).parentNode,s=n.parentNode,o&&s&&!o.isEqualNode(n)&&!s.isEqualNode(t)&&(r=N(t),i=N(n),o.isEqualNode(s)&&r<i&&i++,o.insertBefore(n,o.children[r]),s.insertBefore(t,s.children[i])),c.animateAll(),c!==a&&a.animateAll())},nulling:function(){rt=null}},a(e,{pluginName:"swap",eventProperties:function(){return{swapItem:rt}}})}st.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=R(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:ot},a(st,{pluginName:"revertOnSpill"}),at.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:ot},a(at,{pluginName:"removeOnSpill"});var ut,ct,ht,dt,ft,pt=[],mt=[],gt=!1,vt=!1,yt=!1;function bt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?v(document,"pointerup",this._deselectMultiDrag):(v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag))),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var r="";pt.length&&ct===e?pt.forEach((function(e,t){r+=(t?", ":"")+e.textContent})):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;ht=t},delayEnded:function(){this.isMultiDrag=~pt.indexOf(ht)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<pt.length;r++)mt.push(F(pt[r])),mt[r].sortableIndex=pt[r].sortableIndex,mt[r].draggable=!1,mt[r].style["will-change"]="",M(mt[r],this.options.selectedClass,!1),pt[r]===ht&&M(mt[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,i=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||pt.length&&ct===t&&(wt(!0,n),r("clone"),i()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(wt(!1,n),mt.forEach((function(e){k(e,"display","")})),t(),ft=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(mt.forEach((function(e){k(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),ft=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ct&&ct.multiDrag._deselectMultiDrag(),pt.forEach((function(e){e.sortableIndex=N(e)})),pt=pt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),yt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){pt.forEach((function(e){e!==ht&&k(e,"position","absolute")}));var r=T(ht,!1,!0,!0);pt.forEach((function(e){e!==ht&&U(e,r)})),vt=!0,gt=!0}n.animateAll((function(){vt=!1,gt=!1,t.options.animation&&pt.forEach((function(e){q(e)})),t.options.sort&&At()}))}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;vt&&~pt.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,i=e.dragRect;pt.length>1&&(pt.forEach((function(e){r.addAnimationState({target:e,rect:vt?T(e):i}),q(e),e.fromRect=i,t.removeAnimationState(e)})),vt=!1,function(e,t){pt.forEach((function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,i=e.activeSortable,o=e.parentEl,s=e.putSortable,a=this.options;if(r){if(n&&i._hideClone(),gt=!1,a.animation&&pt.length>1&&(vt||!n&&!i.options.sort&&!s)){var l=T(ht,!1,!0,!0);pt.forEach((function(e){e!==ht&&(U(e,l),o.appendChild(e))})),vt=!0}if(!n)if(vt||At(),pt.length>1){var u=ft;i._showClone(t),i.options.animation&&!ft&&u&&mt.forEach((function(e){i.addAnimationState({target:e,rect:dt}),e.fromRect=dt,e.thisAnimationDuration=null}))}else i._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(pt.forEach((function(e){e.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){dt=a({},t);var i=S(ht,!0);dt.top-=i.f,dt.left-=i.e}},dragOverAnimationComplete:function(){vt&&(vt=!1,At())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,i=e.sortable,o=e.dispatchSortableEvent,s=e.oldIndex,a=e.putSortable,l=a||this.sortable;if(t){var u=this.options,c=r.children;if(!yt)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),M(ht,u.selectedClass,!~pt.indexOf(ht)),~pt.indexOf(ht))pt.splice(pt.indexOf(ht),1),ut=null,W({sortable:i,rootEl:n,name:"deselect",targetEl:ht,originalEvent:t});else{if(pt.push(ht),W({sortable:i,rootEl:n,name:"select",targetEl:ht,originalEvent:t}),t.shiftKey&&ut&&i.el.contains(ut)){var h,d,f=N(ut),p=N(ht);if(~f&&~p&&f!==p)for(p>f?(d=f,h=p):(d=p,h=f+1);d<h;d++)~pt.indexOf(c[d])||(M(c[d],u.selectedClass,!0),pt.push(c[d]),W({sortable:i,rootEl:n,name:"select",targetEl:c[d],originalEvent:t}))}else ut=ht;ct=l}if(yt&&this.isMultiDrag){if(vt=!1,(r[z].options.sort||r!==n)&&pt.length>1){var m=T(ht),g=N(ht,":not(."+this.options.selectedClass+")");if(!gt&&u.animation&&(ht.thisAnimationDuration=null),l.captureAnimationState(),!gt&&(u.animation&&(ht.fromRect=m,pt.forEach((function(e){if(e.thisAnimationDuration=null,e!==ht){var t=vt?T(e):m;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),At(),pt.forEach((function(e){c[g]?r.insertBefore(e,c[g]):r.appendChild(e),g++})),s===N(ht))){var v=!1;pt.forEach((function(e){e.sortableIndex===N(e)||(v=!0)})),v&&o("update")}pt.forEach((function(e){q(e)})),l.animateAll()}ct=l}(n===r||a&&"clone"!==a.lastPutMode)&&mt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,mt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||ct!==this.sortable||e&&A(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;pt.length;){var t=pt[0];M(t,this.options.selectedClass,!1),pt.shift(),W({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[z];t&&t.options.multiDrag&&!~pt.indexOf(e)&&(ct&&ct!==t&&(ct.multiDrag._deselectMultiDrag(),ct=t),M(e,t.options.selectedClass,!0),pt.push(e))},deselect:function(e){var t=e.parentNode[z],n=pt.indexOf(e);t&&t.options.multiDrag&&~n&&(M(e,t.options.selectedClass,!1),pt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return pt.forEach((function(e){var i;n.push({multiDragElement:e,index:e.sortableIndex}),i=vt&&e!==ht?-1:vt?N(e,":not(."+t.options.selectedClass+")"):N(e),r.push({multiDragElement:e,index:i})})),{items:(e=pt,function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(mt),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function wt(e,t){mt.forEach((function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)}))}function At(){pt.forEach((function(e){e!==ht&&e.parentNode&&e.parentNode.removeChild(e)}))}Ue.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):t.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),nt(),tt(),clearTimeout(_),_=void 0},nulling:function(){Qe=Ye=$e=et=Je=Ge=Ze=null,Xe.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,o=document.elementFromPoint(r,i);if(Qe=e,t||this.options.forceAutoScrollFallback||h||c||f){it(e,this.options,o,t);var s=I(o,!0);!et||Je&&r===Ge&&i===Ze||(Je&&nt(),Je=setInterval((function(){var o=I(document.elementFromPoint(r,i),!0);o!==s&&(s=o,tt()),it(e,n.options,o,t)}),10),Ge=r,Ze=i)}else{if(!this.options.bubbleScroll||I(o,!0)===C())return void tt();it(e,this.options,I(o,!1),!1)}}},a(e,{pluginName:"scroll",initializeByDefault:!0})}),Ue.mount(at,st);const _t=Ue},4912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activeNotifications=void 0,t.activeNotifications=function(){var e=document.querySelector("#dropdownNotificationButton");e&&e.addEventListener("click",(function(){console.log("CLICK")}))}},9337:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSection=void 0;var r=n(3413);t.addSection=function(){var e=document.querySelector("#add-section-modal"),t=document.querySelectorAll("#callAddSectionModal"),n=document.querySelector("#add_section_modal_form");if(e&&t&&n){var i=n.getAttribute("action"),o=document.querySelector("#modalSectionCloseButton");o&&o.addEventListener("click",(function(){a.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t=e.getAttribute("data-collection-id"),r=e.getAttribute("data-sub-collection-id"),o="";(o="_"===r?i.replace("0/create_section","".concat(t,"/create_section")):i.replace("0/create_section","".concat(r,"/create_section"))).includes("/0")||(n.setAttribute("action","".concat(o)),a.show())}))}));var s={placement:"bottom-right",closable:!0,onHide:function(){n.setAttribute("action","")},onShow:function(){},onToggle:function(){}},a=new r.Modal(e,s)}}},6800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSubCollection=void 0;var r=n(3413);t.addSubCollection=function(){var e=document.querySelector("#add-sub-collection-modal"),t=document.querySelectorAll("#callAddSubCollectionModal"),n=document.querySelector("#add_sub_collection_modal_collection_id"),i=document.querySelector("#add_sub_collection_modal_form");if(e&&t&&n&&i){var o=i.getAttribute("action"),s=document.querySelector("#modalSubCollectionCloseButton");s&&s.addEventListener("click",(function(){l.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t=e.getAttribute("data-collection-id");n.value=t;var r=o.replace("create_collection","".concat(t,"/create_sub_collection"));i.setAttribute("action","".concat(r)),l.show()}))}));var a={placement:"bottom-right",closable:!0,onHide:function(){i.setAttribute("action","")},onShow:function(){},onToggle:function(){}},l=new r.Modal(e,a)}}},4376:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.initApprove=void 0;var o=n(3413),s={interpretation:"/approve/interpretation/",comment:"/approve/comment/"},a=document.querySelector("#approve_interpretation_modal"),l=new o.Modal(a,{onShow:function(){}}),u=function(e,t,n,o){return r(void 0,void 0,void 0,(function(){var r,a,l,u;return i(this,(function(i){switch(i.label){case 0:return[4,fetch(s[e]+t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})];case 1:return[4,i.sent().json()];case 2:return r=i.sent(),a=r.approve,"interpretation"==e&&(o.innerHTML=a?t:""),l=n.querySelector(".approved-icon"),u=n.querySelector(".not-approved-icon"),l.classList.remove("hidden"),u.classList.remove("hidden"),a?u.classList.add("hidden"):l.classList.add("hidden"),[2]}}))}))};t.initApprove=function(){document.querySelectorAll(".approve-button").forEach((function(e){e.addEventListener("click",(function(){var t;t=e,r(void 0,void 0,void 0,(function(){var e,n,o,a,c,h;return i(this,(function(d){return(e=t.getAttribute("data-approve"))in s?(n=t.getAttribute("data-entity-id"),o=document.querySelector(".approved-interpretation-id"),"interpretation"==e&&o&&(a=parseInt(o.innerHTML))&&a!=parseInt(n)?(l.show(),c=document.querySelector("#approve-interpretation-form"),h=function(s){return r(void 0,void 0,void 0,(function(){return i(this,(function(r){return s.preventDefault(),c.removeEventListener("submit",h),u(e,n,t,o),document.querySelectorAll(".approved-icon").forEach((function(e){e.classList.remove("hidden"),e.classList.add("hidden")})),document.querySelectorAll(".not-approved-icon").forEach((function(e){e.classList.remove("hidden")})),l.hide(),[2]}))}))},c.addEventListener("submit",h),[2]):(u(e,n,t,o),[2])):(console.error("Unknown data-approve attribute"),[2])}))}))}))}))}},7319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initBooks=void 0;var r=n(3413),i=document.querySelector("#add-book-modal"),o=new r.Modal(i,{placement:"bottom-right",closable:!0,onHide:function(){},onShow:function(){},onToggle:function(){}});t.initBooks=function(){var e=document.querySelector("#modalAddCloseButton");e&&e.addEventListener("click",(function(){o.hide()}))}},2980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initCheckBoxTree=void 0;var n=function(e){var t=e.parentElement.parentElement.parentElement.parentElement.querySelector("input[type=checkbox]");t.checked=!1,"true"!=t.getAttribute("data-root")&&n(t)};t.initCheckBoxTree=function(){var e={book:[],collection:[],section:[]},t=document.querySelector("#permissions_json");document.querySelectorAll(".checkbox-tree").forEach((function(r){r.querySelectorAll("input[type=checkbox]").forEach((function(i){i.addEventListener("click",(function(){!function(e){var t=e.parentElement.parentElement,r=e.checked;r||n(e),t.querySelectorAll("input[type=checkbox]").forEach((function(e){e.checked=r}))}(i),function(e,t){t.querySelectorAll("input[type=checkbox]").forEach((function(t){var n="".concat(t.getAttribute("data-access-to")),r=parseInt(t.getAttribute("data-access-to-id")),i=t.checked;i&&!e[n].includes(r)?e[n].push(r):!i&&e[n].includes(r)&&(e[n]=e[n].filter((function(e){return e!=r})))}))}(e,r),t.value=JSON.stringify(e)}))}))}))}},8891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initComments=void 0,t.initComments=function(){var e=document.querySelectorAll("#delete_comment_btn"),t=document.querySelector("#comment_id");e&&t&&e.forEach((function(e){return e.addEventListener("click",(function(){var n=e.getAttribute("data-comment-id");t.value=n}))}));var n=document.querySelectorAll("#edit_comment_btn"),r=document.querySelector("#edit_comment_id"),i=document.querySelector("#edit-comment-text-input"),o=document.querySelector("#edit-comment-text");n&&r&&i&&n.forEach((function(e){return e.addEventListener("click",(function(){var t=e.getAttribute("data-edit-comment-id"),n=e.getAttribute("data-edit-comment-text");r.value=t,i.value=n,o.innerHTML=n}))}))}},7086:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.initContributors=void 0;var i=function(e,t,i,o){return n(void 0,void 0,void 0,(function(){var n,s,a;return r(this,(function(r){switch(r.label){case 0:return t.innerHTML="",n=e.getAttribute("data-book-id"),(s=e.value).length?(a=new URLSearchParams({q:s,book_id:n}),[4,fetch("/user/search?"+a)]):[2];case 1:return[4,r.sent().json()];case 2:return r.sent().users.forEach((function(e){var n=i.cloneNode(!0),r=n.querySelector(".select-user-btn");r.setAttribute("data-user-id",e.id),r.addEventListener("click",(function(e){document.querySelectorAll(".select-user-btn").forEach((function(e){e.innerHTML="Select"}));var t=e.target.getAttribute("data-user-id");o.value=t,r.innerHTML="Selected"})),n.querySelector(".username-th").innerHTML=e.username,n.classList.remove("hidden"),t.appendChild(n)})),[2,void 0]}}))}))};t.initContributors=function(){var e=this,t=document.querySelector("#search-btn"),o=document.querySelector("#username"),s=document.querySelector("#user_id");if(t&&o&&s){var a=document.querySelector("#search-results-tbody"),l=document.querySelector("#tr-example");t.addEventListener("click",(function(t){return n(e,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return t.preventDefault(),s.value="",[4,i(o,a,l,s)];case 1:return e.sent(),[2]}}))}))}))}}},2454:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyLink=void 0,t.copyLink=function(){var e=document.querySelectorAll("#copyLinkButton");e&&e.forEach((function(e){return e.addEventListener("click",(function(){var t=e.getAttribute("data-link"),n=document.createElement("textarea"),r=window.location.host;n.value="".concat(r).concat(t),n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}))}))}},5328:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCollection=void 0;var r=n(3413);t.deleteCollection=function(){var e=document.querySelector("#delete-collection-modal"),t=document.querySelectorAll("#callDeleteCollectionModal"),n=document.querySelector("#delete_collection_modal_collection_id"),i=document.querySelector("#delete_collection_modal_form");if(e&&t&&n&&i){var o=i.getAttribute("action"),s=document.querySelector("#modalDeleteCollectionCloseButton");s&&s.addEventListener("click",(function(){l.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t,r=e.getAttribute("data-collection-id");n.value=r,t=o.replace("0/delete","".concat(r,"/delete")),i.setAttribute("action","".concat(t)),l.show()}))}));var a={placement:"bottom-right",closable:!0,onHide:function(){i.setAttribute("action","")},onShow:function(){},onToggle:function(){}},l=new r.Modal(e,a)}}},8514:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteContributor=void 0;var r=n(3413);t.deleteContributor=function(){var e=document.querySelector("#delete_contributor_modal"),t=document.querySelectorAll("#callDeleteContributorModal"),n=document.querySelector("#delete_contributor_modal_user_id"),i=document.querySelector("#delete_contributor_modal_form");if(e&&t&&n&&i){var o=document.querySelector("#modalDeleteContributorCloseButton");o&&o.addEventListener("click",(function(){a.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t=e.getAttribute("data-user-id");n.value=t,a.show()}))}));var s={placement:"bottom-right",closable:!0,onHide:function(){i.setAttribute("action","")},onShow:function(){},onToggle:function(){}},a=new r.Modal(e,s)}}},4036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteInterpretation=void 0;var r=n(3413);t.deleteInterpretation=function(){var e=document.querySelector("#delete-interpretation-modal"),t=document.querySelectorAll("#callDeleteInterpretationModal"),n=document.querySelector("#delete_interpretation_modal_interpretation_id"),i=document.querySelector("#delete_interpretation_modal_form");if(e&&t&&n&&i){var o=i.getAttribute("action"),s=document.querySelector("#modalDeleteInterpretationCloseButton");s&&s.addEventListener("click",(function(){l.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t,r=e.getAttribute("data-interpretation-id");n.value=r,t=o.replace("0/delete_interpretation","".concat(r,"/delete_interpretation")),i.setAttribute("action","".concat(t)),l.show()}))}));var a={closable:!0,onHide:function(){i.setAttribute("action","")},onShow:function(){},onToggle:function(){}},l=new r.Modal(e,a)}}},126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSection=void 0;var r=n(3413);t.deleteSection=function(){var e=document.querySelector("#delete-section-modal"),t=document.querySelectorAll("#callDeleteSectionModal"),n=document.querySelector("#delete_section_modal_section_id"),i=document.querySelector("#delete_section_modal_form");if(e&&t&&n&&i){var o=i.getAttribute("action"),s=document.querySelector("#modalDeleteSectionCloseButton");s&&s.addEventListener("click",(function(){l.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t,r=e.getAttribute("data-section-id");n.value=r,t=o.replace("0/delete_section","".concat(r,"/delete_section")),i.setAttribute("action","".concat(t)),l.show()}))}));var a={placement:"bottom-right",closable:!0,onHide:function(){i.setAttribute("action","")},onShow:function(){},onToggle:function(){}},l=new r.Modal(e,a)}}},2919:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteSubCollection=void 0;var r=n(3413);t.deleteSubCollection=function(){var e=document.querySelector("#delete-sub-collection-modal"),t=document.querySelectorAll("#callDeleteSubCollectionModal"),n=document.querySelector("#delete_sub_collection_modal_collection_id"),i=document.querySelector("#delete_sub_collection_modal_sub_collection_id"),o=document.querySelector("#delete_sub_collection_modal_form");if(e&&t&&n&&i&&o){var s=o.getAttribute("action"),a=document.querySelector("#modalDeleteSubCollectionCloseButton");a&&a.addEventListener("click",(function(){u.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t,r=e.getAttribute("data-sub-collection-id");n.value=r,t=s.replace("0/delete","".concat(r,"/delete")),o.setAttribute("action","".concat(t)),u.show()}))}));var l={placement:"bottom-right",closable:!0,onHide:function(){o.setAttribute("action","")},onShow:function(){},onToggle:function(){}},u=new r.Modal(e,l)}}},7533:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.initDnD=void 0;var s=o(n(1474));t.initDnD=function(){var e=document.querySelectorAll("#draggableSectionItems"),t=document.querySelectorAll('[data-dnd="dnd-sub-collection"]'),n=document.querySelectorAll("#empty-dnd-entity");e.forEach((function(e){return s.default.create(e,{group:{name:"sections",pull:!0,put:["sections"]},animation:100,filter:".filter",onEnd:function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return t=e.item,n=t.getAttribute("data-book-id"),r=t.getAttribute("data-entity-id"),n&&r?(o="/book/".concat(n,"/").concat(r,"/section/change_position"),[4,fetch(o,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({position:e.newDraggableIndex,collection_id:e.to.getAttribute("data-entity-id")})})]):[3,2];case 1:if(200!==i.sent().status)return[2];window.location.reload(),i.label=2;case 2:return[2]}}))}))}})})),t.forEach((function(e){return s.default.create(e,{group:{name:"sub_collections",pull:!0,put:["sub_collections"]},animation:100,filter:".filter",onEnd:function(e){return r(this,void 0,void 0,(function(){var t,n,r,o;return i(this,(function(i){switch(i.label){case 0:return t=e.item,n=t.getAttribute("data-book-id"),r=t.getAttribute("data-entity-id"),n&&r?(o="/book/".concat(n,"/").concat(r,"/collection/change_position"),[4,fetch(o,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({position:e.newDraggableIndex,collection_id:e.to.getAttribute("data-entity-id")})})]):[3,2];case 1:if(200!==i.sent().status)return[2];window.location.reload(),i.label=2;case 2:return[2]}}))}))}})})),n.forEach((function(e){return s.default.create(e,{group:{name:"empty",pull:!1,put:["sub_collections","sections"]},animation:100,fallbackOnBody:!0,swapThreshold:20,filter:".filter",disabled:e.classList.contains("denied")})}))}},3111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editInterpretations=void 0;var r=n(3413);t.editInterpretations=function(){var e=document.querySelector("#edit_interpretation_modal"),t=document.querySelectorAll("#callEditInterpretationModal"),n=document.querySelector("#edit_interpretation_modal_interpretation_id"),i=document.querySelector("#edit-interpretation-text-input"),o=document.querySelector("#edit_interpretation_modal_form"),s=document.querySelector("#edit-interpretation-text"),a={placement:"bottom-right",closable:!0,onHide:function(){o.setAttribute("action","")},onShow:function(){},onToggle:function(){}},l=new r.Modal(e,a);if(e&&t&&n&&i&&o&&s){var u=o.getAttribute("action"),c=document.querySelector("#modalEditInterpretationCloseButton");c&&c.addEventListener("click",(function(){l.hide()})),t.forEach((function(e){return e.addEventListener("click",(function(){var t=e.getAttribute("data-edit-interpretation-id");n.value=t;var r,a=e.getAttribute("data-edit-interpretation-text");i.value=a,s.innerHTML=a,r=u.replace("0/edit_interpretation","".concat(t,"/edit_interpretation")),o.setAttribute("action","".concat(r)),l.show()}))}))}}},5568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flash=void 0;var r=n(3413);t.flash=function(){var e=document.querySelector("[id^=toast-]"),t=document.querySelector("#closeToastBtn"),n=new r.Dismiss(e,t,{transition:"transition-opacity",duration:1e3,timing:"ease-out"});e&&t&&(t.addEventListener("click",(function(){n.hide()})),setTimeout((function(){n.hide()}),5e3))}},2530:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indeterminateInputs=void 0,t.indeterminateInputs=function(){document.querySelectorAll("input[indeterminate=true]").forEach((function(e){e.indeterminate=!0}))}},1974:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initQuill=void 0;var r=n(5389);t.initQuill=function(){var e=r.import("ui/icons");e.header.false='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000"viewBox="-8 -7 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3z"/></svg>',e.header[1]='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="-5 -7 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3zm9.52.779H10V3h3.36v7h-1.84V4.779z"/></svg>',e.header[2]='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="-4.5 -7 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3zm12.88 4.352V10H10V8.986l.1-.246 1.785-1.913c.43-.435.793-.77.923-1.011.124-.23.182-.427.182-.587 0-.14-.04-.242-.127-.327a.469.469 0 0 0-.351-.127.443.443 0 0 0-.355.158c-.105.117-.165.288-.173.525l-.012.338h-1.824l.016-.366c.034-.735.272-1.33.718-1.77.446-.44 1.02-.66 1.703-.66.424 0 .805.091 1.14.275.336.186.606.455.806.8.198.343.3.7.3 1.063 0 .416-.23.849-.456 1.307-.222.45-.534.876-1.064 1.555l-.116.123-.254.229h1.938z"/></svg>',e.header[3]='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="-4.5 -6.5 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3zm12.453 2.513l.043.055c.254.334.38.728.38 1.172 0 .637-.239 1.187-.707 1.628-.466.439-1.06.658-1.763.658-.671 0-1.235-.209-1.671-.627-.436-.418-.673-.983-.713-1.676L10 7.353h1.803l.047.295c.038.238.112.397.215.49.1.091.23.137.402.137a.566.566 0 0 0 .422-.159.5.5 0 0 0 .158-.38c0-.163-.067-.295-.224-.419-.17-.134-.438-.21-.815-.215l-.345-.004v-1.17l.345-.004c.377-.004.646-.08.815-.215.157-.124.224-.255.224-.418a.5.5 0 0 0-.158-.381.566.566 0 0 0-.422-.159.568.568 0 0 0-.402.138c-.103.092-.177.251-.215.489l-.047.295H10l.022-.37c.04-.693.277-1.258.713-1.675.436-.419 1-.628 1.67-.628.704 0 1.298.22 1.764.658.468.441.708.991.708 1.629a1.892 1.892 0 0 1-.424 1.226z"/></svg>',e.header[4]='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="-4.5 -7 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3zm10.636 4.74H10V7.302l.06-.198 2.714-4.11h1.687v3.952h.538V8.74h-.538V10h-1.825V8.74zm.154-1.283V5.774l-1.1 1.683h1.1z"/></svg>',e.header[5]='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="-4 -6.5 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3zm8.003 4.317h2.68c.386 0 .699-.287.699-.642 0-.355-.313-.642-.698-.642H10.01l.002-.244L10 3h5.086v1.888h-3.144l.014.617h1.114c1.355 0 2.469.984 2.523 2.23.052 1.21-.972 2.231-2.288 2.28l-.095.001-3.21-.02V8.73l.003-.414z"/></svg>',e.header[6]='<svg style="scale: 1.6;" xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="-4.5 -7 24 24" preserveAspectRatio="xMinYMin"><path d="M2 4h4V1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0V6H2v3a1 1 0 1 1-2 0V1a1 1 0 1 1 2 0v3zm11.949 2.057c.43.44.651.999.651 1.64 0 .629-.228 1.18-.67 1.62-.442.437-.99.663-1.613.663a2.212 2.212 0 0 1-1.649-.693c-.43-.45-.652-.985-.652-1.58 0-.224.034-.449.1-.672.063-.211.664-1.627.837-1.966.251-.491.65-1.204 1.197-2.137l1.78.652-.917 1.88c.249.113.733.386.936.593zm-1.63.765a.85.85 0 0 0-.858.863.85.85 0 0 0 .252.613.865.865 0 0 0 1.48-.614.844.844 0 0 0-.25-.611.866.866 0 0 0-.623-.251z"/></svg>';var t=[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],["clean"],[{header:!1},{header:1},{header:2},{header:3},{header:4},{header:5},{header:6}]];document.querySelectorAll(".quill-editor").forEach((function(e){var n=e.id;n?new r("#"+n,{theme:"snow",modules:{toolbar:t}}):console.error("Please set attribute id to element with class .quill-editor")}))}},4875:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initQuillReadOnly=void 0,t.initQuillReadOnly=function(){document.querySelectorAll(".ql-editor-readonly").forEach((function(e){var t=e.querySelector(".ql-editor");t&&(t.removeAttribute("contenteditable"),t.classList.remove("ql-editor"),t.classList.add("ql-editor-readonly"));var n=e.querySelector(".ql-tooltip");n&&n.remove();var r=e.querySelector(".ql-clipboard");r&&r.remove()}))}},2771:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initMultipleInput=void 0;var n=function(e,t,n){var r=e.innerHTML;return t=t.filter((function(e){return e!=r})),e.remove(),document.querySelector(".multiple-input").value=r,n.value=t.join(),t};t.initMultipleInput=function(){document.addEventListener("DOMContentLoaded",(function(){var e;(e=document.querySelectorAll(".prevent-submit-on-enter")).length&&(e.forEach((function(e){e.addEventListener("keypress",(function(e){13===e.keyCode&&e.preventDefault()}))})),document.querySelectorAll(".multiple-input-block").forEach((function(e){var t=e.querySelector(".multiple-input"),r=t.getAttribute("data-save-results-to");if(r){var i=e.querySelector("."+r),o=e.querySelector(".multiple-input-items"),s=o.querySelectorAll(".multiple-input-word"),a=[];s.forEach((function(e){a.push(e.innerHTML),e.addEventListener("click",(function(){a=n(e,a,i)}))})),i.value=a.join(),t.addEventListener("input",(function(){var e=t.value.trim().toLowerCase();e.length>32&&(t.value=e.slice(0,32))})),t.addEventListener("keyup",(function(e){if(13===e.keyCode||188===e.keyCode){if(!t.value)return;var r=t.value.trim().toLowerCase();if(!r)return;if(r.length>32)return void(t.value=r.slice(0,32));if(","==r.substring(r.length-1,r.length)&&(r=r.substring(0,r.length-1),e.target.value=r),r=r.replaceAll(",",""),a.includes(r))return;var s=document.createElement("div");s.className="cursor-pointer multiple-input-word bg-sky-300 hover:bg-sky-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white rounded text-center py-1/2 px-2",s.innerHTML=r,a.push(r),s.addEventListener("click",(function(){a=n(s,a,i)})),o.appendChild(s),t.value="",i.value=a.join()}}))}else console.error("Please set data-save-results-to attribute to .multiple-input element")})))}))}},8224:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initPermissions=void 0,t.initPermissions=function(){document.querySelectorAll(".edit-permissions-btn").forEach((function(e){var t=document.querySelector("#permission_modal_book_id"),n=document.querySelector("#permission_modal_user_id");e.addEventListener("click",(function(){var r=e.getAttribute("data-book-id"),i=e.getAttribute("data-user-id");t.value=r,n.value=i}))}))}},3057:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.quickSearch=void 0;var o=n(3413),s=n(1296),a=document.querySelector("#mainSearchInput"),l=document.querySelector("#quickSearchModal"),u={backdrop:"dynamic",closable:!0,onHide:function(){},onShow:function(){document.querySelector(".bg-opacity-50").addEventListener("click",(function(){a.value="",c.hide()}))},onToggle:function(){}},c=new o.Modal(l,u);t.quickSearch=function(){var e=this;a&&l&&(a.addEventListener("input",s(h,500)),a.addEventListener("keypress",(function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return"Enter"!==t.key?[3,2]:(e=new URLSearchParams({q:a.value.toLowerCase()}),[4,fetch("/search_interpretations?"+e)]);case 1:if(200!==(n=r.sent()).status)return[2];window.location.replace(n.url),r.label=2;case 2:return[2]}}))}))})))};var h=function(e){return r(void 0,void 0,void 0,(function(){var t,n,r,o,s,l,u,h,d,f;return i(this,(function(i){switch(i.label){case 0:return e.preventDefault(),a.value.length>0?(t=new URLSearchParams({search_query:a.value.toLowerCase()}),[4,fetch("/quick_search?"+t)]):[3,3];case 1:return[4,(n=i.sent()).json()];case 2:if(r=i.sent(),200!==n.status)return[2];for(s in o=[],r)for(d in l=document.querySelector("#quickSearchBlock-".concat(s)),u=document.querySelector(".".concat(s,"Text-1")),h=document.querySelector("#emptyQuickSearchDiv"),u&&u.classList.remove("hidden"),r[s].length<1&&(o.push(s),l&&l.classList.add("hidden")),1==r[s].length&&u&&u.classList.add("hidden"),4===o.length&&h.classList.remove("hidden"),r[s])l.classList.remove("hidden"),h.classList.add("hidden"),(f=document.querySelector("#".concat(s,"Text-").concat(d)))&&(f.textContent=r[s][d].label,f.setAttribute("href",r[s][d].url));c.show(),i.label=3;case 3:return[2]}}))}))}},8147:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initQuillValueToInput=void 0,t.initQuillValueToInput=function(){document.querySelectorAll(".quill-editor").forEach((function(e){var t=e.id;t?e.addEventListener("DOMSubtreeModified",(function(){!function(e){var t=document.querySelector("#".concat(e,"-input"));if(t){var n=document.querySelector("#"+e).innerHTML;t.value=n}}(t)})):console.error("Please set attribute id to element with class .quill-editor")}))}},6162:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.initRefreshAccessLevelTree=void 0;var i=function(e,t){return n(void 0,void 0,void 0,(function(){var n,i;return r(this,(function(r){switch(r.label){case 0:return n=new URLSearchParams({user_id:e,book_id:t}),[4,fetch("/permission/access_tree?"+n)];case 1:return[4,r.sent().json()];case 2:return i=r.sent(),Object.entries(i.access_tree).map((function(e){var t=e[0],n=e[1];document.querySelectorAll("input[type=checkbox][data-access-to=".concat(t,"]")).forEach((function(e){var t=parseInt(e.getAttribute("data-access-to-id"));n.includes(t)?e.checked=!0:e.checked=!1}))})),[2]}}))}))};t.initRefreshAccessLevelTree=function(){if(document.querySelectorAll(".edit-permissions-btn").forEach((function(e){var t=e.getAttribute("data-user-id"),n=e.getAttribute("data-book-id");e.addEventListener("click",(function(){i(t,n)}))})),document.querySelector(".trigger-refreshAccessLevelTree")){var e=document.querySelector("input[name=user_id]"),t=document.querySelector("input[name=book_id]"),n=e.value,r=t.value;i(n,r)}}},8521:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.renameCollection=void 0,t.renameCollection=function(){var e=this,t=document.querySelectorAll('[id^="rename-collection-button-"]'),i=document.querySelectorAll('[id^="rename-collection-label-form-"]');t.length>0&&i.length>0&&t.forEach((function(t,o){t.addEventListener("click",(function(){var t=document.querySelectorAll('[id^="edit-collection-label-"]'),s=document.querySelector("#csrf_token");t[o].removeAttribute("readonly");var a=t[o].value;t[o].value=a,t[o].focus(),t[o].selectionStart=t[o].selectionEnd=257,t[o].addEventListener("blur",(function(){t[o].value=a})),i[o].addEventListener("submit",(function(a){return n(e,void 0,void 0,(function(){var e,n,l,u;return r(this,(function(r){switch(r.label){case 0:return a.preventDefault(),e=i[o].getAttribute("data-book-id"),n=i[o].getAttribute("data-collection-id"),l=t[o].value,t[o].readOnly=!0,u="/book/".concat(e,"/").concat(n,"/edit"),[4,fetch(u,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:l,csrf_token:s?s.value:""})})];case 1:return 200!=r.sent().status||location.reload(),[2]}}))}))}))}))}))}},1285:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.renameSection=void 0,t.renameSection=function(){var e=this,t=document.querySelectorAll('[id^="rename-section-button-"]'),i=document.querySelectorAll('[id^="rename-section-label-form-"]');t.length>0&&i.length>0&&t.forEach((function(t,o){t.addEventListener("click",(function(){var t=document.querySelectorAll('[id^="edit-section-label-"]'),s=document.querySelector("#csrf_token"),a=t[o].value;t[o].removeAttribute("readonly"),t[o].value=a,t[o].focus(),t[o].selectionStart=t[o].selectionEnd=257,t[o].addEventListener("blur",(function(){t[o].value=a})),i[o].addEventListener("submit",(function(a){return n(e,void 0,void 0,(function(){var e,n,l,u;return r(this,(function(r){switch(r.label){case 0:return a.preventDefault(),e=i[o].getAttribute("data-book-id"),n=i[o].getAttribute("data-section-id"),l=t[o].value,t[o].readOnly=!0,u="/book/".concat(e,"/").concat(n,"/edit_section"),[4,fetch(u,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:l,section_id:n,csrf_token:s?s.value:""})})];case 1:return 200!=r.sent().status||location.reload(),[2]}}))}))}))}))}))}},6965:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.renameSubCollection=void 0,t.renameSubCollection=function(){var e=this,t=document.querySelectorAll('[id^="rename-sub-collection-button-"]'),i=document.querySelectorAll('[id^="rename-sub-collection-label-form-"]');t.length>0&&i.length>0&&t.forEach((function(t,o){t.addEventListener("click",(function(){var t=document.querySelectorAll('[id^="edit-sub-collection-label-"]'),s=document.querySelector("#csrf_token"),a=t[o].value;t[o].removeAttribute("readonly"),t[o].value=a,t[o].focus(),t[o].selectionStart=t[o].selectionEnd=257,t[o].addEventListener("blur",(function(){t[o].value=a})),i[o].addEventListener("submit",(function(a){return n(e,void 0,void 0,(function(){var e,n,l,u;return r(this,(function(r){switch(r.label){case 0:return a.preventDefault(),e=i[o].getAttribute("data-book-id"),n=i[o].getAttribute("data-sub-collection-id"),l=t[o].value,t[o].readOnly=!0,u="/book/".concat(e,"/").concat(n,"/edit"),[4,fetch(u,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({label:l,csrf_token:s?s.value:""})})];case 1:return 200!=r.sent().status||location.reload(),[2]}}))}))}))}))}))}},6933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rightClick=void 0;var r=n(3413),i=document.querySelectorAll('[id^="dropdownCollectionContextButton"]'),o=document.querySelectorAll('[data^="collection-context-menu-"]'),s=document.querySelectorAll('[data^="sub-collection-context-menu-"]'),a=document.querySelectorAll('[id^="dropdownSubCollectionContextButton"]'),l=document.querySelectorAll('[data^="section-context-menu-"]'),u=document.querySelectorAll('[id^="dropdownSectionContextButton"]'),c=null,h={offsetSkidding:200,offsetDistance:0,onHide:function(){},onShow:function(e){c?(e!==c&&c.hide(),c=e):c=e},onToggle:function(){}},d=[],f=[],p=[];o.forEach((function(e,t){d.push(new r.Dropdown(e,i[t],h))})),s.forEach((function(e,t){f.push(new r.Dropdown(e,a[t],h))})),l.forEach((function(e,t){p.push(new r.Dropdown(e,u[t],h))})),t.rightClick=function(){var e=document.querySelectorAll('[id^="accordion-collapse-heading-"]'),t=document.querySelectorAll('[id^="accordion-nested-collapse-heading-"]'),n=document.querySelectorAll('[id^="section-heading-"]');e.forEach((function(e,t){e.addEventListener("contextmenu",(function(e){e.preventDefault(),e.currentTarget.id.startsWith("accordion-collapse-heading-")&&d[t].show()}))})),t.forEach((function(e,t){e.addEventListener("contextmenu",(function(e){e.preventDefault(),e.currentTarget.id.startsWith("accordion-nested-collapse-heading-")&&f[t].show()}))})),n.forEach((function(e,t){e.addEventListener("contextmenu",(function(e){e.preventDefault(),e.currentTarget.id.startsWith("section-heading-")&&p[t].show()}))}))}},327:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scroll=void 0;var n=function(e){var t=e.getBoundingClientRect().top+window.pageYOffset-160;window.scrollTo({top:t,behavior:"smooth"})};t.scroll=function(){var e=document.querySelectorAll('[href^="#section-"]');e&&e.forEach((function(e){e.addEventListener("click",(function(){var t=e.getAttribute("href");t=t.replace("#","");var r=document.querySelector('[id^="'.concat(t,'"]'));r&&n(r)}))}));var t=document.querySelectorAll('[href^="#collection-"]');t&&t.forEach((function(e){e.addEventListener("click",(function(){var t=e.getAttribute("href");t=t.replace("#","");var r=document.querySelector('[id^="'.concat(t,'"]'));r&&n(r)}))}))}},8259:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.slashSearch=void 0,t.slashSearch=function(){var e=this,t=!0,i=document.querySelector("#global-search-button"),o=document.querySelector("#mainSearchInput");window.addEventListener("keypress",(function(e){"/"===e.key&&o&&(t&&(e.preventDefault(),t=!1),o.focus()),o.addEventListener("blur",(function(){t=!0}))})),i&&o&&i.addEventListener("click",(function(t){return n(e,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:return t.preventDefault(),e=new URLSearchParams({q:o.value}),[4,fetch("/search_interpretations?"+e)];case 1:return 200!==(n=r.sent()).status||window.location.replace(n.url),[2]}}))}))}))}},5132:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.initStar=void 0,t.initStar=function(){document.querySelectorAll(".book-star-block").forEach((function(e){var t=e.querySelector(".star-btn"),i=e.querySelector(".total-stars");t.addEventListener("click",(function(){var e,o;e=t,o=i,n(void 0,void 0,void 0,(function(){var t,n,i,s;return r(this,(function(r){switch(r.label){case 0:return t=e.getAttribute("data-book-id"),[4,fetch("/star/"+t,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})];case 1:return[4,r.sent().json()];case 2:return n=r.sent(),i=n.current_user_star,s=n.stars_count,o.innerHTML=s,e.classList.remove("fill-yellow-300"),i?e.classList.add("fill-yellow-300"):e.classList.remove("fill-yellow-300"),[2]}}))}))}))}))}},8400:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initGoBack=void 0,t.initGoBack=function(){var e=document.querySelector("#tabGoBackButton");e&&e.addEventListener("click",(function(){window.history.back()}))}},9446:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initTheme=void 0,t.initTheme=function(){var e=document.querySelectorAll("#theme-toggle-dark-icon"),t=document.querySelectorAll("#theme-toggle-light-icon");"dark"===localStorage.getItem("color-theme")||!("color-theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?t.forEach((function(e){e.classList.remove("hidden")})):e.forEach((function(e){e.classList.remove("hidden")})),document.querySelectorAll("#theme-toggle").forEach((function(n){n.addEventListener("click",(function(){e.forEach((function(e){e.classList.toggle("hidden")})),t.forEach((function(e){e.classList.toggle("hidden")})),localStorage.getItem("color-theme")?"light"===localStorage.getItem("color-theme")?(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):document.documentElement.classList.contains("dark")?(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark"))}))}))}},3746:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initUnsavedChangedAlerts=void 0;var n=function(e){var t="It looks like you have been editing something. If you leave before saving, your changes will be lost.";return(e||window.event).returnValue=t,t};t.initUnsavedChangedAlerts=function(){window.location.href.includes("/settings")&&[".book-label-input",".book-about-input",".book-tags-input",".multiple-input-word",".contributor-role-select",".add-contributor-btn","input[type=checkbox]"].forEach((function(e){document.querySelectorAll(e).forEach((function(e){!function(e){e.addEventListener("click",(function(){window.addEventListener("beforeunload",n)}))}(e)}))})),document.querySelectorAll(".prevent-unsaved-changes-event").forEach((function(e){e.addEventListener("click",(function(){document.removeEventListener("beforeunload",n),window.removeEventListener("beforeunload",n)}))}))}},952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initDeleteVersion=void 0,t.initDeleteVersion=function(){var e=document.querySelector(".delete-version-id-input");e&&document.querySelectorAll(".delete-version-btn").forEach((function(t){t.addEventListener("click",(function(){var n=t.getAttribute("data-version-id");e.value=n}))}))}},3974:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initEditVersion=void 0,t.initEditVersion=function(){var e=document.querySelector(".version-id-input"),t=document.querySelector(".version-semver-input");e&&t&&document.querySelectorAll(".edit-version-label-btns").forEach((function(n){n.addEventListener("click",(function(){var r=n.getAttribute("data-version-id"),i=n.getAttribute("data-version-semver");e.value=r,t.value=i}))}))}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initVersions=void 0;var r=n(3974),i=n(952);t.initVersions=function(){(0,r.initEditVersion)(),(0,i.initDeleteVersion)()}},4970:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.initVote=void 0;var i={interpretation:"/vote/interpretation/",comment:"/vote/comment/"};t.initVote=function(){document.querySelectorAll(".vote-block").forEach((function(e){var t=e.querySelector(".vote-count"),o=e.querySelectorAll(".vote-button"),s=function(e){o.forEach((function(t){var n=t.querySelector("svg"),r=t.getAttribute("data-positive");n.classList.remove("stroke-red-500"),n.classList.remove("stroke-green-500"),r=="".concat(e)&&1==e?n.classList.add("stroke-green-500"):r=="".concat(e)&&0==e&&n.classList.add("stroke-red-500")}))};o.forEach((function(e){e.addEventListener("click",(function(o){!function(e,t,o){n(void 0,void 0,void 0,(function(){var n,s,a,l,u,c;return r(this,(function(r){switch(r.label){case 0:return(n=e.getAttribute("data-vote-for"))in i?(s=e.getAttribute("data-positive"),a=e.getAttribute("data-entity-id"),[4,fetch(i[n]+a,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({positive:s})})]):(console.error("Unknown data-vote-for attribute"),[2]);case 1:return[4,r.sent().json()];case 2:return l=r.sent(),u=l.vote_count,t.innerHTML=l.vote_count,t.classList.remove("text-red-500"),t.classList.remove("text-green-500"),u>0?t.classList.add("text-green-500"):u<0&&t.classList.add("text-red-500"),c=l.current_user_vote,o(c),[2]}}))}))}(e,t,s)}))}))}))}},5389:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),s=n(45),a=n(46),l=n(47),u=n(48),c=n(49),h=n(12),d=n(32),f=n(33),p=n(31),m=n(1),g={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:s.default,Block:l.default,Inline:a.default,Text:c.default,Attributor:{Attribute:h.default,Class:d.default,Style:f.default,Store:p.default}};t.default=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return i(t,e),t}(Error);t.ParchmentError=o;var s,a={},l={},u={},c={};function h(e,t){var n;if(void 0===t&&(t=s.ANY),"string"==typeof e)n=c[e]||a[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof e)e&s.LEVEL&s.BLOCK?n=c.block:e&s.LEVEL&s.INLINE&&(n=c.inline);else if(e instanceof HTMLElement){var r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=l[r[i]])break;n=n||u[e.tagName]}return null==n?null:t&s.LEVEL&n.scope&&t&s.TYPE&n.scope?n:null}t.DATA_KEY="__blot",function(e){e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY"}(s=t.Scope||(t.Scope={})),t.create=function(e,t){var n=h(e);if(null==n)throw new o("Unable to create "+e+" blot");var r=n,i=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:r.create(t);return new r(i,t)},t.find=function e(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=h,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map((function(t){return e(t)}));var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");return c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(l[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(e){return e.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=u[e]&&null!=r.className||(u[e]=r)})))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),s=n(20),a=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){(e(r)?t:n).push(r)})),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+s.length(t):t.delete?e-t.delete:e}),0)},l.prototype.length=function(){return this.reduce((function(e,t){return e+s.length(t)}),0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n=[],r=s.iterator(this.ops),i=0;i<t&&r.hasNext();){var o;i<e?o=r.next(e-i):(o=r.next(t-i),n.push(o)),i+=s.length(o)}return new l(n)},l.prototype.compose=function(e){for(var t=s.iterator(this.ops),n=s.iterator(e.ops),r=new l;t.hasNext()||n.hasNext();)if("insert"===n.peekType())r.push(n.next());else if("delete"===t.peekType())r.push(t.next());else{var i=Math.min(t.peekLength(),n.peekLength()),o=t.next(i),a=n.next(i);if("number"==typeof a.retain){var u={};"number"==typeof o.retain?u.retain=i:u.insert=o.insert;var c=s.attributes.compose(o.attributes,a.attributes,"number"==typeof o.retain);c&&(u.attributes=c),r.push(u)}else"number"==typeof a.delete&&"number"==typeof o.retain&&r.push(a)}return r.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new l,u=r(n[0],n[1],t),c=s.iterator(this.ops),h=s.iterator(e.ops);return u.forEach((function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(h.peekLength(),t),o.push(h.next(n));break;case r.DELETE:n=Math.min(t,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),h.peekLength(),t);var a=c.next(n),l=h.next(n);i(a.insert,l.insert)?o.retain(n,s.attributes.diff(a.attributes,l.attributes)):o.push(l).delete(n)}t-=n}})),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=s.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),a=s.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(t,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=s.iterator(this.ops),r=s.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),a=n.next(o),u=r.next(o);if(a.delete)continue;u.delete?i.push(u):i.retain(o,s.attributes.transform(a.attributes,u.attributes,t))}else i.retain(s.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=s.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r<e||!t)&&(e+=i),r+=i):e-=Math.min(i,e-r)}return e},e.exports=l},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},o=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)};e.exports=function e(){var t,n,r,s,a,l,u=arguments[0],c=1,h=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=arguments[1]||{},c=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});c<h;++c)if(null!=(t=arguments[c]))for(n in t)r=u[n],u!==(s=t[n])&&(d&&s&&(o(s)||(a=i(s)))?(a?(a=!1,l=r&&i(r)?r:[]):l=r&&o(r)?r:{},u[n]=e(d,l,s)):void 0!==s&&(u[n]=s));return u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=h(n(3)),s=h(n(2)),a=h(n(0)),l=h(n(16)),u=h(n(6)),c=h(n(7));function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=function(e){function t(){return d(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),r(t,[{key:"attach",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new s.default).insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=a.default.query(e,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var o=a.default.create(g.blotName);this.parent.insertBefore(o,0===e?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(a.default.Embed);m.scope=a.default.Scope.BLOCK_BLOT;var g=function(e){function t(e){d(this,t);var n=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return p(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce((function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))}),new s.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,o){n<=0||(a.default.query(r,a.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,o):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,o),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var o=n.split("\n"),s=o.shift();s.length>0&&(e<this.length()-1||null==this.children.tail?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});var a=this;o.reduce((function(e,t){return(a=a.split(e,!0)).insertAt(0,t),t.length}),e+s.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof l.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(a.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope?t:v(e.parent,t))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[u.default,a.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=m,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var s=g(n(2)),a=g(n(14)),l=g(n(8)),u=g(n(9)),c=g(n(0)),h=n(15),d=g(h),f=g(n(3)),p=g(n(10)),m=g(n(34));function g(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,p.default)("quill"),b=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=w(t,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.default(this.scroll),this.selection=new d.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(e){e===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;A.call(n,(function(){return n.editor.update(null,t,i)}),e)}));var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),p.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach((function(r){n.register(r,e[r],t)}))}else null==this.imports[e]||r||y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=_(e,t,n),s=i(o,4);return e=s[0],t=s[1],n=s[3],A.call(this,(function(){return r.editor.deleteText(e,t)}),n,e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return A.call(this,(function(){var r=n.getSelection(!0),i=new s.default;if(null==r)return i;if(c.default.query(e,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,l.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(e,t,n,r,o){var s,a=this,l=_(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],s=u[2],o=u[3],A.call(this,(function(){return a.editor.formatLine(e,t,s)}),o,e,0)}},{key:"formatText",value:function(e,t,n,r,o){var s,a=this,l=_(e,t,n,r,o),u=i(l,4);return e=u[0],t=u[1],s=u[2],o=u[3],A.call(this,(function(){return a.editor.formatText(e,t,s)}),o,e,0)}},{key:"getBounds",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t="number"==typeof e?this.selection.getBounds(e,n):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:t.bottom-r.top,height:t.height,left:t.left-r.left,right:t.right-r.left,top:t.top-r.top,width:t.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=_(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=_(e,t),r=i(n,2);return e=r[0],t=r[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return A.call(this,(function(){return i.editor.insertEmbed(t,n,r)}),o,t)}},{key:"insertText",value:function(e,t,n,r,o){var s,a=this,l=_(e,0,n,r,o),u=i(l,4);return e=u[0],s=u[2],o=u[3],A.call(this,(function(){return a.editor.insertText(e,t,s)}),o,e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=_(e,t,n),s=i(o,4);return e=s[0],t=s[1],n=s[3],A.call(this,(function(){return r.editor.removeFormat(e,t)}),n,e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return A.call(this,(function(){e=new s.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=_(t,n,r),s=i(o,4);t=s[0],n=s[1],r=s[3],this.selection.setRange(new h.Range(t,n),r),r!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new s.default).insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return A.call(this,(function(){return e=new s.default(e),t.editor.applyDelta(e,n)}),n,!0)}}]),e}();function w(e,t){if((t=(0,f.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw new Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=m.default;var n=(0,f.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach((function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach((function(t){!0===e.modules[t]&&(e.modules[t]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce((function(e,t){var n=b.import("modules/"+t);return null==n?y.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e}),{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,f.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach((function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),t.modules=Object.keys(t.modules).reduce((function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e}),{}),t}function A(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===l.default.sources.USER)return new s.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,a=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=E(i,a,t):0!==r&&(i=E(i,n,r,t)),this.setSelection(i,l.default.sources.SILENT)),a.length()>0){var u,c,h=[l.default.events.TEXT_CHANGE,a,o,t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(h)),t!==l.default.sources.SILENT&&(c=this.emitter).emit.apply(c,h)}return a}function _(e,t,n,i,o){var s={};return"number"==typeof e.index&&"number"==typeof e.length?"number"!=typeof t?(o=i,i=n,n=t,t=e.length,e=e.index):(t=e.length,e=e.index):"number"!=typeof t&&(o=i,i=n,n=t,t=0),"object"===(void 0===n?"undefined":r(n))?(s=n,o=i):"string"==typeof n&&(null!=i?s[n]=i:o=n),[e,t,s,o=o||l.default.sources.API]}function E(e,t,n,r){if(null==e)return null;var o=void 0,a=void 0;if(t instanceof s.default){var u=[e.index,e.index+e.length].map((function(e){return t.transformPosition(e,r!==l.default.sources.USER)})),c=i(u,2);o=c[0],a=c[1]}else{var d=[e.index,e.index+e.length].map((function(e){return e<t||e===t&&r===l.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)})),f=i(d,2);o=f[0],a=f[1]}return new h.Range(o,a-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=l.default.events,b.sources=l.default.sources,b.version="1.3.6",b.imports={delta:s.default,parchment:c.default,"core/module":u.default,"core/theme":m.default},t.expandConfig=w,t.overload=_,t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=a(n(7)),s=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,o){if(t.compare(this.statics.blotName,r)<0&&s.default.query(r,s.default.Scope.BLOT)){var a=this.isolate(e,n);o&&a.wrap(r,o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o)}},{key:"optimize",value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(s.default.Inline);l.allowedChildren=[l,s.default.Embed,o.default],l.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Text);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=s(n(54));function s(e){return e&&e.__esModule?e:{default:e}}var a=(0,s(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((function(e){document.addEventListener(e,(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach((function(e){var n;e.__quill&&e.__quill.emitter&&(n=e.__quill.emitter).handleDOM.apply(n,t)}))}))}));var l=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",a.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){a.log.apply(a,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach((function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))}))}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(o.default);l.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},l.sources={API:"api",SILENT:"silent",USER:"user"},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];(t=console)[e].apply(t,o)}}function s(e){return r.reduce((function(t,n){return t[n]=o.bind(console,n,e),t}),{})}o.level=s.level=function(e){i=e},t.default=s},function(e,t,n){var r=Array.prototype.slice,i=n(52),o=n(53),s=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var u,c;if(a(e)||a(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e))return!!o(t)&&(e=r.call(e),t=r.call(t),s(e,t,n));if(l(e)){if(!l(t))return!1;if(e.length!==t.length)return!1;for(u=0;u<e.length;u++)if(e[u]!==t[u])return!1;return!0}try{var h=i(e),d=i(t)}catch(e){return!1}if(h.length!=d.length)return!1;for(h.sort(),d.sort(),u=h.length-1;u>=0;u--)if(h[u]!=d[u])return!1;for(u=h.length-1;u>=0;u--)if(c=h[u],!s(e[c],t[c],n))return!1;return typeof e==typeof t}(e,t,n))};function a(e){return null==e}function l(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,(function(e){return e.name}))},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=h(n(2)),a=h(n(0)),l=h(n(4)),u=h(n(6)),c=h(n(7));function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=function(e){function t(){return d(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),t}(u.default);m.blotName="code",m.tagName="CODE";var g=function(e){function t(){return d(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),i(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce((function(t,n){return t.insert(n).insert("\n",e.formats())}),new s.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var i=this.descendant(c.default,this.length()-1),s=r(i,1)[0];null!=s&&s.deleteAt(s.length()-1,1),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=a.default.query(r,a.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0||o>=e+n)){var s=this.newlineIndex(e,!0)+1,l=o-s+1,u=this.isolate(s,l),c=u.next;u.format(r,i),c instanceof t&&c.formatAt(0,e-s+n-l,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=this.descendant(c.default,e),o=r(i,2),s=o[0],a=o[1];s.insertAt(a,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var t=this.domNode.textContent.slice(e).indexOf("\n");return t>-1?e+t:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(a.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(e){var t=a.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof a.default.Embed?t.remove():t.unwrap()}))}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",t.Code=m,t.default=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=v(n(2)),a=v(n(20)),l=v(n(0)),u=v(n(13)),c=v(n(24)),h=n(4),d=v(h),f=v(n(16)),p=v(n(21)),m=v(n(11)),g=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}var y=/^[ -~]*$/,b=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scroll=t,this.delta=this.getDelta()}return o(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(e=function(e){return e.reduce((function(e,t){if(1===t.insert){var n=(0,p.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null==t.attributes||!0!==t.attributes.list&&!0!==t.attributes.bullet||((t=(0,p.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)}),new s.default)}(e)).reduce((function(e,s){var u=s.retain||s.delete||s.insert.length||1,c=s.attributes||{};if(null!=s.insert){if("string"==typeof s.insert){var f=s.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),e>=o&&!f.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,f);var p=t.scroll.line(e),m=i(p,2),v=m[0],y=m[1],b=(0,g.default)({},(0,h.bubbleFormats)(v));if(v instanceof d.default){var w=v.descendant(l.default.Leaf,y),A=i(w,1)[0];b=(0,g.default)(b,(0,h.bubbleFormats)(A))}c=a.default.attributes.diff(b,c)||{}}else if("object"===r(s.insert)){var _=Object.keys(s.insert)[0];if(null==_)return e;t.scroll.insertAt(e,_,s.insert[_])}o+=u}return Object.keys(c).forEach((function(n){t.scroll.formatAt(e,u,n,c[n])})),e+u}),0),e.reduce((function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update((new s.default).retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),s=t;o.forEach((function(t){var o=t.length();if(t instanceof u.default){var a=e-t.offset(n.scroll),l=t.newlineIndex(a+s)-a+1;t.formatAt(a,l,i,r[i])}else t.format(i,r[i]);s-=o}))}})),this.scroll.optimize(),this.update((new s.default).retain(e).retain(t,(0,p.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t,i,r[i])})),this.update((new s.default).retain(e).retain(t,(0,p.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(e,t){return e.concat(t.delta())}),new s.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach((function(e){var t=i(e,1)[0];t instanceof d.default?n.push(t):t instanceof l.default.Leaf&&r.push(t)})):(n=this.scroll.lines(e,t),r=this.scroll.descendants(l.default.Leaf,e,t));var o=[n,r].map((function(e){if(0===e.length)return{};for(var t=(0,h.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)return t;t=w((0,h.bubbleFormats)(n),t)}return t}));return g.default.apply(g.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter((function(e){return"string"==typeof e.insert})).map((function(e){return e.insert})).join("")}},{key:"insertEmbed",value:function(e,t,n){return this.scroll.insertAt(e,t,n),this.update((new s.default).retain(e).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach((function(i){n.scroll.formatAt(e,t.length,i,r[i])})),this.update((new s.default).retain(e).insert(t,(0,p.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===d.default.blotName&&!(e.children.length>1)&&e.children.head instanceof f.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=this.scroll.line(e+t),o=i(r,2),a=o[0],l=o[1],c=0,h=new s.default;null!=a&&(c=a instanceof u.default?a.newlineIndex(l)-l+1:a.length()-l,h=a.delta().slice(l,l+c-1).insert("\n"));var d=this.getContents(e,t+c).diff((new s.default).insert(n).concat(h)),f=(new s.default).retain(e).concat(d);return this.applyDelta(f)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&l.default.find(t[0].target)){var i=l.default.find(t[0].target),o=(0,h.bubbleFormats)(i),a=i.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),d=(new s.default).insert(u),f=(new s.default).insert(i.value());e=(new s.default).retain(a).concat(d.diff(f,n)).reduce((function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)}),new s.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,m.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();function w(e,t){return Object.keys(t).reduce((function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?t[r].indexOf(e[r])<0&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n}),{})}t.default=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(0)),s=u(n(21)),a=u(n(11)),l=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=(0,u(n(10)).default)("quill:selection"),f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;h(this,e),this.index=t,this.length=n},p=function(){function e(t,n){var r=this;h(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(e,t){e===l.default.events.TEXT_CHANGE&&t.length()>0&&r.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,s=n.endNode,a=n.endOffset;r.setNativeRange(i,o,s,a)}})),this.update(l.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",(function(){e.composing=!0})),this.root.addEventListener("compositionend",(function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();if(!t)return;setTimeout((function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,(function(){e.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){e.mouseDown=!1,e.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(e,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();e=Math.min(e,n-1),t=Math.min(e+t,n-1)-e;var i=void 0,o=this.scroll.leaf(e),s=r(o,2),a=s[0],l=s[1];if(null==a)return null;var u=a.position(l,!0),c=r(u,2);i=c[0],l=c[1];var h=document.createRange();if(t>0){h.setStart(i,l);var d=this.scroll.leaf(e+t),f=r(d,2);if(a=f[0],l=f[1],null==a)return null;var p=a.position(l,!0),m=r(p,2);return i=m[0],l=m[1],h.setEnd(i,l),h.getBoundingClientRect()}var g="left",v=void 0;return i instanceof Text?(l<i.data.length?(h.setStart(i,l),h.setEnd(i,l+1)):(h.setStart(i,l-1),h.setEnd(i,l),g="right"),v=h.getBoundingClientRect()):(v=a.domNode.getBoundingClientRect(),l>0&&(g="right")),{bottom:v.top+v.height,height:v.height,left:v[g],right:v[g],top:v.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map((function(e){var n=r(e,2),i=n[0],s=n[1],a=o.default.find(i,!0),l=a.offset(t.scroll);return 0===s?l:a instanceof o.default.Container?l+a.length():l+a.index(i,s)})),s=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),a=Math.min.apply(Math,[s].concat(c(i)));return new f(a,s-a)}},{key:"normalizeNative",value:function(e){if(!m(this.root,e.startContainer)||!e.collapsed&&!m(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach((function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else{if(t.childNodes.length!==n)break;n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1}e.node=t,e.offset=n})),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach((function(e,n){e=Math.min(o-1,e);var s,a=t.scroll.leaf(e),l=r(a,2),u=l[0],c=l[1],h=u.position(c,0!==n),d=r(h,2);s=d[0],c=d[1],i.push(s,c)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(t.index,i)),s=r(o,1)[0],a=s;if(t.length>0){var l=this.scroll.line(Math.min(t.index+t.length,i));a=r(l,1)[0]}if(null!=s&&null!=a){var u=e.getBoundingClientRect();n.top<u.top?e.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(e.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=e){this.hasFocus()||this.root.focus();var s=(this.getNativeRange()||{}).native;if(null==s||i||e!==s.startContainer||t!==s.startOffset||n!==s.endContainer||r!==s.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(e,t),a.setEnd(n,r),o.removeAllRanges(),o.addRange(a)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t&&(n=t,t=!1),d.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,t=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],u=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(t,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var h,d=[l.default.events.SELECTION_CHANGE,(0,s.default)(this.lastRange),(0,s.default)(t),e];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(d)),e!==l.default.sources.SILENT&&(h=this.emitter).emit.apply(h,d)}}}]),e}();function m(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=f,t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"insertInto",value:function(e,n){0===e.children.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Embed);s.blotName="break",s.tagName="BR",t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(44),s=n(30),a=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return i(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach((function(e){e.attach()}))},t.prototype.build=function(){var e=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach((function(t){try{var n=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof a.ParchmentError)return;throw e}}))},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,(function(e,t,n){e.deleteAt(t,n)}))},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,s){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=s})),i},t.prototype.detach=function(){this.children.forEach((function(e){e.detach()})),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,(function(e,t,i){e.formatAt(t,i,n,r)}))},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var s=null==n?a.create("text",t):a.create(t,n);this.appendChild(s)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some((function(t){return e instanceof t})))throw new a.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce((function(e,t){return e+t.length()}),0)},t.prototype.moveChildren=function(e,t){this.children.forEach((function(n){e.insertBefore(n,t)}))},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],s=[[this,e]];return i instanceof t?s.concat(i.path(o,n)):(null!=i&&s.push([i,o]),s)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),(function(e,r,i){e=e.split(r,t),n.appendChild(e)})),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach((function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))})),i.forEach((function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=a.find(e);null!=t&&(null!=t.domNode.parentNode&&t.domNode.parentNode!==n.domNode||t.detach())}})),r.filter((function(e){return e.parentNode==n.domNode})).sort((function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(e){var t=null;null!=e.nextSibling&&(t=a.find(e.nextSibling));var r=u(e);r.next==t&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))}))},t}(s.default);function u(e){var t=a.find(e);if(null==t)try{t=a.create(e)}catch(n){t=a.create(a.Scope.INLINE),[].slice.call(e.childNodes).forEach((function(e){t.domNode.appendChild(e)})),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),s=n(31),a=n(17),l=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new s.default(n.domNode),n}return i(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=l.query(e);n instanceof o.default?this.attributes.attribute(n,t):t&&(null==n||e===this.statics.blotName&&this.formats()[e]===t||this.replaceWith(e,t))},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some((function(e){return e.target===r.domNode&&"attributes"===e.type}))&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(a.default);t.default=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),s=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e;var e},t.scope=s.Scope.INLINE_BLOT,t}(o.default);t.default=a},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce((function(e,t){return null!=r[t]&&(e[t]=r[t]),e}),{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce((function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce((function(n,r){return void 0===e[r]&&(n[r]=t[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new s(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function s(e){this.ops=e,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(t){var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i}return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},s.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},e.exports=o},function(e,t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,n,r;try{t=Map}catch(e){t=function(){}}try{n=Set}catch(e){n=function(){}}try{r=Promise}catch(e){r=function(){}}function i(o,a,l,u,c){"object"==typeof a&&(l=a.depth,u=a.prototype,c=a.includeNonEnumerable,a=a.circular);var h=[],d=[],f="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function o(l,p){if(null===l)return null;if(0===p)return l;var m,g;if("object"!=typeof l)return l;if(e(l,t))m=new t;else if(e(l,n))m=new n;else if(e(l,r))m=new r((function(e,t){l.then((function(t){e(o(t,p-1))}),(function(e){t(o(e,p-1))}))}));else if(i.__isArray(l))m=[];else if(i.__isRegExp(l))m=new RegExp(l.source,s(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(i.__isDate(l))m=new Date(l.getTime());else{if(f&&Buffer.isBuffer(l))return m=new Buffer(l.length),l.copy(m),m;e(l,Error)?m=Object.create(l):void 0===u?(g=Object.getPrototypeOf(l),m=Object.create(g)):(m=Object.create(u),g=u)}if(a){var v=h.indexOf(l);if(-1!=v)return d[v];h.push(l),d.push(m)}for(var y in e(l,t)&&l.forEach((function(e,t){var n=o(t,p-1),r=o(e,p-1);m.set(n,r)})),e(l,n)&&l.forEach((function(e){var t=o(e,p-1);m.add(t)})),l){var b;g&&(b=Object.getOwnPropertyDescriptor(g,y)),b&&null==b.set||(m[y]=o(l[y],p-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(l);for(y=0;y<w.length;y++){var A=w[y];(!(E=Object.getOwnPropertyDescriptor(l,A))||E.enumerable||c)&&(m[A]=o(l[A],p-1),E.enumerable||Object.defineProperty(m,A,{enumerable:!1}))}}if(c){var _=Object.getOwnPropertyNames(l);for(y=0;y<_.length;y++){var E,M=_[y];(E=Object.getOwnPropertyDescriptor(l,M))&&E.enumerable||(m[M]=o(l[M],p-1),Object.defineProperty(m,M,{enumerable:!1}))}}return m}(o,l)}function o(e){return Object.prototype.toString.call(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=s,i}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=f(n(0)),a=f(n(8)),l=n(4),u=f(l),c=f(n(16)),h=f(n(13)),d=f(n(25));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return e instanceof u.default||e instanceof l.BlockEmbed}var m=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce((function(e,t){return e[t]=!0,e}),{})),r.domNode.addEventListener("DOMNodeInserted",(function(){})),r.optimize(),r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var i=this.line(e),s=r(i,2),a=s[0],u=s[1],d=this.line(e+n),f=r(d,1)[0];if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=f&&a!==f&&u>0){if(a instanceof l.BlockEmbed||f instanceof l.BlockEmbed)return void this.optimize();if(a instanceof h.default){var p=a.newlineIndex(a.length(),!0);if(p>-1&&(a=a.split(p+1))===f)return void this.optimize()}else if(f instanceof h.default){var m=f.newlineIndex(0);m>-1&&f.split(m+1)}var g=f.children.head instanceof c.default?null:f.children.head;a.moveChildren(f,g),a.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length())if(null==r||null==s.default.query(n,s.default.Scope.BLOCK)){var i=s.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var a=s.default.create(n,r);this.appendChild(a)}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===s.default.Scope.INLINE_BLOT){var r=s.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(p,e)}},{key:"lines",value:function(){return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,(function(t,n,r){p(t)?i.push(t):t instanceof s.default.Container&&(i=i.concat(e(t,n,o))),o-=r})),i}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=a.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,e)}}}]),t}(s.default.Scroll);m.blotName="scroll",m.className="ql-editor",m.tagName="DIV",m.defaultChild="block",m.allowedChildren=[u.default,l.BlockEmbed,d.default],t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=m(n(21)),a=m(n(11)),l=m(n(3)),u=m(n(2)),c=m(n(20)),h=m(n(0)),d=m(n(5)),f=m(n(10)),p=m(n(9));function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,f.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach((function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])})),r.addBinding({key:t.keys.ENTER,shiftKey:null},M),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},(function(){})),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},A),r.addBinding({key:t.keys.DELETE},{collapsed:!0},_)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},A),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},_)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},E),r.addBinding({key:t.keys.DELETE},{collapsed:!1},E),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},A),r.listen(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"match",value:function(e,t){return t=x(t),!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!t[n]!==e[n]&&null!==t[n]}))&&t.key===(e.which||e.keyCode)}}]),o(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=x(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,l.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,s=(e.bindings[o]||[]).filter((function(e){return t.match(n,e)}));if(0!==s.length){var l=e.quill.getSelection();if(null!=l&&e.quill.hasFocus()){var u=e.quill.getLine(l.index),c=i(u,2),d=c[0],f=c[1],p=e.quill.getLeaf(l.index),m=i(p,2),g=m[0],v=m[1],y=0===l.length?[g,v]:e.quill.getLeaf(l.index+l.length),b=i(y,2),w=b[0],A=b[1],_=g instanceof h.default.Text?g.value().slice(0,v):"",E=w instanceof h.default.Text?w.value().slice(A):"",M={collapsed:0===l.length,empty:0===l.length&&d.length()<=1,format:e.quill.getFormat(l),offset:f,prefix:_,suffix:E};s.some((function(t){if(null!=t.collapsed&&t.collapsed!==M.collapsed)return!1;if(null!=t.empty&&t.empty!==M.empty)return!1;if(null!=t.offset&&t.offset!==M.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((function(e){return null==M.format[e]})))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every((function(e){return!0===t.format[e]?null!=M.format[e]:!1===t.format[e]?null==M.format[e]:(0,a.default)(t.format[e],M.format[e])})))return!1;return!(null!=t.prefix&&!t.prefix.test(M.prefix)||null!=t.suffix&&!t.suffix.test(M.suffix)||!0===t.handler.call(e,l,M))}))&&n.preventDefault()}}}}))}}]),t}(p.default);function w(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return g(n={key:e,shiftKey:t,altKey:null},r,/^$/),g(n,"handler",(function(n){var r=n.index;e===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof h.default.Embed&&(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),1))})),n}function A(e,t){if(!(0===e.index||this.quill.getLength()<=1)){var n=this.quill.getLine(e.index),r=i(n,1)[0],o={};if(0===t.offset){var s=this.quill.getLine(e.index-1),a=i(s,1)[0];if(null!=a&&a.length()>1){var l=r.formats(),u=this.quill.getFormat(e.index-1,1);o=c.default.attributes.diff(l,u)||{}}}var h=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-h,h,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(e.index-h,h,o,d.default.sources.USER),this.quill.focus()}}function _(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,s=this.quill.getLine(e.index),a=i(s,1)[0];if(t.offset>=a.length()-1){var l=this.quill.getLine(e.index+1),u=i(l,1)[0];if(u){var h=a.formats(),f=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(h,f)||{},o=u.length()}}this.quill.deleteText(e.index,n,d.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,d.default.sources.USER)}}function E(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,d.default.sources.USER),this.quill.setSelection(e.index,d.default.sources.SILENT),this.quill.focus()}function M(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce((function(e,n){return h.default.query(n,h.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e}),{});this.quill.insertText(e.index,"\n",r,d.default.sources.USER),this.quill.setSelection(e.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach((function(e){null==r[e]&&(Array.isArray(t.format[e])||"link"!==e&&n.quill.format(e,t.format[e],d.default.sources.USER))}))}function k(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=h.default.query("code-block"),r=t.index,o=t.length,s=this.quill.scroll.descendant(n,r),a=i(s,2),l=a[0],u=a[1];if(null!=l){var c=this.quill.getIndex(l),f=l.newlineIndex(u,!0)+1,p=l.newlineIndex(c+u+o),m=l.domNode.textContent.slice(f,p).split("\n");u=0,m.forEach((function(t,i){e?(l.insertAt(f+u,n.TAB),u+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(f+u,n.TAB.length),u-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),u+=t.length+1})),this.quill.update(d.default.sources.USER),this.quill.setSelection(r,o,d.default.sources.SILENT)}}}}function S(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],d.default.sources.USER)}}}function x(e){if("string"==typeof e||"number"==typeof e)return x({key:e});if("object"===(void 0===e?"undefined":r(e))&&(e=(0,s.default)(e,!1)),"string"==typeof e.key)if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",d.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":k(!0),"outdent code-block":k(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=(new u.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(t,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,d.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,d.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],s=(0,l.default)({},r.formats(),{list:"checked"}),a=(new u.default).retain(e.index).insert("\n",s).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,d.default.sources.USER),this.quill.setSelection(e.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=this.quill.getLine(e.index),r=i(n,2),o=r[0],s=r[1],a=(new u.default).retain(e.index).insert("\n",t.format).retain(o.length()-s-1).retain(1,{header:null});this.quill.updateContents(a,d.default.sources.USER),this.quill.setSelection(e.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=this.quill.getLine(e.index),o=i(r,2),s=o[0],a=o[1];if(a>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(e.index-a).delete(n+1).retain(s.length()-2-a).retain(1,{list:l});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,d.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=this.quill.getLine(e.index),n=i(t,2),r=n[0],o=n[1],s=(new u.default).retain(e.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(s,d.default.sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=a(n(0)),s=a(n(7));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"value",value:function(){}}]),i(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var i=this,s=0;null!=i&&i.statics.scope!==o.default.Scope.BLOCK_BLOT;)s+=i.offset(i.parent),i=i.parent;null!=i&&(this._length=t.CONTENTS.length,i.optimize(),i.formatAt(s,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),r=void 0,i=void 0,a=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var l=[e,n.start.offset,n.end.offset];r=l[0],i=l[1],a=l[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var u=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof s.default?(r=this.next.domNode,this.next.insertAt(0,u),this.textNode.data=t.CONTENTS):(this.textNode.data=u,this.parent.insertBefore(o.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}([i,a].map((function(e){return Math.max(0,Math.min(r.data.length,e-1))})),2);return i=c[0],a=c[1],{startNode:r,startOffset:i,endNode:r,endOffset:a}}}}},{key:"update",value:function(e,t){var n=this;if(e.some((function(e){return"characterData"===e.type&&e.target===n.textNode}))){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(o.default.Embed);l.blotName="cursor",l.className="ql-cursor",l.tagName="span",l.CONTENTS="\ufeff",t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(0)),i=n(4),o=s(i);function s(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);a.allowedChildren=[o.default,i.BlockEmbed,a],t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=(r=n(0))&&r.__esModule?r:{default:r},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map((function(e){return("00"+parseInt(e).toString(16)).slice(-2)})).join(""):n}}]),t}(s.default.Attributor.Style),l=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),u=new a("color","color",{scope:s.default.Scope.INLINE});t.ColorAttributor=a,t.ColorClass=l,t.ColorStyle=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return a(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);function a(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=s,t.sanitize=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=a(n(23)),s=a(n(107));function a(e){return e&&e.__esModule?e:{default:e}}var l=0;function u(e,t){e.setAttribute(t,!("true"===e.getAttribute(t)))}var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(function(){n.togglePicker()})),this.label.addEventListener("keydown",(function(e){switch(e.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),e.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}return i(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),n.classList.add("hover:bg-gray-200"),n.classList.add("dark:hover:bg-gray-700"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",(function(){t.selectItem(n,!0)})),n.addEventListener("keydown",(function(e){switch(e.keyCode){case o.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case o.default.keys.ESCAPE:t.escape(),e.preventDefault()}})),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=s.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.classList.add("bg-gray-50"),t.classList.add("dark:bg-gray-600"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+l,l+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach((function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)})),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach((function(t){e.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout((function(){return e.label.focus()}),1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),s=v(o),a=v(n(16)),l=v(n(25)),u=v(n(24)),c=v(n(35)),h=v(n(6)),d=v(n(22)),f=v(n(7)),p=v(n(55)),m=v(n(42)),g=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":s.default,"blots/block/embed":o.BlockEmbed,"blots/break":a.default,"blots/container":l.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":h.default,"blots/scroll":d.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":m.default,"modules/keyboard":g.default}),r.default.register(s.default,a.default,u.default,h.default,d.default,f.default),t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var t;return Array.isArray(this.tagName)?("string"==typeof e&&(e=e.toUpperCase(),parseInt(e).toString()===e&&(e=parseInt(e))),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var s=r.create(this.statics.scope);o.wrap(s),s.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),this.domNode.parentNode==e.domNode&&this.domNode.nextSibling==n||e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return void 0===e&&(e=this.parent),null==this.parent||this==e?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),s=n(1),a=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),a=o.default.keys(this.domNode);t.concat(n).concat(a).forEach((function(t){var n=s.query(t,s.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)}))},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach((function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)}))},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach((function(e){t.attributes[e].remove(t.domNode)})),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce((function(t,n){return t[n]=e.attributes[n].value(e.domNode),t}),{})},e}();t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter((function(e){return 0===e.indexOf(t+"-")}))}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map((function(e){return e.split("-").slice(0,-1).join("-")}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){o(e,this.keyName).forEach((function(t){e.classList.remove(t)})),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(o(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e){var t=e.split("-"),n=t.slice(1).map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map((function(e){return e.split(":")[0].trim()}))},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[o(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[o(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[o(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach((function(t){null==e.modules[t]&&e.addModule(t)}))}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=a(n(0)),s=a(n(7));function a(e){return e&&e.__esModule?e:{default:e}}var l="\ufeff",u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach((function(e){n.contentNode.appendChild(e)})),n.leftGuard=document.createTextNode(l),n.rightGuard=document.createTextNode(l),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split(l).join("");if(e===this.leftGuard)if(this.prev instanceof s.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof s.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data=l,t}},{key:"update",value:function(e,t){var n=this;e.forEach((function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}}))}}]),t}(o.default.Embed);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},s=new i.default.Attributor.Attribute("align","align",o),a=new i.default.Attributor.Class("align","ql-align",o),l=new i.default.Attributor.Style("align","text-align",o);t.AlignAttribute=s,t.AlignClass=a,t.AlignStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(26),s=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),a=new o.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});t.BackgroundClass=s,t.BackgroundStyle=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},s=new i.default.Attributor.Attribute("direction","dir",o),a=new i.default.Attributor.Class("direction","ql-direction",o),l=new i.default.Attributor.Style("direction","direction",o);t.DirectionAttribute=s,t.DirectionClass=a,t.DirectionStyle=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=(r=n(0))&&r.__esModule?r:{default:r},a={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},l=new s.default.Attributor.Class("font","ql-font",a),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(s.default.Attributor.Style),c=new u("font","font-family",a);t.FontStyle=c,t.FontClass=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),s=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=o,t.SizeStyle=s},function(e,t,n){"use strict";e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=s(n(0)),o=s(n(5));function s(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,(function(e,t,n,i){e!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(t):r.record(t,n))})),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],o.default.sources.USER),this.ignoreChange=!1;var r=l(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})),this.stack.redo.forEach((function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(s(n(9)).default);function l(e){var t=e.reduce((function(e,t){return e+(t.delete||0)}),0),n=e.length()-t;return function(e){var t=e.ops[e.ops.length-1];return null!=t&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some((function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)})))}(e)&&(n-=1),n}a.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=a,t.getLastChangeIndex=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=p(n(3)),s=p(n(2)),a=p(n(8)),l=p(n(23)),u=p(n(34)),c=p(n(59)),h=p(n(60)),d=p(n(28)),f=p(n(61));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],w=[!1,"serif","monospace"],A=["1","2","3",!1],_=["small",!1,"large","huge"],E=function(e){function t(e,n){m(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,(function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach((function(e){e.container.contains(n.target)||e.close()}))})),r}return v(t,e),r(t,[{key:"addModule",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach((function(e){(e.getAttribute("class")||"").split(/\s+/).forEach((function(n){if(n.startsWith("ql-")&&(n=n.slice(3),null!=t[n]))if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}))}))}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map((function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&k(e,y),new h.default(e,t.align);if(e.classList.contains("ql-background")||e.classList.contains("ql-color")){var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&k(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}return null==e.querySelector("option")&&(e.classList.contains("ql-font")?k(e,w):e.classList.contains("ql-header")?k(e,A):e.classList.contains("ql-size")&&k(e,_)),new d.default(e)})),this.quill.on(a.default.events.EDITOR_CHANGE,(function(){n.pickers.forEach((function(e){e.update()}))}))}}]),t}(u.default);E.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",(function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents((new s.default).retain(r.index).delete(r.length).insert({image:n.target.result}),a.default.sources.USER),e.quill.setSelection(r.index+1,a.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}})),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var M=function(e){function t(e,n){m(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",(function(t){l.default.match(t,"enter")?(e.save(),t.preventDefault()):l.default.match(t,"escape")&&(e.cancel(),t.preventDefault())}))}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,a.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":n=(t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(f.default);function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)}))}t.BaseTooltip=M,t.default=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return-1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],s=e-i[1],a=this.iterator(o);(r=a())&&s<e+t;){var l=r.length();e>s?n(r,e-s,Math.min(t,s+l-e)):n(r,0,Math.min(l,e+t-s)),s+=l}},e.prototype.map=function(e){return this.reduce((function(t,n){return t.push(e(n)),t}),[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),s=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver((function(e){n.update(e)})),n.observer.observe(n.domNode,a),n.attach(),n}return i(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach((function(e){e.remove()})):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)t.push(i.pop());for(var a=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[s.DATA_KEY].mutations&&(e.domNode[s.DATA_KEY].mutations=[]),t&&a(e.parent))},l=function(e){null!=e.domNode[s.DATA_KEY]&&null!=e.domNode[s.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(l),e.optimize(n))},u=t,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(e){var t=s.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(a(s.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,(function(e){var t=s.find(e,!1);a(t,!1),t instanceof o.default&&t.children.forEach((function(e){a(e,!1)}))}))):"attributes"===e.type&&a(t.prev)),a(t))})),this.children.forEach(l),i=(u=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)t.push(i.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map((function(e){var t=s.find(e.target,!0);return null==t?null:null==t.domNode[s.DATA_KEY].mutations?(t.domNode[s.DATA_KEY].mutations=[e],t):(t.domNode[s.DATA_KEY].mutations.push(e),null)})).forEach((function(e){null!=e&&e!==r&&null!=e.domNode[s.DATA_KEY]&&e.update(e.domNode[s.DATA_KEY].mutations||[],n)})),null!=this.domNode[s.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[s.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="DIV",t}(o.default);t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach((function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)})),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||s.query(r,s.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=s.Scope.INLINE_BLOT,t.tagName="SPAN",t}(o.default);t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),s=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){var r=s.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=s.query(n,s.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=s.query(r,s.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=s.query(n,s.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=s.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=s.Scope.BLOCK_BLOT,t.tagName="P",t}(o.default);t.default=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),s=n(1),a=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return i(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=s.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some((function(e){return"characterData"===e.type&&e.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=s.Scope.INLINE_BLOT,t}(o.default);t.default=a},function(e,t,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return-1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",(function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)}))},function(e,t){var n=-1,r=1,i=0;function o(e,t,c){if(e==t)return e?[[i,e]]:[];(c<0||e.length<c)&&(c=null);var d=a(e,t),f=e.substring(0,d);d=l(e=e.substring(d),t=t.substring(d));var p=e.substring(e.length-d),m=function(e,t){var u;if(!e)return[[r,t]];if(!t)return[[n,e]];var c=e.length>t.length?e:t,h=e.length>t.length?t:e,d=c.indexOf(h);if(-1!=d)return u=[[r,c.substring(0,d)],[i,h],[r,c.substring(d+h.length)]],e.length>t.length&&(u[0][0]=u[2][0]=n),u;if(1==h.length)return[[n,e],[r,t]];var f=function(e,t){var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;function i(e,t,n){for(var r,i,o,s,u=e.substring(n,n+Math.floor(e.length/4)),c=-1,h="";-1!=(c=t.indexOf(u,c+1));){var d=a(e.substring(n),t.substring(c)),f=l(e.substring(0,n),t.substring(0,c));h.length<f+d&&(h=t.substring(c-f,c)+t.substring(c,c+d),r=e.substring(0,n-f),i=e.substring(n+d),o=t.substring(0,c-f),s=t.substring(c+d))}return 2*h.length>=e.length?[r,i,o,s,h]:null}var o,s,u,c,h,d=i(n,r,Math.ceil(n.length/4)),f=i(n,r,Math.ceil(n.length/2));return d||f?(o=f?d&&d[4].length>f[4].length?d:f:d,e.length>t.length?(s=o[0],u=o[1],c=o[2],h=o[3]):(c=o[0],h=o[1],s=o[2],u=o[3]),[s,u,c,h,o[4]]):null}(e,t);if(f){var p=f[0],m=f[1],g=f[2],v=f[3],y=f[4],b=o(p,g),w=o(m,v);return b.concat([[i,y]],w)}return function(e,t){for(var i=e.length,o=t.length,a=Math.ceil((i+o)/2),l=a,u=2*a,c=new Array(u),h=new Array(u),d=0;d<u;d++)c[d]=-1,h[d]=-1;c[l+1]=0,h[l+1]=0;for(var f=i-o,p=f%2!=0,m=0,g=0,v=0,y=0,b=0;b<a;b++){for(var w=-b+m;w<=b-g;w+=2){for(var A=l+w,_=(x=w==-b||w!=b&&c[A-1]<c[A+1]?c[A+1]:c[A-1]+1)-w;x<i&&_<o&&e.charAt(x)==t.charAt(_);)x++,_++;if(c[A]=x,x>i)g+=2;else if(_>o)m+=2;else if(p&&(k=l+f-w)>=0&&k<u&&-1!=h[k]&&x>=(M=i-h[k]))return s(e,t,x,_)}for(var E=-b+v;E<=b-y;E+=2){for(var M,k=l+E,S=(M=E==-b||E!=b&&h[k-1]<h[k+1]?h[k+1]:h[k-1]+1)-E;M<i&&S<o&&e.charAt(i-M-1)==t.charAt(o-S-1);)M++,S++;if(h[k]=M,M>i)y+=2;else if(S>o)v+=2;else if(!p){var x;if((A=l+f-E)>=0&&A<u&&-1!=c[A]&&(_=l+(x=c[A])-A,x>=(M=i-M)))return s(e,t,x,_)}}}return[[n,e],[r,t]]}(e,t)}(e=e.substring(0,e.length-d),t=t.substring(0,t.length-d));return f&&m.unshift([i,f]),p&&m.push([i,p]),u(m),null!=c&&(m=function(e,t){var r=function(e,t){if(0===t)return[i,e];for(var r=0,o=0;o<e.length;o++){var s=e[o];if(s[0]===n||s[0]===i){var a=r+s[1].length;if(t===a)return[o+1,e];if(t<a){e=e.slice();var l=t-r,u=[s[0],s[1].slice(0,l)],c=[s[0],s[1].slice(l)];return e.splice(o,1,u,c),[o+1,e]}r=a}}throw new Error("cursor_pos is out of bounds!")}(e,t),o=r[1],s=r[0],a=o[s],l=o[s+1];if(null==a)return e;if(a[0]!==i)return e;if(null!=l&&a[1]+l[1]===l[1]+a[1])return o.splice(s,2,l,a),h(o,s,2);if(null!=l&&0===l[1].indexOf(a[1])){o.splice(s,2,[l[0],a[1]],[0,a[1]]);var u=l[1].slice(a[1].length);return u.length>0&&o.splice(s+2,0,[l[0],u]),h(o,s,3)}return e}(m,c)),function(e){for(var t=!1,o=function(e){return e.charCodeAt(0)>=56320&&e.charCodeAt(0)<=57343},s=2;s<e.length;s+=1)e[s-2][0]===i&&((a=e[s-2][1]).charCodeAt(a.length-1)>=55296&&a.charCodeAt(a.length-1)<=56319)&&e[s-1][0]===n&&o(e[s-1][1])&&e[s][0]===r&&o(e[s][1])&&(t=!0,e[s-1][1]=e[s-2][1].slice(-1)+e[s-1][1],e[s][1]=e[s-2][1].slice(-1)+e[s][1],e[s-2][1]=e[s-2][1].slice(0,-1));var a;if(!t)return e;var l=[];for(s=0;s<e.length;s+=1)e[s][1].length>0&&l.push(e[s]);return l}(m)}function s(e,t,n,r){var i=e.substring(0,n),s=t.substring(0,r),a=e.substring(n),l=t.substring(r),u=o(i,s),c=o(a,l);return u.concat(c)}function a(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function l(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function u(e){e.push([i,""]);for(var t,o=0,s=0,c=0,h="",d="";o<e.length;)switch(e[o][0]){case r:c++,d+=e[o][1],o++;break;case n:s++,h+=e[o][1],o++;break;case i:s+c>1?(0!==s&&0!==c&&(0!==(t=a(d,h))&&(o-s-c>0&&e[o-s-c-1][0]==i?e[o-s-c-1][1]+=d.substring(0,t):(e.splice(0,0,[i,d.substring(0,t)]),o++),d=d.substring(t),h=h.substring(t)),0!==(t=l(d,h))&&(e[o][1]=d.substring(d.length-t)+e[o][1],d=d.substring(0,d.length-t),h=h.substring(0,h.length-t))),0===s?e.splice(o-c,s+c,[r,d]):0===c?e.splice(o-s,s+c,[n,h]):e.splice(o-s-c,s+c,[n,h],[r,d]),o=o-s-c+(s?1:0)+(c?1:0)+1):0!==o&&e[o-1][0]==i?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,c=0,s=0,h="",d=""}""===e[e.length-1][1]&&e.pop();var f=!1;for(o=1;o<e.length-1;)e[o-1][0]==i&&e[o+1][0]==i&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)==e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),f=!0):e[o][1].substring(0,e[o+1][1].length)==e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),f=!0)),o++;f&&u(e)}var c=o;function h(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}c.INSERT=r,c.DELETE=n,c.EQUAL=i,e.exports=c},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:i).supported=r,t.unsupported=i},function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,a=new Array(s);o<s;o++)a[o]=i[o].fn;return a},s.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var l,u,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,s),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){var i=new o(t,n||this),s=r?r+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],i]:this._events[s].push(i):(this._events[s]=i,this._eventsCount++),this},s.prototype.once=function(e,t,n){var i=new o(t,n||this,!0),s=r?r+e:e;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],i]:this._events[s].push(i):(this._events[s]=i,this._eventsCount++),this},s.prototype.removeListener=function(e,t,n,o){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return 0==--this._eventsCount?this._events=new i:delete this._events[s],this;var a=this._events[s];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[s]);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==t||o&&!a[l].once||n&&a[l].context!==n)&&u.push(a[l]);u.length?this._events[s]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new i:delete this._events[s]}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=r,s.EventEmitter=s,void 0!==e&&(e.exports=s)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=b(n(3)),a=b(n(2)),l=b(n(0)),u=b(n(5)),c=b(n(10)),h=b(n(9)),d=n(36),f=n(37),p=b(n(13)),m=n(26),g=n(38),v=n(39),y=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A=(0,c.default)("quill:clipboard"),_="__ql-matcher",E=[[Node.TEXT_NODE,D],[Node.TEXT_NODE,I],["br",function(e,t){return T(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,B],[Node.ELEMENT_NODE,N],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===C(e).fontStyle&&(n.italic=!0),r.fontWeight&&(C(e).fontWeight.startsWith("bold")||parseInt(C(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=x(t,n)),parseFloat(r.textIndent||0)>0&&(t=(new a.default).insert("\t").concat(t)),t}],["li",function(e,t){var n=l.default.query(e);if(null==n||"list-item"!==n.blotName||!T(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(l.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose((new a.default).retain(t.length()-1).retain(1,{indent:r}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new a.default}]],M=[d.AlignAttribute,g.DirectionAttribute].reduce((function(e,t){return e[t.keyName]=t,e}),{}),k=[d.AlignStyle,f.BackgroundStyle,m.ColorStyle,g.DirectionStyle,v.FontStyle,y.SizeStyle].reduce((function(e,t){return e[t.keyName]=t,e}),{}),S=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],E.concat(r.options.matchers).forEach((function(e){var t=i(e,2),o=t[0],s=t[1];(n.matchVisual||s!==B)&&r.addMatcher(o,s)})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,w({},p.default.blotName,t[p.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),s=o[0],l=o[1],u=R(this.container,s,l);return T(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),A.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents((new a.default).retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new a.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout((function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach((function(r){var o=i(r,2),s=o[0],a=o[1];switch(s){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:t.push(a);break;default:[].forEach.call(e.container.querySelectorAll(s),(function(e){e[_]=e[_]||[],e[_].push(a)}))}})),[t,n]}}]),t}(h.default);function x(e,t,n){return"object"===(void 0===t?"undefined":r(t))?Object.keys(t).reduce((function(e,n){return x(e,n,t[n])}),e):e.reduce((function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,s.default)({},w({},t,n),r.attributes))}),new a.default)}function C(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function T(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function O(e){if(0===e.childNodes.length)return!1;var t=C(e);return["block","list-item"].indexOf(t.display)>-1}function R(e,t,n){return e.nodeType===e.TEXT_NODE?n.reduce((function(t,n){return n(e,t)}),new a.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,i){var o=R(i,t,n);return i.nodeType===e.ELEMENT_NODE&&(o=t.reduce((function(e,t){return t(i,e)}),o),o=(i[_]||[]).reduce((function(e,t){return t(i,e)}),o)),r.concat(o)}),new a.default):new a.default}function P(e,t,n){return x(n,e,!0)}function N(e,t){var n=l.default.Attributor.Attribute.keys(e),r=l.default.Attributor.Class.keys(e),i=l.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach((function(t){var n=l.default.query(t,l.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null==(n=M[t])||n.attrName!==t&&n.keyName!==t||(o[n.attrName]=n.value(e)||void 0),null==(n=k[t])||n.attrName!==t&&n.keyName!==t||(n=k[t],o[n.attrName]=n.value(e)||void 0))})),Object.keys(o).length>0&&(t=x(t,o)),t}function L(e,t){var n=l.default.query(e);if(null==n)return t;if(n.prototype instanceof l.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=(new a.default).insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=x(t,n.blotName,n.formats(e)));return t}function I(e,t){return T(t,"\n")||(O(e)||t.length()>0&&e.nextSibling&&O(e.nextSibling))&&t.insert("\n"),t}function B(e,t){if(O(e)&&null!=e.nextElementSibling&&!T(t,"\n\n")){var n=e.offsetHeight+parseFloat(C(e).marginTop)+parseFloat(C(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function D(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!C(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&O(e.parentNode)||null!=e.previousSibling&&O(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&O(e.parentNode)||null!=e.nextSibling&&O(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},t.default=S,t.matchAttributor=N,t.matchBlot=L,t.matchNewline=I,t.matchSpacing=B,t.matchText=D},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);s.blotName="bold",s.tagName=["STRONG","B"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(2)),s=c(n(0)),a=c(n(5)),l=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=(0,l.default)("quill:toolbar"),f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i,o=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var s=document.createElement("div");m(s,o.options.container),e.container.parentNode.insertBefore(s,e.container),o.container=s}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach((function(e){o.addHandler(e,o.options.handlers[e])})),[].forEach.call(o.container.querySelectorAll("button, select"),(function(e){o.attach(e)})),o.quill.on(a.default.events.EDITOR_CHANGE,(function(e,t){e===a.default.events.SELECTION_CHANGE&&o.update(t)})),o.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){var e=o.quill.selection.getRange(),t=r(e,1)[0];o.update(t)})),o):(i=d.error("Container required for toolbar",o.options),h(o,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,(function(e){return 0===e.indexOf("ql-")}));if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void d.warn("ignoring attaching to disabled format",n,e);if(null==s.default.query(n))return void d.warn("ignoring attaching to nonexistent format",n,e)}var i="SELECT"===e.tagName?"change":"click";e.addEventListener(i,(function(i){var l=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var u=e.options[e.selectedIndex];l=!u.hasAttribute("selected")&&(u.value||!1)}else l=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),i.preventDefault();t.quill.focus();var c=t.quill.selection.getRange(),h=r(c,1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,l);else if(s.default.query(n).prototype instanceof s.default.Embed){if(!(l=prompt("Enter "+n)))return;t.quill.updateContents((new o.default).retain(h.index).delete(h.length).insert(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},n,l)),a.default.sources.USER)}else t.quill.format(n,l,a.default.sources.USER);t.update(h)})),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach((function(n){var i=r(n,2),o=i[0],s=i[1];if("SELECT"===s.tagName){var a=void 0;if(null==e)a=null;else if(null==t[o])a=s.querySelector("option[selected]");else if(!Array.isArray(t[o])){var l=t[o];"string"==typeof l&&(l=l.replace(/\"/g,'\\"')),a=s.querySelector('option[value="'+l+'"]')}null==a?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(null==e)s.classList.remove("ql-active");else if(s.hasAttribute("value")){var u=t[o]===s.getAttribute("value")||null!=t[o]&&t[o].toString()===s.getAttribute("value")||null==t[o]&&!s.getAttribute("value");s.classList.toggle("ql-active",u)}else s.classList.toggle("ql-active",null!=t[o])}))}}]),t}(u.default);function p(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function m(e,t){Array.isArray(t[0])||(t=[t]),t.forEach((function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach((function(e){if("string"==typeof e)p(n,e);else{var t=Object.keys(e)[0],r=e[t];Array.isArray(r)?function(e,t,n){var r=document.createElement("select");r.classList.add("ql-"+t),n.forEach((function(e){var t=document.createElement("option");!1!==e?t.setAttribute("value",e):t.setAttribute("selected","selected"),r.appendChild(t)})),e.appendChild(r)}(n,t,r):p(n,t,r)}})),e.appendChild(n)}))}f.DEFAULTS={},f.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();if(null!=t)if(0==t.length){var n=this.quill.getFormat();Object.keys(n).forEach((function(t){null!=s.default.query(t,s.default.Scope.INLINE)&&e.quill.format(t,!1)}))}else this.quill.removeFormat(t,a.default.sources.USER)},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",a.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",e,a.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,a.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,a.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",e,a.default.sources.USER)}}},t.default=f,t.addControls=m},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach((function(e){e.classList.add("ql-primary")})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildItem",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),(function(e){e.innerHTML=n[e.getAttribute("data-value")||""]})),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",(function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"})),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var s=i.bottom-i.top,a=e.bottom-e.top+s;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=d(n(3)),s=d(n(8)),a=n(43),l=d(a),u=d(n(27)),c=n(15),h=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],v=function(e){function t(e,n){f(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return m(t,e),i(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),h.default),this.tooltip=new y(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},(function(t,n){e.handlers.link.call(e,!n.format.link)}))}}]),t}(l.default);v.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null==t||0==t.length)return;var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var y=function(e){function t(e,n){f(this,t);var r=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return m(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",(function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,s.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()})),this.quill.on(s.default.events.SELECTION_CHANGE,(function(t,n,r){if(null!=t){if(0===t.length&&r===s.default.sources.USER){var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.quill.scroll.descendant(u.default,t.index),2),o=i[0],a=i[1];if(null!=o){e.linkRange=new c.Range(t.index-a,o.length());var l=u.default.formats(o.domNode);return e.preview.textContent=l,e.preview.setAttribute("href",l),e.show(),void e.position(e.quill.getBounds(e.linkRange))}}else delete e.linkRange;e.hide()}}))}},{key:"show",value:function(){r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(a.BaseTooltip);y.TEMPLATE=['<a class="ql-preview" target="_blank" href="about:blank"></a>','<input type="text" data-formula="" data-link="" data-video="">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=I(n(29)),i=n(36),o=n(38),s=n(64),a=I(n(65)),l=I(n(66)),u=n(67),c=I(u),h=n(37),d=n(26),f=n(39),p=n(40),m=I(n(56)),g=I(n(68)),v=I(n(27)),y=I(n(69)),b=I(n(70)),w=I(n(71)),A=I(n(72)),_=I(n(73)),E=n(13),M=I(E),k=I(n(74)),S=I(n(75)),x=I(n(57)),C=I(n(41)),T=I(n(28)),O=I(n(59)),R=I(n(60)),P=I(n(61)),N=I(n(108)),L=I(n(62));function I(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":s.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":a.default,"formats/code-block":M.default,"formats/header":l.default,"formats/list":c.default,"formats/bold":m.default,"formats/code":E.Code,"formats/italic":g.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":A.default,"formats/video":_.default,"formats/list/item":u.ListItem,"modules/formula":k.default,"modules/syntax":S.default,"modules/toolbar":x.default,"themes/bubble":N.default,"themes/snow":L.default,"ui/icons":C.default,"ui/picker":T.default,"ui/icon-picker":R.default,"ui/color-picker":O.default,"ui/tooltip":P.default},!0),t.default=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=(r=n(0))&&r.__esModule?r:{default:r},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(s.default.Attributor.Class),l=new a("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);i.blotName="blockquote",i.tagName="blockquote",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);o.blotName="header",o.tagName=["H1","H2","H3","H4","H5","H6"],t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=l(n(0)),s=l(n(4)),a=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(t,[{key:"format",value:function(e,n){e!==f.blotName||n?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(s.default);d.blotName="list-item",d.tagName="LI";var f=function(e){function t(e){u(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=o.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return h(t,e),r(t,null,[{key:"create",value:function(e){var n="ordered"===e?"OL":"UL",r=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,n);return"checked"!==e&&"unchecked"!==e||r.setAttribute("data-checked","checked"===e),r}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"insertBefore",value:function(e,n){if(e instanceof d)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(a.default);f.blotName="list",f.scope=o.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[d],t.ListItem=d,t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(56))&&r.__esModule?r:{default:r}).default);i.blotName="italic",i.tagName=["EM","I"],t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);s.blotName="script",s.tagName=["SUB","SUP"],t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="strike",i.tagName="S",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="underline",i.tagName="U",t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=(r=n(0))&&r.__esModule?r:{default:r},a=n(27),l=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){l.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return l.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,a.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.default.Embed);u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},s=n(4),a=(r=n(27))&&r.__esModule?r:{default:r},l=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){l.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return l.reduce((function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t}),{})}},{key:"sanitize",value:function(e){return a.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(s.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=l(n(35)),s=l(n(5)),a=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(o.default);d.blotName="formula",d.className="ql-formula",d.tagName="SPAN";var f=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return e}return h(t,e),r(t,null,[{key:"register",value:function(){s.default.register(d,!0)}}]),t}(a.default);t.FormulaBlot=d,t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},o=l(n(0)),s=l(n(5)),a=l(n(9));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(l(n(13)).default);d.className="ql-syntax";var f=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(e){function t(e,n){u(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return h(t,e),r(t,null,[{key:"register",value:function(){s.default.register(f,!0),s.default.register(d,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(s.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(d).forEach((function(t){t.highlight(e.options.highlight)})),this.quill.update(s.default.sources.SILENT),null!=t&&this.quill.setSelection(t,s.default.sources.SILENT)}}}]),t}(a.default);p.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=d,t.CodeToken=f,t.default=p},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=h(n(3)),s=h(n(8)),a=n(43),l=h(a),u=n(15),c=h(n(41));function h(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],g=function(e){function t(e,n){d(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=m);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return p(t,e),i(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(l.default);g.DEFAULTS=(0,o.default)(!0,{},l.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){d(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(s.default.events.EDITOR_CHANGE,(function(e,t,n,i){if(e===s.default.events.SELECTION_CHANGE)if(null!=t&&t.length>0&&i===s.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var a=o[o.length-1],l=r.quill.getIndex(a),c=Math.min(a.length()-1,t.index+t.length-l),h=r.quill.getBounds(new u.Range(l,c));r.position(h)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return p(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){e.root.classList.remove("ql-editing")})),this.quill.on(s.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(a.BaseTooltip);v.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),t.BubbleTooltip=v,t.default=g},function(e,t,n){e.exports=n(63)}]).default},e.exports=t()},5641:(e,t,n)=>{"use strict";n.r(t),n.d(t,{initWallet:()=>N});let r=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=o.default,a=null;const l=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var u,c;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(u||(u={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(c||(c={}));const h="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const n=e.toLowerCase();null==o[n]&&this.throwArgumentError("invalid log level name","logLevel",e),s>o[n]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,n){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),n||(n={});const r=[];Object.keys(n).forEach((e=>{const t=n[e];try{if(t instanceof Uint8Array){let n="";for(let e=0;e<t.length;e++)n+=h[t[e]>>4],n+=h[15&t[e]];r.push(e+"=Uint8Array(0x"+n+")")}else r.push(e+"="+JSON.stringify(t))}catch(t){r.push(e+"="+JSON.stringify(n[e].toString()))}})),r.push(`code=${t}`),r.push(`version=${this.version}`);const o=e;let s="";switch(t){case c.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case c.CALL_EXCEPTION:case c.INSUFFICIENT_FUNDS:case c.MISSING_NEW:case c.NONCE_EXPIRED:case c.REPLACEMENT_UNDERPRICED:case c.TRANSACTION_REPLACED:case c.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),r.length&&(e+=" ("+r.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=t,Object.keys(n).forEach((function(e){a[e]=n[e]})),a}throwError(e,t,n){throw this.makeError(e,t,n)}throwArgumentError(e,t,n){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:n})}assert(e,t,n,r){e||this.throwError(t,n,r)}assertArgument(e,t,n,r){e||this.throwArgumentError(t,n,r)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,n){n=n?": "+n:"",e<t&&this.throwError("missing argument"+n,d.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+n,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new d("logger/5.7.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),r){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,r=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?s=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=c,d.levels=u;const f=new d("bytes/5.7.0");function p(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return p(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function m(e){return"number"==typeof e&&e==e&&e%1==0}function g(e,t){if(t||(t={}),"number"==typeof e){f.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),p(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),function(e){return!!e.toHexString}(e)&&(e=e.toHexString()),v(e)){let n=e.substring(2);n.length%2&&("left"===t.hexPad?n="0"+n:"right"===t.hexPad?n+="0":f.throwArgumentError("hex data is odd-length","value",e));const r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(n.substring(e,e+2),16));return p(new Uint8Array(r))}return function(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!m(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const n=e[t];if(!m(n)||n<0||n>=256)return!1}return!0}(e)?p(new Uint8Array(e)):f.throwArgumentError("invalid arrayify value","value",e)}function v(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}var y=n(5205),b=n.n(y)().BN;new d("bignumber/5.7.0");var w=n(1094),A=n.n(w);const _=new d("address/5.5.0");function E(e){v(e,20)||_.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let e=0;e<40;e++)n[e]=t[e].charCodeAt(0);const r=g((i=n,"0x"+A().keccak_256(g(i))));var i;for(let e=0;e<40;e+=2)r[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&r[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const M={};for(let e=0;e<10;e++)M[String(e)]=String(e);for(let e=0;e<26;e++)M[String.fromCharCode(65+e)]=String(10+e);const k=Math.floor((S=9007199254740991,Math.log10?Math.log10(S):Math.log(S)/Math.LN10));var S;function x(e){let t=null;if("string"!=typeof e&&_.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=E(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&_.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>M[e])).join("");for(;t.length>=k;){let e=t.substring(0,k);t=parseInt(e,10)%97+t.substring(e.length)}let n=String(98-parseInt(t,10)%97);for(;n.length<2;)n="0"+n;return n}(e)&&_.throwArgumentError("bad icap checksum","address",e),n=e.substring(4),t=new b(n,36).toString(16);t.length<40;)t="0"+t;t=E("0x"+t)}else _.throwArgumentError("invalid address","address",e);var n;return t}var C=n(7544),T=n(4145),O=n.n(T),R=n(3286),P=n(4242);function N(){const e=window.location.host,t=window.location.origin,n=document.querySelectorAll("#connectWalletBtn");n&&n.forEach((n=>n.addEventListener("click",(()=>{!async function(){if(!window.hasOwnProperty("ethereum")){let e=confirm("You don't have needed extension! Do you want to install it?");return localStorage.setItem("showExtensionAlert","false"),void(e&&window.open("https://metamask.io/","_blank"))}if(!window.hasOwnProperty("ethereum"))return void console.error("Required extension not found");const n=new(O())({injectProvider:!1,communicationLayerPreference:"webrtc"}).getProvider(),r=await fetch("/nonce",{credentials:"include"}),i=await r.text(),o=x((await n.send("eth_requestAccounts",[])).result[0]),s=new C.SiweMessage({domain:e,address:o,statement:"Sign in with Ethereum to the app.",uri:t,version:"1",chainId:"1",nonce:i}),a=await(async e=>{try{const t=o,r=e.signMessage(),i="string"==typeof r?(0,P.Y0)(r):r,s=(0,R.Dv)(i);return await n.request({method:"personal_sign",params:[s,t]})}catch(e){console.error(e)}})(s);s.signature=a;const l=await fetch("/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:s,message:s}),credentials:"include",redirect:"follow"});200==l.status?window.location.replace(l.url):window.location.reload()}()}))))}},8677:()=>{},2808:()=>{},5883:()=>{},7801:()=>{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=n(7319),t=n(7086),r=n(5641),i=n(1974),o=n(8147),s=n(8891),a=n(4970),l=n(9446),u=n(4376),c=n(5132),h=n(2771),d=n(6933),f=n(6800),p=n(9337),m=n(126),g=n(1285),v=n(5328),y=n(2919),b=n(8521),w=n(6965),A=n(4875),_=n(8400),E=n(327),M=n(2980),k=n(8224),S=n(2454),x=n(3057),C=n(5568),T=n(8259),O=n(7533),R=n(3111),P=n(4036),N=n(2530),L=n(6162),I=n(8514),B=n(3746),D=n(5773),j=n(4912);(0,A.initQuillReadOnly)(),(0,e.initBooks)(),(0,t.initContributors)(),(0,i.initQuill)(),(0,o.initQuillValueToInput)(),(0,r.initWallet)(),(0,s.initComments)(),(0,a.initVote)(),(0,l.initTheme)(),(0,u.initApprove)(),(0,c.initStar)(),(0,h.initMultipleInput)(),(0,d.rightClick)(),(0,f.addSubCollection)(),(0,p.addSection)(),(0,m.deleteSection)(),(0,g.renameSection)(),(0,v.deleteCollection)(),(0,b.renameCollection)(),(0,y.deleteSubCollection)(),(0,w.renameSubCollection)(),(0,_.initGoBack)(),(0,E.scroll)(),(0,M.initCheckBoxTree)(),(0,k.initPermissions)(),(0,S.copyLink)(),(0,x.quickSearch)(),(0,C.flash)(),(0,T.slashSearch)(),(0,O.initDnD)(),(0,R.editInterpretations)(),(0,P.deleteInterpretation)(),(0,N.indeterminateInputs)(),(0,L.initRefreshAccessLevelTree)(),(0,I.deleteContributor)(),(0,B.initUnsavedChangedAlerts)(),(0,D.initVersions)(),(0,j.activeNotifications)()})()})(); |