>18&63]+t[b>>12&63]+t[b>>6&63]+t[63&b]);return g.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},3187:function(f,l){l.read=function(t,a,r,n,o){var i,u,p=8*o-n-1,c=(1<>1,d=-7,v=r?o-1:0,b=r?-1:1,g=t[a+v];for(v+=b,i=g&(1<<-d)-1,g>>=-d,d+=p;d>0;i=256*i+t[a+v],v+=b,d-=8);for(u=i&(1<<-d)-1,i>>=-d,d+=n;d>0;u=256*u+t[a+v],v+=b,d-=8);if(i===0)i=1-x;else{if(i===c)return u?NaN:1/0*(g?-1:1);u+=Math.pow(2,n),i-=x}return(g?-1:1)*u*Math.pow(2,i-n)},l.write=function(t,a,r,n,o,i){var u,p,c,x=8*i-o-1,d=(1<>1,b=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,y=n?1:-1,k=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(p=isNaN(a)?1:0,u=d):(u=Math.floor(Math.log(a)/Math.LN2),a*(c=Math.pow(2,-u))<1&&(u--,c*=2),(a+=u+v>=1?b/c:b*Math.pow(2,1-v))*c>=2&&(u++,c/=2),u+v>=d?(p=0,u=d):u+v>=1?(p=(a*c-1)*Math.pow(2,o),u+=v):(p=a*Math.pow(2,v-1)*Math.pow(2,o),u=0));o>=8;t[r+g]=255&p,g+=y,p/=256,o-=8);for(u=u<0;t[r+g]=255&u,g+=y,u/=256,x-=8);t[r+g-y]|=128*k}},1152:function(f,l,t){f.exports=function(u){var p=(u=u||{}).eye||[0,0,1],c=u.center||[0,0,0],x=u.up||[0,1,0],d=u.distanceLimits||[0,1/0],v=u.mode||"turntable",b=a(),g=r(),y=n();return b.setDistanceLimits(d[0],d[1]),b.lookAt(0,p,c,x),g.setDistanceLimits(d[0],d[1]),g.lookAt(0,p,c,x),y.setDistanceLimits(d[0],d[1]),y.lookAt(0,p,c,x),new o({turntable:b,orbit:g,matrix:y},v)};var a=t(3440),r=t(7774),n=t(9298);function o(u,p){this._controllerNames=Object.keys(u),this._controllerList=this._controllerNames.map(function(c){return u[c]}),this._mode=p,this._active=u[p],this._active||(this._mode="turntable",this._active=u.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var i=o.prototype;i.flush=function(u){for(var p=this._controllerList,c=0;c"u"?t(5346):WeakMap,r=t(5827),n=t(2944),o=new a;f.exports=function(i){var u=o.get(i),p=u&&(u._triangleBuffer.handle||u._triangleBuffer.buffer);if(!p||!i.isBuffer(p)){var c=r(i,new Float32Array([-1,-1,-1,4,4,-1]));(u=n(i,[{buffer:c,type:i.FLOAT,size:2}]))._triangleBuffer=c,o.set(i,u)}u.bind(),i.drawArrays(i.TRIANGLES,0,3),u.unbind()}},8008:function(f,l,t){var a=t(4930);f.exports=function(r,n,o){n=typeof n=="number"?n:1,o=o||": ";var i=r.split(/\r?\n/),u=String(i.length+n-1).length;return i.map(function(p,c){var x=c+n,d=String(x).length;return a(x,u-d)+o+p}).join(`
+`)}},2153:function(f,l,t){f.exports=function(n){var o=n.length;if(o===0)return[];if(o===1)return[0];for(var i=n[0].length,u=[n[0]],p=[0],c=1;c0?d=d.ushln(b):b<0&&(v=v.ushln(-b)),i(d,v)}},234:function(f,l,t){var a=t(3218);f.exports=function(r){return Array.isArray(r)&&r.length===2&&a(r[0])&&a(r[1])}},4275:function(f,l,t){var a=t(1928);f.exports=function(r){return r.cmp(new a(0))}},9958:function(f,l,t){var a=t(4275);f.exports=function(r){var n=r.length,o=r.words,i=0;if(n===1)i=o[0];else if(n===2)i=o[0]+67108864*o[1];else for(var u=0;u20?52:i+32}},3218:function(f,l,t){t(1928),f.exports=function(a){return a&&typeof a=="object"&&!!a.words}},5514:function(f,l,t){var a=t(1928),r=t(8362);f.exports=function(n){var o=r.exponent(n);return o<52?new a(n):new a(n*Math.pow(2,52-o)).ushln(o-52)}},8524:function(f,l,t){var a=t(5514),r=t(4275);f.exports=function(n,o){var i=r(n),u=r(o);if(i===0)return[a(0),a(1)];if(u===0)return[a(0),a(0)];u<0&&(n=n.neg(),o=o.neg());var p=n.gcd(o);return p.cmpn(1)?[n.div(p),o.div(p)]:[n,o]}},2813:function(f,l,t){var a=t(1928);f.exports=function(r){return new a(r)}},3962:function(f,l,t){var a=t(8524);f.exports=function(r,n){return a(r[0].mul(n[0]),r[1].mul(n[1]))}},4951:function(f,l,t){var a=t(4275);f.exports=function(r){return a(r[0])*a(r[1])}},4354:function(f,l,t){var a=t(8524);f.exports=function(r,n){return a(r[0].mul(n[1]).sub(r[1].mul(n[0])),r[1].mul(n[1]))}},7999:function(f,l,t){var a=t(9958),r=t(1112);f.exports=function(n){var o=n[0],i=n[1];if(o.cmpn(0)===0)return 0;var u=o.abs().divmod(i.abs()),p=u.div,c=a(p),x=u.mod,d=o.negative!==i.negative?-1:1;if(x.cmpn(0)===0)return d*c;if(c){var v=r(c)+4,b=a(x.ushln(v).divRound(i));return d*(c+b*Math.pow(2,-v))}var g=i.bitLength()-x.bitLength()+53;return b=a(x.ushln(g).divRound(i)),g<1023?d*b*Math.pow(2,-g):d*(b*=Math.pow(2,-1023))*Math.pow(2,1023-g)}},5070:function(f){function l(i,u,p,c,x){for(var d=x+1;c<=x;){var v=c+x>>>1,b=i[v];(p!==void 0?p(b,u):b-u)>=0?(d=v,x=v-1):c=v+1}return d}function t(i,u,p,c,x){for(var d=x+1;c<=x;){var v=c+x>>>1,b=i[v];(p!==void 0?p(b,u):b-u)>0?(d=v,x=v-1):c=v+1}return d}function a(i,u,p,c,x){for(var d=c-1;c<=x;){var v=c+x>>>1,b=i[v];(p!==void 0?p(b,u):b-u)<0?(d=v,c=v+1):x=v-1}return d}function r(i,u,p,c,x){for(var d=c-1;c<=x;){var v=c+x>>>1,b=i[v];(p!==void 0?p(b,u):b-u)<=0?(d=v,c=v+1):x=v-1}return d}function n(i,u,p,c,x){for(;c<=x;){var d=c+x>>>1,v=i[d],b=p!==void 0?p(v,u):v-u;if(b===0)return d;b<=0?c=d+1:x=d-1}return-1}function o(i,u,p,c,x,d){return typeof p=="function"?d(i,u,p,c===void 0?0:0|c,x===void 0?i.length-1:0|x):d(i,u,void 0,p===void 0?0:0|p,c===void 0?i.length-1:0|c)}f.exports={ge:function(i,u,p,c,x){return o(i,u,p,c,x,l)},gt:function(i,u,p,c,x){return o(i,u,p,c,x,t)},lt:function(i,u,p,c,x){return o(i,u,p,c,x,a)},le:function(i,u,p,c,x){return o(i,u,p,c,x,r)},eq:function(i,u,p,c,x){return o(i,u,p,c,x,n)}}},2288:function(f,l){function t(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}l.INT_BITS=32,l.INT_MAX=2147483647,l.INT_MIN=-2147483648,l.sign=function(r){return(r>0)-(r<0)},l.abs=function(r){var n=r>>31;return(r^n)-n},l.min=function(r,n){return n^(r^n)&-(r65535)<<4,n|=o=((r>>>=n)>255)<<3,n|=o=((r>>>=o)>15)<<2,(n|=o=((r>>>=o)>3)<<1)|(r>>>=o)>>1},l.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},l.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},l.countTrailingZeros=t,l.nextPow2=function(r){return r+=r===0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},l.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},l.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var a=new Array(256);(function(r){for(var n=0;n<256;++n){var o=n,i=n,u=7;for(o>>>=1;o;o>>>=1)i<<=1,i|=1&o,--u;r[n]=i<>>8&255]<<16|a[r>>>16&255]<<8|a[r>>>24&255]},l.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},l.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},l.interleave3=function(r,n,o){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(o=1227133513&((o=3272356035&((o=251719695&((o=4278190335&((o&=1023)|o<<16))|o<<8))|o<<4))|o<<2))<<2},l.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},l.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},1928:function(f,l,t){(function(a,r){function n(B,G){if(!B)throw new Error(G||"Assertion failed")}function o(B,G){B.super_=G;var N=function(){};N.prototype=G.prototype,B.prototype=new N,B.prototype.constructor=B}function i(B,G,N){if(i.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&(G!=="le"&&G!=="be"||(N=G,G=10),this._init(B||0,G||10,N||"be"))}var u;typeof a=="object"?a.exports=i:r.BN=i,i.BN=i,i.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:t(6601).Buffer}catch{}function p(B,G){var N=B.charCodeAt(G);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function c(B,G,N){var j=p(B,N);return N-1>=G&&(j|=p(B,N-1)<<4),j}function x(B,G,N,j){for(var V=0,H=Math.min(B.length,N),ee=G;ee=49?Q-49+10:Q>=17?Q-17+10:Q}return V}i.isBN=function(B){return B instanceof i||B!==null&&typeof B=="object"&&B.constructor.wordSize===i.wordSize&&Array.isArray(B.words)},i.max=function(B,G){return B.cmp(G)>0?B:G},i.min=function(B,G){return B.cmp(G)<0?B:G},i.prototype._init=function(B,G,N){if(typeof B=="number")return this._initNumber(B,G,N);if(typeof B=="object")return this._initArray(B,G,N);G==="hex"&&(G=16),n(G===(0|G)&&G>=2&&G<=36);var j=0;(B=B.toString().replace(/\s+/g,""))[0]==="-"&&(j++,this.negative=1),j=0;j-=3)H=B[j]|B[j-1]<<8|B[j-2]<<16,this.words[V]|=H<>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);else if(N==="le")for(j=0,V=0;j>>26-ee&67108863,(ee+=24)>=26&&(ee-=26,V++);return this.strip()},i.prototype._parseHex=function(B,G,N){this.length=Math.ceil((B.length-G)/6),this.words=new Array(this.length);for(var j=0;j=G;j-=2)V=c(B,G,j)<=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;else for(j=(B.length-G)%2==0?G+1:G;j=18?(H-=18,ee+=1,this.words[ee]|=V>>>26):H+=8;this.strip()},i.prototype._parseBase=function(B,G,N){this.words=[0],this.length=1;for(var j=0,V=1;V<=67108863;V*=G)j++;j--,V=V/G|0;for(var H=B.length-N,ee=H%j,Q=Math.min(H,H-ee)+N,X=0,Y=N;Y1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};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"],v=[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],b=[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 g(B,G,N){N.negative=G.negative^B.negative;var j=B.length+G.length|0;N.length=j,j=j-1|0;var V=0|B.words[0],H=0|G.words[0],ee=V*H,Q=67108863&ee,X=ee/67108864|0;N.words[0]=Q;for(var Y=1;Y>>26,te=67108863&X,ie=Math.min(Y,G.length-1),oe=Math.max(0,Y-B.length+1);oe<=ie;oe++){var se=Y-oe|0;K+=(ee=(V=0|B.words[se])*(H=0|G.words[oe])+te)/67108864|0,te=67108863&ee}N.words[Y]=0|te,X=0|K}return X!==0?N.words[Y]=0|X:N.length--,N.strip()}i.prototype.toString=function(B,G){var N;if(G=0|G||1,(B=B||10)===16||B==="hex"){N="";for(var j=0,V=0,H=0;H>>24-j&16777215)!=0||H!==this.length-1?d[6-Q.length]+Q+N:Q+N,(j+=2)>=26&&(j-=26,H--)}for(V!==0&&(N=V.toString(16)+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(B===(0|B)&&B>=2&&B<=36){var X=v[B],Y=b[B];N="";var K=this.clone();for(K.negative=0;!K.isZero();){var te=K.modn(Y).toString(B);N=(K=K.idivn(Y)).isZero()?te+N:d[X-te.length]+te+N}for(this.isZero()&&(N="0"+N);N.length%G!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var B=this.words[0];return this.length===2?B+=67108864*this.words[1]:this.length===3&&this.words[2]===1?B+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-B:B},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(B,G){return n(u!==void 0),this.toArrayLike(u,B,G)},i.prototype.toArray=function(B,G){return this.toArrayLike(Array,B,G)},i.prototype.toArrayLike=function(B,G,N){var j=this.byteLength(),V=N||Math.max(1,j);n(j<=V,"byte array longer than desired length"),n(V>0,"Requested array length <= 0"),this.strip();var H,ee,Q=G==="le",X=new B(V),Y=this.clone();if(Q){for(ee=0;!Y.isZero();ee++)H=Y.andln(255),Y.iushrn(8),X[ee]=H;for(;ee=4096&&(N+=13,G>>>=13),G>=64&&(N+=7,G>>>=7),G>=8&&(N+=4,G>>>=4),G>=2&&(N+=2,G>>>=2),N+G},i.prototype._zeroBits=function(B){if(B===0)return 26;var G=B,N=0;return!(8191&G)&&(N+=13,G>>>=13),!(127&G)&&(N+=7,G>>>=7),!(15&G)&&(N+=4,G>>>=4),!(3&G)&&(N+=2,G>>>=2),!(1&G)&&N++,N},i.prototype.bitLength=function(){var B=this.words[this.length-1],G=this._countBits(B);return 26*(this.length-1)+G},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var B=0,G=0;GB.length?this.clone().ior(B):B.clone().ior(this)},i.prototype.uor=function(B){return this.length>B.length?this.clone().iuor(B):B.clone().iuor(this)},i.prototype.iuand=function(B){var G;G=this.length>B.length?B:this;for(var N=0;NB.length?this.clone().iand(B):B.clone().iand(this)},i.prototype.uand=function(B){return this.length>B.length?this.clone().iuand(B):B.clone().iuand(this)},i.prototype.iuxor=function(B){var G,N;this.length>B.length?(G=this,N=B):(G=B,N=this);for(var j=0;jB.length?this.clone().ixor(B):B.clone().ixor(this)},i.prototype.uxor=function(B){return this.length>B.length?this.clone().iuxor(B):B.clone().iuxor(this)},i.prototype.inotn=function(B){n(typeof B=="number"&&B>=0);var G=0|Math.ceil(B/26),N=B%26;this._expand(G),N>0&&G--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-N),this.strip()},i.prototype.notn=function(B){return this.clone().inotn(B)},i.prototype.setn=function(B,G){n(typeof B=="number"&&B>=0);var N=B/26|0,j=B%26;return this._expand(N+1),this.words[N]=G?this.words[N]|1<B.length?(N=this,j=B):(N=B,j=this);for(var V=0,H=0;H>>26;for(;V!==0&&H>>26;if(this.length=N.length,V!==0)this.words[this.length]=V,this.length++;else if(N!==this)for(;HB.length?this.clone().iadd(B):B.clone().iadd(this)},i.prototype.isub=function(B){if(B.negative!==0){B.negative=0;var G=this.iadd(B);return B.negative=1,G._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(B),this.negative=1,this._normSign();var N,j,V=this.cmp(B);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;V>0?(N=this,j=B):(N=B,j=this);for(var H=0,ee=0;ee>26,this.words[ee]=67108863&G;for(;H!==0&&ee>26,this.words[ee]=67108863&G;if(H===0&&ee>>13,oe=0|ee[1],se=8191&oe,ce=oe>>>13,xe=0|ee[2],pe=8191&xe,de=xe>>>13,he=0|ee[3],ye=8191&he,ze=he>>>13,Te=0|ee[4],Ae=8191&Te,Me=Te>>>13,Ce=0|ee[5],ne=8191&Ce,ue=Ce>>>13,me=0|ee[6],we=8191&me,Ee=me>>>13,Ue=0|ee[7],De=8191&Ue,je=Ue>>>13,ge=0|ee[8],be=8191&ge,Se=ge>>>13,Ne=0|ee[9],Ye=8191&Ne,Ze=Ne>>>13,st=0|Q[0],ot=8191&st,ft=st>>>13,yt=0|Q[1],Et=8191&yt,Tt=yt>>>13,xt=0|Q[2],Dt=8191&xt,It=xt>>>13,Ft=0|Q[3],qt=8191&Ft,Nt=Ft>>>13,Je=0|Q[4],Ke=8191&Je,Ge=Je>>>13,nt=0|Q[5],ht=8191&nt,Oe=nt>>>13,Be=0|Q[6],Qe=8191&Be,ut=Be>>>13,pt=0|Q[7],bt=8191&pt,Lt=pt>>>13,Ct=0|Q[8],mt=8191&Ct,Ot=Ct>>>13,_t=0|Q[9],Pt=8191&_t,Bt=_t>>>13;N.negative=B.negative^G.negative,N.length=19;var Wt=(Y+(j=Math.imul(te,ot))|0)+((8191&(V=(V=Math.imul(te,ft))+Math.imul(ie,ot)|0))<<13)|0;Y=((H=Math.imul(ie,ft))+(V>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,j=Math.imul(se,ot),V=(V=Math.imul(se,ft))+Math.imul(ce,ot)|0,H=Math.imul(ce,ft);var Gt=(Y+(j=j+Math.imul(te,Et)|0)|0)+((8191&(V=(V=V+Math.imul(te,Tt)|0)+Math.imul(ie,Et)|0))<<13)|0;Y=((H=H+Math.imul(ie,Tt)|0)+(V>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,j=Math.imul(pe,ot),V=(V=Math.imul(pe,ft))+Math.imul(de,ot)|0,H=Math.imul(de,ft),j=j+Math.imul(se,Et)|0,V=(V=V+Math.imul(se,Tt)|0)+Math.imul(ce,Et)|0,H=H+Math.imul(ce,Tt)|0;var Xt=(Y+(j=j+Math.imul(te,Dt)|0)|0)+((8191&(V=(V=V+Math.imul(te,It)|0)+Math.imul(ie,Dt)|0))<<13)|0;Y=((H=H+Math.imul(ie,It)|0)+(V>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,j=Math.imul(ye,ot),V=(V=Math.imul(ye,ft))+Math.imul(ze,ot)|0,H=Math.imul(ze,ft),j=j+Math.imul(pe,Et)|0,V=(V=V+Math.imul(pe,Tt)|0)+Math.imul(de,Et)|0,H=H+Math.imul(de,Tt)|0,j=j+Math.imul(se,Dt)|0,V=(V=V+Math.imul(se,It)|0)+Math.imul(ce,Dt)|0,H=H+Math.imul(ce,It)|0;var Kt=(Y+(j=j+Math.imul(te,qt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Nt)|0)+Math.imul(ie,qt)|0))<<13)|0;Y=((H=H+Math.imul(ie,Nt)|0)+(V>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,j=Math.imul(Ae,ot),V=(V=Math.imul(Ae,ft))+Math.imul(Me,ot)|0,H=Math.imul(Me,ft),j=j+Math.imul(ye,Et)|0,V=(V=V+Math.imul(ye,Tt)|0)+Math.imul(ze,Et)|0,H=H+Math.imul(ze,Tt)|0,j=j+Math.imul(pe,Dt)|0,V=(V=V+Math.imul(pe,It)|0)+Math.imul(de,Dt)|0,H=H+Math.imul(de,It)|0,j=j+Math.imul(se,qt)|0,V=(V=V+Math.imul(se,Nt)|0)+Math.imul(ce,qt)|0,H=H+Math.imul(ce,Nt)|0;var nn=(Y+(j=j+Math.imul(te,Ke)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ge)|0)+Math.imul(ie,Ke)|0))<<13)|0;Y=((H=H+Math.imul(ie,Ge)|0)+(V>>>13)|0)+(nn>>>26)|0,nn&=67108863,j=Math.imul(ne,ot),V=(V=Math.imul(ne,ft))+Math.imul(ue,ot)|0,H=Math.imul(ue,ft),j=j+Math.imul(Ae,Et)|0,V=(V=V+Math.imul(Ae,Tt)|0)+Math.imul(Me,Et)|0,H=H+Math.imul(Me,Tt)|0,j=j+Math.imul(ye,Dt)|0,V=(V=V+Math.imul(ye,It)|0)+Math.imul(ze,Dt)|0,H=H+Math.imul(ze,It)|0,j=j+Math.imul(pe,qt)|0,V=(V=V+Math.imul(pe,Nt)|0)+Math.imul(de,qt)|0,H=H+Math.imul(de,Nt)|0,j=j+Math.imul(se,Ke)|0,V=(V=V+Math.imul(se,Ge)|0)+Math.imul(ce,Ke)|0,H=H+Math.imul(ce,Ge)|0;var yn=(Y+(j=j+Math.imul(te,ht)|0)|0)+((8191&(V=(V=V+Math.imul(te,Oe)|0)+Math.imul(ie,ht)|0))<<13)|0;Y=((H=H+Math.imul(ie,Oe)|0)+(V>>>13)|0)+(yn>>>26)|0,yn&=67108863,j=Math.imul(we,ot),V=(V=Math.imul(we,ft))+Math.imul(Ee,ot)|0,H=Math.imul(Ee,ft),j=j+Math.imul(ne,Et)|0,V=(V=V+Math.imul(ne,Tt)|0)+Math.imul(ue,Et)|0,H=H+Math.imul(ue,Tt)|0,j=j+Math.imul(Ae,Dt)|0,V=(V=V+Math.imul(Ae,It)|0)+Math.imul(Me,Dt)|0,H=H+Math.imul(Me,It)|0,j=j+Math.imul(ye,qt)|0,V=(V=V+Math.imul(ye,Nt)|0)+Math.imul(ze,qt)|0,H=H+Math.imul(ze,Nt)|0,j=j+Math.imul(pe,Ke)|0,V=(V=V+Math.imul(pe,Ge)|0)+Math.imul(de,Ke)|0,H=H+Math.imul(de,Ge)|0,j=j+Math.imul(se,ht)|0,V=(V=V+Math.imul(se,Oe)|0)+Math.imul(ce,ht)|0,H=H+Math.imul(ce,Oe)|0;var ln=(Y+(j=j+Math.imul(te,Qe)|0)|0)+((8191&(V=(V=V+Math.imul(te,ut)|0)+Math.imul(ie,Qe)|0))<<13)|0;Y=((H=H+Math.imul(ie,ut)|0)+(V>>>13)|0)+(ln>>>26)|0,ln&=67108863,j=Math.imul(De,ot),V=(V=Math.imul(De,ft))+Math.imul(je,ot)|0,H=Math.imul(je,ft),j=j+Math.imul(we,Et)|0,V=(V=V+Math.imul(we,Tt)|0)+Math.imul(Ee,Et)|0,H=H+Math.imul(Ee,Tt)|0,j=j+Math.imul(ne,Dt)|0,V=(V=V+Math.imul(ne,It)|0)+Math.imul(ue,Dt)|0,H=H+Math.imul(ue,It)|0,j=j+Math.imul(Ae,qt)|0,V=(V=V+Math.imul(Ae,Nt)|0)+Math.imul(Me,qt)|0,H=H+Math.imul(Me,Nt)|0,j=j+Math.imul(ye,Ke)|0,V=(V=V+Math.imul(ye,Ge)|0)+Math.imul(ze,Ke)|0,H=H+Math.imul(ze,Ge)|0,j=j+Math.imul(pe,ht)|0,V=(V=V+Math.imul(pe,Oe)|0)+Math.imul(de,ht)|0,H=H+Math.imul(de,Oe)|0,j=j+Math.imul(se,Qe)|0,V=(V=V+Math.imul(se,ut)|0)+Math.imul(ce,Qe)|0,H=H+Math.imul(ce,ut)|0;var kn=(Y+(j=j+Math.imul(te,bt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Lt)|0)+Math.imul(ie,bt)|0))<<13)|0;Y=((H=H+Math.imul(ie,Lt)|0)+(V>>>13)|0)+(kn>>>26)|0,kn&=67108863,j=Math.imul(be,ot),V=(V=Math.imul(be,ft))+Math.imul(Se,ot)|0,H=Math.imul(Se,ft),j=j+Math.imul(De,Et)|0,V=(V=V+Math.imul(De,Tt)|0)+Math.imul(je,Et)|0,H=H+Math.imul(je,Tt)|0,j=j+Math.imul(we,Dt)|0,V=(V=V+Math.imul(we,It)|0)+Math.imul(Ee,Dt)|0,H=H+Math.imul(Ee,It)|0,j=j+Math.imul(ne,qt)|0,V=(V=V+Math.imul(ne,Nt)|0)+Math.imul(ue,qt)|0,H=H+Math.imul(ue,Nt)|0,j=j+Math.imul(Ae,Ke)|0,V=(V=V+Math.imul(Ae,Ge)|0)+Math.imul(Me,Ke)|0,H=H+Math.imul(Me,Ge)|0,j=j+Math.imul(ye,ht)|0,V=(V=V+Math.imul(ye,Oe)|0)+Math.imul(ze,ht)|0,H=H+Math.imul(ze,Oe)|0,j=j+Math.imul(pe,Qe)|0,V=(V=V+Math.imul(pe,ut)|0)+Math.imul(de,Qe)|0,H=H+Math.imul(de,ut)|0,j=j+Math.imul(se,bt)|0,V=(V=V+Math.imul(se,Lt)|0)+Math.imul(ce,bt)|0,H=H+Math.imul(ce,Lt)|0;var Wn=(Y+(j=j+Math.imul(te,mt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Ot)|0)+Math.imul(ie,mt)|0))<<13)|0;Y=((H=H+Math.imul(ie,Ot)|0)+(V>>>13)|0)+(Wn>>>26)|0,Wn&=67108863,j=Math.imul(Ye,ot),V=(V=Math.imul(Ye,ft))+Math.imul(Ze,ot)|0,H=Math.imul(Ze,ft),j=j+Math.imul(be,Et)|0,V=(V=V+Math.imul(be,Tt)|0)+Math.imul(Se,Et)|0,H=H+Math.imul(Se,Tt)|0,j=j+Math.imul(De,Dt)|0,V=(V=V+Math.imul(De,It)|0)+Math.imul(je,Dt)|0,H=H+Math.imul(je,It)|0,j=j+Math.imul(we,qt)|0,V=(V=V+Math.imul(we,Nt)|0)+Math.imul(Ee,qt)|0,H=H+Math.imul(Ee,Nt)|0,j=j+Math.imul(ne,Ke)|0,V=(V=V+Math.imul(ne,Ge)|0)+Math.imul(ue,Ke)|0,H=H+Math.imul(ue,Ge)|0,j=j+Math.imul(Ae,ht)|0,V=(V=V+Math.imul(Ae,Oe)|0)+Math.imul(Me,ht)|0,H=H+Math.imul(Me,Oe)|0,j=j+Math.imul(ye,Qe)|0,V=(V=V+Math.imul(ye,ut)|0)+Math.imul(ze,Qe)|0,H=H+Math.imul(ze,ut)|0,j=j+Math.imul(pe,bt)|0,V=(V=V+Math.imul(pe,Lt)|0)+Math.imul(de,bt)|0,H=H+Math.imul(de,Lt)|0,j=j+Math.imul(se,mt)|0,V=(V=V+Math.imul(se,Ot)|0)+Math.imul(ce,mt)|0,H=H+Math.imul(ce,Ot)|0;var wn=(Y+(j=j+Math.imul(te,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(te,Bt)|0)+Math.imul(ie,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ie,Bt)|0)+(V>>>13)|0)+(wn>>>26)|0,wn&=67108863,j=Math.imul(Ye,Et),V=(V=Math.imul(Ye,Tt))+Math.imul(Ze,Et)|0,H=Math.imul(Ze,Tt),j=j+Math.imul(be,Dt)|0,V=(V=V+Math.imul(be,It)|0)+Math.imul(Se,Dt)|0,H=H+Math.imul(Se,It)|0,j=j+Math.imul(De,qt)|0,V=(V=V+Math.imul(De,Nt)|0)+Math.imul(je,qt)|0,H=H+Math.imul(je,Nt)|0,j=j+Math.imul(we,Ke)|0,V=(V=V+Math.imul(we,Ge)|0)+Math.imul(Ee,Ke)|0,H=H+Math.imul(Ee,Ge)|0,j=j+Math.imul(ne,ht)|0,V=(V=V+Math.imul(ne,Oe)|0)+Math.imul(ue,ht)|0,H=H+Math.imul(ue,Oe)|0,j=j+Math.imul(Ae,Qe)|0,V=(V=V+Math.imul(Ae,ut)|0)+Math.imul(Me,Qe)|0,H=H+Math.imul(Me,ut)|0,j=j+Math.imul(ye,bt)|0,V=(V=V+Math.imul(ye,Lt)|0)+Math.imul(ze,bt)|0,H=H+Math.imul(ze,Lt)|0,j=j+Math.imul(pe,mt)|0,V=(V=V+Math.imul(pe,Ot)|0)+Math.imul(de,mt)|0,H=H+Math.imul(de,Ot)|0;var on=(Y+(j=j+Math.imul(se,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(se,Bt)|0)+Math.imul(ce,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ce,Bt)|0)+(V>>>13)|0)+(on>>>26)|0,on&=67108863,j=Math.imul(Ye,Dt),V=(V=Math.imul(Ye,It))+Math.imul(Ze,Dt)|0,H=Math.imul(Ze,It),j=j+Math.imul(be,qt)|0,V=(V=V+Math.imul(be,Nt)|0)+Math.imul(Se,qt)|0,H=H+Math.imul(Se,Nt)|0,j=j+Math.imul(De,Ke)|0,V=(V=V+Math.imul(De,Ge)|0)+Math.imul(je,Ke)|0,H=H+Math.imul(je,Ge)|0,j=j+Math.imul(we,ht)|0,V=(V=V+Math.imul(we,Oe)|0)+Math.imul(Ee,ht)|0,H=H+Math.imul(Ee,Oe)|0,j=j+Math.imul(ne,Qe)|0,V=(V=V+Math.imul(ne,ut)|0)+Math.imul(ue,Qe)|0,H=H+Math.imul(ue,ut)|0,j=j+Math.imul(Ae,bt)|0,V=(V=V+Math.imul(Ae,Lt)|0)+Math.imul(Me,bt)|0,H=H+Math.imul(Me,Lt)|0,j=j+Math.imul(ye,mt)|0,V=(V=V+Math.imul(ye,Ot)|0)+Math.imul(ze,mt)|0,H=H+Math.imul(ze,Ot)|0;var _n=(Y+(j=j+Math.imul(pe,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(pe,Bt)|0)+Math.imul(de,Pt)|0))<<13)|0;Y=((H=H+Math.imul(de,Bt)|0)+(V>>>13)|0)+(_n>>>26)|0,_n&=67108863,j=Math.imul(Ye,qt),V=(V=Math.imul(Ye,Nt))+Math.imul(Ze,qt)|0,H=Math.imul(Ze,Nt),j=j+Math.imul(be,Ke)|0,V=(V=V+Math.imul(be,Ge)|0)+Math.imul(Se,Ke)|0,H=H+Math.imul(Se,Ge)|0,j=j+Math.imul(De,ht)|0,V=(V=V+Math.imul(De,Oe)|0)+Math.imul(je,ht)|0,H=H+Math.imul(je,Oe)|0,j=j+Math.imul(we,Qe)|0,V=(V=V+Math.imul(we,ut)|0)+Math.imul(Ee,Qe)|0,H=H+Math.imul(Ee,ut)|0,j=j+Math.imul(ne,bt)|0,V=(V=V+Math.imul(ne,Lt)|0)+Math.imul(ue,bt)|0,H=H+Math.imul(ue,Lt)|0,j=j+Math.imul(Ae,mt)|0,V=(V=V+Math.imul(Ae,Ot)|0)+Math.imul(Me,mt)|0,H=H+Math.imul(Me,Ot)|0;var fn=(Y+(j=j+Math.imul(ye,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(ye,Bt)|0)+Math.imul(ze,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ze,Bt)|0)+(V>>>13)|0)+(fn>>>26)|0,fn&=67108863,j=Math.imul(Ye,Ke),V=(V=Math.imul(Ye,Ge))+Math.imul(Ze,Ke)|0,H=Math.imul(Ze,Ge),j=j+Math.imul(be,ht)|0,V=(V=V+Math.imul(be,Oe)|0)+Math.imul(Se,ht)|0,H=H+Math.imul(Se,Oe)|0,j=j+Math.imul(De,Qe)|0,V=(V=V+Math.imul(De,ut)|0)+Math.imul(je,Qe)|0,H=H+Math.imul(je,ut)|0,j=j+Math.imul(we,bt)|0,V=(V=V+Math.imul(we,Lt)|0)+Math.imul(Ee,bt)|0,H=H+Math.imul(Ee,Lt)|0,j=j+Math.imul(ne,mt)|0,V=(V=V+Math.imul(ne,Ot)|0)+Math.imul(ue,mt)|0,H=H+Math.imul(ue,Ot)|0;var hn=(Y+(j=j+Math.imul(Ae,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(Ae,Bt)|0)+Math.imul(Me,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Me,Bt)|0)+(V>>>13)|0)+(hn>>>26)|0,hn&=67108863,j=Math.imul(Ye,ht),V=(V=Math.imul(Ye,Oe))+Math.imul(Ze,ht)|0,H=Math.imul(Ze,Oe),j=j+Math.imul(be,Qe)|0,V=(V=V+Math.imul(be,ut)|0)+Math.imul(Se,Qe)|0,H=H+Math.imul(Se,ut)|0,j=j+Math.imul(De,bt)|0,V=(V=V+Math.imul(De,Lt)|0)+Math.imul(je,bt)|0,H=H+Math.imul(je,Lt)|0,j=j+Math.imul(we,mt)|0,V=(V=V+Math.imul(we,Ot)|0)+Math.imul(Ee,mt)|0,H=H+Math.imul(Ee,Ot)|0;var In=(Y+(j=j+Math.imul(ne,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(ne,Bt)|0)+Math.imul(ue,Pt)|0))<<13)|0;Y=((H=H+Math.imul(ue,Bt)|0)+(V>>>13)|0)+(In>>>26)|0,In&=67108863,j=Math.imul(Ye,Qe),V=(V=Math.imul(Ye,ut))+Math.imul(Ze,Qe)|0,H=Math.imul(Ze,ut),j=j+Math.imul(be,bt)|0,V=(V=V+Math.imul(be,Lt)|0)+Math.imul(Se,bt)|0,H=H+Math.imul(Se,Lt)|0,j=j+Math.imul(De,mt)|0,V=(V=V+Math.imul(De,Ot)|0)+Math.imul(je,mt)|0,H=H+Math.imul(je,Ot)|0;var Cn=(Y+(j=j+Math.imul(we,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(we,Bt)|0)+Math.imul(Ee,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Ee,Bt)|0)+(V>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,j=Math.imul(Ye,bt),V=(V=Math.imul(Ye,Lt))+Math.imul(Ze,bt)|0,H=Math.imul(Ze,Lt),j=j+Math.imul(be,mt)|0,V=(V=V+Math.imul(be,Ot)|0)+Math.imul(Se,mt)|0,H=H+Math.imul(Se,Ot)|0;var Nn=(Y+(j=j+Math.imul(De,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(De,Bt)|0)+Math.imul(je,Pt)|0))<<13)|0;Y=((H=H+Math.imul(je,Bt)|0)+(V>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,j=Math.imul(Ye,mt),V=(V=Math.imul(Ye,Ot))+Math.imul(Ze,mt)|0,H=Math.imul(Ze,Ot);var Hn=(Y+(j=j+Math.imul(be,Pt)|0)|0)+((8191&(V=(V=V+Math.imul(be,Bt)|0)+Math.imul(Se,Pt)|0))<<13)|0;Y=((H=H+Math.imul(Se,Bt)|0)+(V>>>13)|0)+(Hn>>>26)|0,Hn&=67108863;var qn=(Y+(j=Math.imul(Ye,Pt))|0)+((8191&(V=(V=Math.imul(Ye,Bt))+Math.imul(Ze,Pt)|0))<<13)|0;return Y=((H=Math.imul(Ze,Bt))+(V>>>13)|0)+(qn>>>26)|0,qn&=67108863,X[0]=Wt,X[1]=Gt,X[2]=Xt,X[3]=Kt,X[4]=nn,X[5]=yn,X[6]=ln,X[7]=kn,X[8]=Wn,X[9]=wn,X[10]=on,X[11]=_n,X[12]=fn,X[13]=hn,X[14]=In,X[15]=Cn,X[16]=Nn,X[17]=Hn,X[18]=qn,Y!==0&&(X[19]=Y,N.length++),N};function k(B,G,N){return new h().mulp(B,G,N)}function h(B,G){this.x=B,this.y=G}Math.imul||(y=g),i.prototype.mulTo=function(B,G){var N,j=this.length+B.length;return N=this.length===10&&B.length===10?y(this,B,G):j<63?g(this,B,G):j<1024?function(V,H,ee){ee.negative=H.negative^V.negative,ee.length=V.length+H.length;for(var Q=0,X=0,Y=0;Y>>26)|0)>>>26,K&=67108863}ee.words[Y]=te,Q=K,K=X}return Q!==0?ee.words[Y]=Q:ee.length--,ee.strip()}(this,B,G):k(this,B,G),N},h.prototype.makeRBT=function(B){for(var G=new Array(B),N=i.prototype._countBits(B)-1,j=0;j>=1;return j},h.prototype.permute=function(B,G,N,j,V,H){for(var ee=0;ee>>=1)V++;return 1<>>=13,N[2*H+1]=8191&V,V>>>=13;for(H=2*G;H>=26,G+=j/67108864|0,G+=V>>>26,this.words[N]=67108863&V}return G!==0&&(this.words[N]=G,this.length++),this},i.prototype.muln=function(B){return this.clone().imuln(B)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(B){var G=function(H){for(var ee=new Array(H.bitLength()),Q=0;Q>>Y}return ee}(B);if(G.length===0)return new i(1);for(var N=this,j=0;j=0);var G,N=B%26,j=(B-N)/26,V=67108863>>>26-N<<26-N;if(N!==0){var H=0;for(G=0;G>>26-N}H&&(this.words[G]=H,this.length++)}if(j!==0){for(G=this.length-1;G>=0;G--)this.words[G+j]=this.words[G];for(G=0;G=0),j=G?(G-G%26)/26:0;var V=B%26,H=Math.min((B-V)/26,this.length),ee=67108863^67108863>>>V<H)for(this.length-=H,X=0;X=0&&(Y!==0||X>=j);X--){var K=0|this.words[X];this.words[X]=Y<<26-V|K>>>V,Y=K&ee}return Q&&Y!==0&&(Q.words[Q.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(B,G,N){return n(this.negative===0),this.iushrn(B,G,N)},i.prototype.shln=function(B){return this.clone().ishln(B)},i.prototype.ushln=function(B){return this.clone().iushln(B)},i.prototype.shrn=function(B){return this.clone().ishrn(B)},i.prototype.ushrn=function(B){return this.clone().iushrn(B)},i.prototype.testn=function(B){n(typeof B=="number"&&B>=0);var G=B%26,N=(B-G)/26,j=1<=0);var G=B%26,N=(B-G)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(G!==0&&N++,this.length=Math.min(N,this.length),G!==0){var j=67108863^67108863>>>G<=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},i.prototype.isubn=function(B){if(n(typeof B=="number"),n(B<67108864),B<0)return this.iaddn(-B);if(this.negative!==0)return this.negative=0,this.iaddn(B),this.negative=1,this;if(this.words[0]-=B,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G>26)-(Q/67108864|0),this.words[j+N]=67108863&V}for(;j>26,this.words[j+N]=67108863&V;if(ee===0)return this.strip();for(n(ee===-1),ee=0,j=0;j>26,this.words[j]=67108863&V;return this.negative=1,this.strip()},i.prototype._wordDiv=function(B,G){var N=(this.length,B.length),j=this.clone(),V=B,H=0|V.words[V.length-1];(N=26-this._countBits(H))!=0&&(V=V.ushln(N),j.iushln(N),H=0|V.words[V.length-1]);var ee,Q=j.length-V.length;if(G!=="mod"){(ee=new i(null)).length=Q+1,ee.words=new Array(ee.length);for(var X=0;X=0;K--){var te=67108864*(0|j.words[V.length+K])+(0|j.words[V.length+K-1]);for(te=Math.min(te/H|0,67108863),j._ishlnsubmul(V,te,K);j.negative!==0;)te--,j.negative=0,j._ishlnsubmul(V,1,K),j.isZero()||(j.negative^=1);ee&&(ee.words[K]=te)}return ee&&ee.strip(),j.strip(),G!=="div"&&N!==0&&j.iushrn(N),{div:ee||null,mod:j}},i.prototype.divmod=function(B,G,N){return n(!B.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:this.negative!==0&&B.negative===0?(H=this.neg().divmod(B,G),G!=="mod"&&(j=H.div.neg()),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.iadd(B)),{div:j,mod:V}):this.negative===0&&B.negative!==0?(H=this.divmod(B.neg(),G),G!=="mod"&&(j=H.div.neg()),{div:j,mod:H.mod}):this.negative&B.negative?(H=this.neg().divmod(B.neg(),G),G!=="div"&&(V=H.mod.neg(),N&&V.negative!==0&&V.isub(B)),{div:H.div,mod:V}):B.length>this.length||this.cmp(B)<0?{div:new i(0),mod:this}:B.length===1?G==="div"?{div:this.divn(B.words[0]),mod:null}:G==="mod"?{div:null,mod:new i(this.modn(B.words[0]))}:{div:this.divn(B.words[0]),mod:new i(this.modn(B.words[0]))}:this._wordDiv(B,G);var j,V,H},i.prototype.div=function(B){return this.divmod(B,"div",!1).div},i.prototype.mod=function(B){return this.divmod(B,"mod",!1).mod},i.prototype.umod=function(B){return this.divmod(B,"mod",!0).mod},i.prototype.divRound=function(B){var G=this.divmod(B);if(G.mod.isZero())return G.div;var N=G.div.negative!==0?G.mod.isub(B):G.mod,j=B.ushrn(1),V=B.andln(1),H=N.cmp(j);return H<0||V===1&&H===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},i.prototype.modn=function(B){n(B<=67108863);for(var G=67108864%B,N=0,j=this.length-1;j>=0;j--)N=(G*N+(0|this.words[j]))%B;return N},i.prototype.idivn=function(B){n(B<=67108863);for(var G=0,N=this.length-1;N>=0;N--){var j=(0|this.words[N])+67108864*G;this.words[N]=j/B|0,G=j%B}return this.strip()},i.prototype.divn=function(B){return this.clone().idivn(B)},i.prototype.egcd=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j=new i(1),V=new i(0),H=new i(0),ee=new i(1),Q=0;G.isEven()&&N.isEven();)G.iushrn(1),N.iushrn(1),++Q;for(var X=N.clone(),Y=G.clone();!G.isZero();){for(var K=0,te=1;!(G.words[0]&te)&&K<26;++K,te<<=1);if(K>0)for(G.iushrn(K);K-- >0;)(j.isOdd()||V.isOdd())&&(j.iadd(X),V.isub(Y)),j.iushrn(1),V.iushrn(1);for(var ie=0,oe=1;!(N.words[0]&oe)&&ie<26;++ie,oe<<=1);if(ie>0)for(N.iushrn(ie);ie-- >0;)(H.isOdd()||ee.isOdd())&&(H.iadd(X),ee.isub(Y)),H.iushrn(1),ee.iushrn(1);G.cmp(N)>=0?(G.isub(N),j.isub(H),V.isub(ee)):(N.isub(G),H.isub(j),ee.isub(V))}return{a:H,b:ee,gcd:N.iushln(Q)}},i.prototype._invmp=function(B){n(B.negative===0),n(!B.isZero());var G=this,N=B.clone();G=G.negative!==0?G.umod(B):G.clone();for(var j,V=new i(1),H=new i(0),ee=N.clone();G.cmpn(1)>0&&N.cmpn(1)>0;){for(var Q=0,X=1;!(G.words[0]&X)&&Q<26;++Q,X<<=1);if(Q>0)for(G.iushrn(Q);Q-- >0;)V.isOdd()&&V.iadd(ee),V.iushrn(1);for(var Y=0,K=1;!(N.words[0]&K)&&Y<26;++Y,K<<=1);if(Y>0)for(N.iushrn(Y);Y-- >0;)H.isOdd()&&H.iadd(ee),H.iushrn(1);G.cmp(N)>=0?(G.isub(N),V.isub(H)):(N.isub(G),H.isub(V))}return(j=G.cmpn(1)===0?V:H).cmpn(0)<0&&j.iadd(B),j},i.prototype.gcd=function(B){if(this.isZero())return B.abs();if(B.isZero())return this.abs();var G=this.clone(),N=B.clone();G.negative=0,N.negative=0;for(var j=0;G.isEven()&&N.isEven();j++)G.iushrn(1),N.iushrn(1);for(;;){for(;G.isEven();)G.iushrn(1);for(;N.isEven();)N.iushrn(1);var V=G.cmp(N);if(V<0){var H=G;G=N,N=H}else if(V===0||N.cmpn(1)===0)break;G.isub(N)}return N.iushln(j)},i.prototype.invm=function(B){return this.egcd(B).a.umod(B)},i.prototype.isEven=function(){return(1&this.words[0])==0},i.prototype.isOdd=function(){return(1&this.words[0])==1},i.prototype.andln=function(B){return this.words[0]&B},i.prototype.bincn=function(B){n(typeof B=="number");var G=B%26,N=(B-G)/26,j=1<>>26,ee&=67108863,this.words[H]=ee}return V!==0&&(this.words[H]=V,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(B){var G,N=B<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;if(this.strip(),this.length>1)G=1;else{N&&(B=-B),n(B<=67108863,"Number is too big");var j=0|this.words[0];G=j===B?0:jB.length)return 1;if(this.length=0;N--){var j=0|this.words[N],V=0|B.words[N];if(j!==V){jV&&(G=1);break}}return G},i.prototype.gtn=function(B){return this.cmpn(B)===1},i.prototype.gt=function(B){return this.cmp(B)===1},i.prototype.gten=function(B){return this.cmpn(B)>=0},i.prototype.gte=function(B){return this.cmp(B)>=0},i.prototype.ltn=function(B){return this.cmpn(B)===-1},i.prototype.lt=function(B){return this.cmp(B)===-1},i.prototype.lten=function(B){return this.cmpn(B)<=0},i.prototype.lte=function(B){return this.cmp(B)<=0},i.prototype.eqn=function(B){return this.cmpn(B)===0},i.prototype.eq=function(B){return this.cmp(B)===0},i.red=function(B){return new R(B)},i.prototype.toRed=function(B){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),B.convertTo(this)._forceRed(B)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(B){return this.red=B,this},i.prototype.forceRed=function(B){return n(!this.red,"Already a number in reduction context"),this._forceRed(B)},i.prototype.redAdd=function(B){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,B)},i.prototype.redIAdd=function(B){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,B)},i.prototype.redSub=function(B){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,B)},i.prototype.redISub=function(B){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,B)},i.prototype.redShl=function(B){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,B)},i.prototype.redMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.mul(this,B)},i.prototype.redIMul=function(B){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,B),this.red.imul(this,B)},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(B){return n(this.red&&!B.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,B)};var M={k256:null,p224:null,p192:null,p25519:null};function A(B,G){this.name=B,this.p=new i(G,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(B){if(typeof B=="string"){var G=i._prime(B);this.m=G.p,this.prime=G}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}function U(B){R.call(this,B),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)}A.prototype._tmp=function(){var B=new i(null);return B.words=new Array(Math.ceil(this.n/13)),B},A.prototype.ireduce=function(B){var G,N=B;do this.split(N,this.tmp),G=(N=(N=this.imulK(N)).iadd(this.tmp)).bitLength();while(G>this.n);var j=G0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},A.prototype.split=function(B,G){B.iushrn(this.n,0,G)},A.prototype.imulK=function(B){return B.imul(this.k)},o(C,A),C.prototype.split=function(B,G){for(var N=4194303,j=Math.min(B.length,9),V=0;V>>22,H=ee}H>>>=22,B.words[V-10]=H,H===0&&B.length>10?B.length-=10:B.length-=9},C.prototype.imulK=function(B){B.words[B.length]=0,B.words[B.length+1]=0,B.length+=2;for(var G=0,N=0;N>>=26,B.words[N]=V,G=j}return G!==0&&(B.words[B.length++]=G),B},i._prime=function(B){if(M[B])return M[B];var G;if(B==="k256")G=new C;else if(B==="p224")G=new L;else if(B==="p192")G=new P;else{if(B!=="p25519")throw new Error("Unknown prime "+B);G=new I}return M[B]=G,G},R.prototype._verify1=function(B){n(B.negative===0,"red works only with positives"),n(B.red,"red works only with red numbers")},R.prototype._verify2=function(B,G){n((B.negative|G.negative)==0,"red works only with positives"),n(B.red&&B.red===G.red,"red works only with red numbers")},R.prototype.imod=function(B){return this.prime?this.prime.ireduce(B)._forceRed(this):B.umod(this.m)._forceRed(this)},R.prototype.neg=function(B){return B.isZero()?B.clone():this.m.sub(B)._forceRed(this)},R.prototype.add=function(B,G){this._verify2(B,G);var N=B.add(G);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},R.prototype.iadd=function(B,G){this._verify2(B,G);var N=B.iadd(G);return N.cmp(this.m)>=0&&N.isub(this.m),N},R.prototype.sub=function(B,G){this._verify2(B,G);var N=B.sub(G);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},R.prototype.isub=function(B,G){this._verify2(B,G);var N=B.isub(G);return N.cmpn(0)<0&&N.iadd(this.m),N},R.prototype.shl=function(B,G){return this._verify1(B),this.imod(B.ushln(G))},R.prototype.imul=function(B,G){return this._verify2(B,G),this.imod(B.imul(G))},R.prototype.mul=function(B,G){return this._verify2(B,G),this.imod(B.mul(G))},R.prototype.isqr=function(B){return this.imul(B,B.clone())},R.prototype.sqr=function(B){return this.mul(B,B)},R.prototype.sqrt=function(B){if(B.isZero())return B.clone();var G=this.m.andln(3);if(n(G%2==1),G===3){var N=this.m.add(new i(1)).iushrn(2);return this.pow(B,N)}for(var j=this.m.subn(1),V=0;!j.isZero()&&j.andln(1)===0;)V++,j.iushrn(1);n(!j.isZero());var H=new i(1).toRed(this),ee=H.redNeg(),Q=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new i(2*X*X).toRed(this);this.pow(X,Q).cmp(ee)!==0;)X.redIAdd(ee);for(var Y=this.pow(X,j),K=this.pow(B,j.addn(1).iushrn(1)),te=this.pow(B,j),ie=V;te.cmp(H)!==0;){for(var oe=te,se=0;oe.cmp(H)!==0;se++)oe=oe.redSqr();n(se=0;j--){for(var X=G.words[j],Y=Q-1;Y>=0;Y--){var K=X>>Y&1;V!==N[0]&&(V=this.sqr(V)),K!==0||H!==0?(H<<=1,H|=K,(++ee==4||j===0&&Y===0)&&(V=this.mul(V,N[H]),ee=0,H=0)):ee=0}Q=26}return V},R.prototype.convertTo=function(B){var G=B.umod(this.m);return G===B?G.clone():G},R.prototype.convertFrom=function(B){var G=B.clone();return G.red=null,G},i.mont=function(B){return new U(B)},o(U,R),U.prototype.convertTo=function(B){return this.imod(B.ushln(this.shift))},U.prototype.convertFrom=function(B){var G=this.imod(B.mul(this.rinv));return G.red=null,G},U.prototype.imul=function(B,G){if(B.isZero()||G.isZero())return B.words[0]=0,B.length=1,B;var N=B.imul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.mul=function(B,G){if(B.isZero()||G.isZero())return new i(0)._forceRed(this);var N=B.mul(G),j=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=N.isub(j).iushrn(this.shift),H=V;return V.cmp(this.m)>=0?H=V.isub(this.m):V.cmpn(0)<0&&(H=V.iadd(this.m)),H._forceRed(this)},U.prototype.invm=function(B){return this.imod(B._invmp(this.m).mul(this.r2))._forceRed(this)}})(f=t.nmd(f),this)},2692:function(f){f.exports=function(l){var t,a,r,n=l.length,o=0;for(t=0;t>>1;if(!(M<=0)){var A,C=r.mallocDouble(2*M*k),L=r.mallocInt32(k);if((k=u(v,M,C,L))>0){if(M===1&&y)n.init(k),A=n.sweepComplete(M,g,0,k,C,L,0,k,C,L);else{var P=r.mallocDouble(2*M*h),I=r.mallocInt32(h);(h=u(b,M,P,I))>0&&(n.init(k+h),A=M===1?n.sweepBipartite(M,g,0,k,C,L,0,h,P,I):o(M,g,y,k,C,L,h,P,I),r.free(P),r.free(I))}r.free(C),r.free(L)}return A}}}function c(v,b){a.push([v,b])}function x(v){return a=[],p(v,v,c,!0),a}function d(v,b){return a=[],p(v,b,c,!1),a}},7333:function(f,l){function t(a){return a?function(r,n,o,i,u,p,c,x,d,v,b){return u-i>d-x?function(g,y,k,h,M,A,C,L,P,I,R){for(var U=2*g,B=h,G=U*h;Bv-d?i?function(y,k,h,M,A,C,L,P,I,R,U){for(var B=2*y,G=M,N=B*M;G0;){var Q=6*(H-=1),X=k[Q],Y=k[Q+1],K=k[Q+2],te=k[Q+3],ie=k[Q+4],oe=k[Q+5],se=2*H,ce=h[se],xe=h[se+1],pe=1&oe,de=!!(16&oe),he=U,ye=B,ze=N,Te=j;if(pe&&(he=N,ye=j,ze=U,Te=B),!(2&oe&&(K=v(L,X,Y,K,he,ye,xe),Y>=K)||4&oe&&(Y=b(L,X,Y,K,he,ye,ce))>=K)){var Ae=K-Y,Me=ie-te;if(de){if(L*Ae*(Ae+Me)<4194304){if((V=u.scanComplete(L,X,P,Y,K,he,ye,te,ie,ze,Te))!==void 0)return V;continue}}else{if(L*Math.min(Ae,Me)<128){if((V=o(L,X,P,pe,Y,K,he,ye,te,ie,ze,Te))!==void 0)return V;continue}if(L*Ae*Me<4194304){if((V=u.scanBipartite(L,X,P,pe,Y,K,he,ye,te,ie,ze,Te))!==void 0)return V;continue}}var Ce=x(L,X,Y,K,he,ye,ce,xe);if(Y=p0)&&!(p1>=hi)"),d=c("lo===p0"),v=c("lo>>1,b=2*n,g=v,y=p[b*v+o];x=C?(g=A,y=C):M>=P?(g=h,y=M):(g=L,y=P):C>=P?(g=A,y=C):P>=M?(g=h,y=M):(g=L,y=P);for(var I=b*(d-1),R=b*g,U=0;Ui&&p[y+o]>b;--g,y-=x){for(var k=y,h=y+x,M=0;Mb;++b,c+=p)if(o[c+v]===u)if(d===b)d+=1,x+=p;else{for(var g=0;p>g;++g){var y=o[c+g];o[c+g]=o[x],o[x++]=y}var k=i[b];i[b]=i[d],i[d++]=k}return d},"lob;++b,c+=p)if(o[c+v]g;++g){var y=o[c+g];o[c+g]=o[x],o[x++]=y}var k=i[b];i[b]=i[d],i[d++]=k}return d},"lo<=p0":function(t,a,r,n,o,i,u){for(var p=2*t,c=p*r,x=c,d=r,v=t+a,b=r;n>b;++b,c+=p)if(o[c+v]<=u)if(d===b)d+=1,x+=p;else{for(var g=0;p>g;++g){var y=o[c+g];o[c+g]=o[x],o[x++]=y}var k=i[b];i[b]=i[d],i[d++]=k}return d},"hi<=p0":function(t,a,r,n,o,i,u){for(var p=2*t,c=p*r,x=c,d=r,v=t+a,b=r;n>b;++b,c+=p)if(o[c+v]<=u)if(d===b)d+=1,x+=p;else{for(var g=0;p>g;++g){var y=o[c+g];o[c+g]=o[x],o[x++]=y}var k=i[b];i[b]=i[d],i[d++]=k}return d},"log;++g,c+=p){var y=o[c+v],k=o[c+b];if(yh;++h){var M=o[c+h];o[c+h]=o[x],o[x++]=M}var A=i[g];i[g]=i[d],i[d++]=A}}return d},"lo<=p0&&p0<=hi":function(t,a,r,n,o,i,u){for(var p=2*t,c=p*r,x=c,d=r,v=a,b=t+a,g=r;n>g;++g,c+=p){var y=o[c+v],k=o[c+b];if(y<=u&&u<=k)if(d===g)d+=1,x+=p;else{for(var h=0;p>h;++h){var M=o[c+h];o[c+h]=o[x],o[x++]=M}var A=i[g];i[g]=i[d],i[d++]=A}}return d},"!(lo>=p0)&&!(p1>=hi)":function(t,a,r,n,o,i,u,p){for(var c=2*t,x=c*r,d=x,v=r,b=a,g=t+a,y=r;n>y;++y,x+=c){var k=o[x+b],h=o[x+g];if(!(k>=u||p>=h))if(v===y)v+=1,d+=c;else{for(var M=0;c>M;++M){var A=o[x+M];o[x+M]=o[d],o[d++]=A}var C=i[y];i[y]=i[v],i[v++]=C}}return v}}},309:function(f){function l(p,c,x){for(var d=2*(p+1),v=p+1;v<=c;++v){for(var b=x[d++],g=x[d++],y=v,k=d-2;y-- >p;){var h=x[k-2],M=x[k-1];if(hx[c+1])}function i(p,c,x,d){var v=d[p*=2];return v>1,y=g-d,k=g+d,h=v,M=y,A=g,C=k,L=b,P=p+1,I=c-1,R=0;o(h,M,x)&&(R=h,h=M,M=R),o(C,L,x)&&(R=C,C=L,L=R),o(h,A,x)&&(R=h,h=A,A=R),o(M,A,x)&&(R=M,M=A,A=R),o(h,C,x)&&(R=h,h=C,C=R),o(A,C,x)&&(R=A,A=C,C=R),o(M,L,x)&&(R=M,M=L,L=R),o(M,A,x)&&(R=M,M=A,A=R),o(C,L,x)&&(R=C,C=L,L=R);for(var U=x[2*M],B=x[2*M+1],G=x[2*C],N=x[2*C+1],j=2*h,V=2*A,H=2*L,ee=2*v,Q=2*g,X=2*b,Y=0;Y<2;++Y){var K=x[j+Y],te=x[V+Y],ie=x[H+Y];x[ee+Y]=K,x[Q+Y]=te,x[X+Y]=ie}a(y,p,x),a(k,c,x);for(var oe=P;oe<=I;++oe)if(i(oe,U,B,x))oe!==P&&t(oe,P,x),++P;else if(!i(oe,G,N,x))for(;;){if(i(I,G,N,x)){i(I,U,B,x)?(r(oe,P,I,x),++P,--I):(t(oe,I,x),--I);break}if(--I>>1;n(b,X);var Y=0,K=0;for(V=0;V=o)g(c,x,K--,te=te-o|0);else if(te>=0)g(u,p,Y--,te);else if(te<=-268435456){te=-te-o|0;for(var ie=0;ie>>1;n(b,X);var Y=0,K=0,te=0;for(V=0;V>1==b[2*V+3]>>1&&(oe=2,V+=1),ie<0){for(var se=-(ie>>1)-1,ce=0;ce>1)-1,oe===0?g(u,p,Y--,se):oe===1?g(c,x,K--,se):oe===2&&g(d,v,te--,se)}},scanBipartite:function(k,h,M,A,C,L,P,I,R,U,B,G){var N=0,j=2*k,V=h,H=h+k,ee=1,Q=1;A?Q=o:ee=o;for(var X=C;X>>1;n(b,ie);var oe=0;for(X=0;X=o?(ce=!A,Y-=o):(ce=!!A,Y-=1),ce)y(u,p,oe++,Y);else{var xe=G[Y],pe=j*Y,de=B[pe+h+1],he=B[pe+h+1+k];e:for(var ye=0;ye>>1;n(b,Y);var K=0;for(H=0;H=o)u[K++]=ee-o;else{var ie=B[ee-=1],oe=N*ee,se=U[oe+h+1],ce=U[oe+h+1+k];e:for(var xe=0;xe=0;--xe)if(u[xe]===ee){for(ye=xe+1;ye0;){for(var y=i.pop(),k=(v=-1,b=-1,x=p[c=i.pop()],1);k=0||(o.flip(c,y),r(n,o,i,v,c,b),r(n,o,i,c,b,v),r(n,o,i,b,y,v),r(n,o,i,y,v,b))}}},7098:function(f,l,t){var a,r=t(5070);function n(i,u,p,c,x,d,v){this.cells=i,this.neighbor=u,this.flags=c,this.constraint=p,this.active=x,this.next=d,this.boundary=v}function o(i,u){return i[0]-u[0]||i[1]-u[1]||i[2]-u[2]}f.exports=function(i,u,p){var c=function(P,I){for(var R=P.cells(),U=R.length,B=0;B0||v.length>0;){for(;d.length>0;){var h=d.pop();if(b[h]!==-x){b[h]=x,g[h];for(var M=0;M<3;++M){var A=k[3*h+M];A>=0&&b[A]===0&&(y[3*h+M]?v.push(A):(d.push(A),b[A]=x))}}}var C=v;v=d,d=C,v.length=0,x=-x}var L=function(P,I,R){for(var U=0,B=0;B1&&r(g[L[P-2]],g[L[P-1]],y)>0;)v.push([L[P-1],L[P-2],k]),P-=1;L.length=P,L.push(k);var I=C.upperIds;for(P=I.length;P>1&&r(g[I[P-2]],g[I[P-1]],y)<0;)v.push([I[P-2],I[P-1],k]),P-=1;I.length=P,I.push(k)}}function c(v,b){var g;return(g=v.a[0]C[0]&&k.push(new o(C,A,2,h),new o(A,C,1,h))}k.sort(i);for(var L=k[0].a[0]-(1+Math.abs(k[0].a[0]))*Math.pow(2,-52),P=[new n([L,1],[L,0],-1,[],[])],I=[],R=(h=0,k.length);h=0}}(),n.removeTriangle=function(i,u,p){var c=this.stars;o(c[i],u,p),o(c[u],p,i),o(c[p],i,u)},n.addTriangle=function(i,u,p){var c=this.stars;c[i].push(u,p),c[u].push(p,i),c[p].push(i,u)},n.opposite=function(i,u){for(var p=this.stars[u],c=1,x=p.length;cA[2]?1:0)}function k(M,A,C){if(M.length!==0){if(A)for(var L=0;L=0;--H){var se=G[ee=(Te=j[H])[0]],ce=se[0],xe=se[1],pe=B[ce],de=B[xe];if((pe[0]-de[0]||pe[1]-de[1])<0){var he=ce;ce=xe,xe=he}se[0]=ce;var ye,ze=se[1]=Te[1];for(V&&(ye=se[2]);H>0&&j[H-1][0]===ee;){var Te,Ae=(Te=j[--H])[1];V?G.push([ze,Ae,ye]):G.push([ze,Ae]),ze=Ae}V?G.push([ze,xe,ye]):G.push([ze,xe])}return Q}(M,A,P,I,C),U=b(M,R);return k(A,U,C),!!U||P.length>0||I.length>0}},5528:function(f,l,t){f.exports=function(x,d,v,b){var g=i(d,x),y=i(b,v),k=c(g,y);if(o(k)===0)return null;var h=c(y,i(x,v)),M=r(h,k),A=p(g,M);return u(x,A)};var a=t(3962),r=t(9189),n=t(4354),o=t(4951),i=t(6695),u=t(7584),p=t(4469);function c(x,d){return n(a(x[0],d[1]),a(x[1],d[0]))}},5692:function(f){f.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(f,l,t){var a=t(5692),r=t(3578);function n(u){return[u[0]/255,u[1]/255,u[2]/255,u[3]]}function o(u){for(var p,c="#",x=0;x<3;++x)c+=("00"+(p=(p=u[x]).toString(16))).substr(p.length);return c}function i(u){return"rgba("+u.join(",")+")"}f.exports=function(u){var p,c,x,d,v,b,g,y,k,h;if(u||(u={}),y=(u.nshades||72)-1,g=u.format||"hex",(b=u.colormap)||(b="jet"),typeof b=="string"){if(b=b.toLowerCase(),!a[b])throw Error(b+" not a supported colorscale");v=a[b]}else{if(!Array.isArray(b))throw Error("unsupported colormap option",b);v=b.slice()}if(v.length>y+1)throw new Error(b+" map requires nshades to be at least size "+v.length);k=Array.isArray(u.alpha)?u.alpha.length!==2?[1,1]:u.alpha.slice():typeof u.alpha=="number"?[u.alpha,u.alpha]:[1,1],p=v.map(function(P){return Math.round(P.index*y)}),k[0]=Math.min(Math.max(k[0],0),1),k[1]=Math.min(Math.max(k[1],0),1);var M=v.map(function(P,I){var R=v[I].index,U=v[I].rgb.slice();return U.length===4&&U[3]>=0&&U[3]<=1||(U[3]=k[0]+(k[1]-k[0])*R),U}),A=[];for(h=0;h0||u(p,c,d)?-1:1:b===0?g>0||u(p,c,x)?1:-1:r(g-b)}var k=a(p,c,x);return k>0?v>0&&a(p,c,d)>0?1:-1:k<0?v>0||a(p,c,d)>0?1:-1:a(p,c,d)>0||u(p,c,x)?1:-1};var a=t(417),r=t(7538),n=t(87),o=t(2019),i=t(9662);function u(p,c,x){var d=n(p[0],-c[0]),v=n(p[1],-c[1]),b=n(x[0],-c[0]),g=n(x[1],-c[1]),y=i(o(d,b),o(v,g));return y[y.length-1]>=0}},7538:function(f){f.exports=function(l){return l<0?-1:l>0?1:0}},9209:function(f){f.exports=function(a,r){var n=a.length,o=a.length-r.length;if(o)return o;switch(n){case 0:return 0;case 1:return a[0]-r[0];case 2:return a[0]+a[1]-r[0]-r[1]||l(a[0],a[1])-l(r[0],r[1]);case 3:var i=a[0]+a[1],u=r[0]+r[1];if(o=i+a[2]-(u+r[2]))return o;var p=l(a[0],a[1]),c=l(r[0],r[1]);return l(p,a[2])-l(c,r[2])||l(p+a[2],i)-l(c+r[2],u);case 4:var x=a[0],d=a[1],v=a[2],b=a[3],g=r[0],y=r[1],k=r[2],h=r[3];return x+d+v+b-(g+y+k+h)||l(x,d,v,b)-l(g,y,k,h,g)||l(x+d,x+v,x+b,d+v,d+b,v+b)-l(g+y,g+k,g+h,y+k,y+h,k+h)||l(x+d+v,x+d+b,x+v+b,d+v+b)-l(g+y+k,g+y+h,g+k+h,y+k+h);default:for(var M=a.slice().sort(t),A=r.slice().sort(t),C=0;Cl[a][0]&&(a=r);return ta?[[a],[t]]:[[t]]}},8722:function(f,l,t){f.exports=function(r){var n=a(r),o=n.length;if(o<=2)return[];for(var i=new Array(o),u=n[o-1],p=0;p=x[h]&&(k+=1);g[y]=k}}return c}(a(u,!0),i)}};var a=t(2183),r=t(2153)},9680:function(f){f.exports=function(l,t,a,r,n,o){var i=n-1,u=n*n,p=i*i,c=(1+2*n)*p,x=n*p,d=u*(3-2*n),v=u*i;if(l.length){o||(o=new Array(l.length));for(var b=l.length-1;b>=0;--b)o[b]=c*l[b]+x*t[b]+d*a[b]+v*r[b];return o}return c*l+x*t+d*a+v*r},f.exports.derivative=function(l,t,a,r,n,o){var i=6*n*n-6*n,u=3*n*n-4*n+1,p=-6*n*n+6*n,c=3*n*n-2*n;if(l.length){o||(o=new Array(l.length));for(var x=l.length-1;x>=0;--x)o[x]=i*l[x]+u*t[x]+p*a[x]+c*r[x];return o}return i*l+u*t+p*a[x]+c*r}},4419:function(f,l,t){var a=t(2183),r=t(1215);function n(i,u){this.point=i,this.index=u}function o(i,u){for(var p=i.point,c=u.point,x=p.length,d=0;d=2)return!1;R[B]=G}return!0}):I.filter(function(R){for(var U=0;U<=c;++U){var B=A[R[U]];if(B<0)return!1;R[U]=B}return!0}),1&c)for(v=0;v>>31},f.exports.exponent=function(n){return(f.exports.hi(n)<<1>>>21)-1023},f.exports.fraction=function(n){var o=f.exports.lo(n),i=f.exports.hi(n),u=1048575&i;return 2146435072&i&&(u+=1048576),[o,u]},f.exports.denormalized=function(n){return!(2146435072&f.exports.hi(n))}},3094:function(f){function l(t,a,r){var n=0|t[r];if(n<=0)return[];var o,i=new Array(n);if(r===t.length-1)for(o=0;o0)return function(r,n){var o,i;for(o=new Array(r),i=0;i