diff --git a/dev.html b/dev.html
index 782fd559..1b286cfb 100644
--- a/dev.html
+++ b/dev.html
@@ -24,8 +24,8 @@
-
-
+
+
diff --git a/dist/esm/index.bundle.js b/dist/esm/index.bundle.js
index d32fb9a2..941d7ad9 100644
--- a/dist/esm/index.bundle.js
+++ b/dist/esm/index.bundle.js
@@ -84,7 +84,7 @@ Zf((function(t,e){}));var Zx=Zf((function(t){t.exports=qx})),Jx=Zx.createContext
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2022 Michael Mclaughlin
* MIT Licence
- */function Xk(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;en)throw Error(Rk+t)}function $k(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=Yk(10,7-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==Yk(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==Yk(10,e-3)-1,a}function tT(t,e,n){for(var r,i,o=[0],a=0,s=t.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Jk.absoluteValue=Jk.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),nT(t)},Jk.ceil=function(){return nT(new this.constructor(this),this.e+1,2)},Jk.clampedTo=Jk.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Rk+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},Jk.comparedTo=Jk.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;es[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},Jk.cosine=Jk.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;(r=e.d.length)<32?i=(1/vT(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=gT(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(2==jk||3==jk?n.neg():n,t,e,!0)):new r(1):new r(NaN)},Jk.cubeRoot=Jk.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(Bk=!1,(o=l.s*Yk(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=Xk(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Yk(n,1/3),t=Qk((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=eT(c.plus(l).times(s),c.plus(u),a+2,1),Xk(s.d).slice(0,a)===(n=Xk(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(nT(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(nT(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return Bk=!0,nT(r,t,h.rounding,e)},Jk.decimalPlaces=Jk.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-Qk(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},Jk.dividedBy=Jk.div=function(t){return eT(this,new this.constructor(t))},Jk.dividedToIntegerBy=Jk.divToInt=function(t){var e=this.constructor;return nT(eT(this,new e(t),0,1,1),e.precision,e.rounding)},Jk.equals=Jk.eq=function(t){return 0===this.cmp(t)},Jk.floor=function(){return nT(new this.constructor(this),this.e+1,3)},Jk.greaterThan=Jk.gt=function(t){return this.cmp(t)>0},Jk.greaterThanOrEqualTo=Jk.gte=function(t){var e=this.cmp(t);return 1==e||0===e},Jk.hyperbolicCosine=Jk.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/vT(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=gT(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return nT(o,a.precision=n,a.rounding=r,!0)},Jk.hyperbolicSine=Jk.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=gT(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=gT(o,2,i=i.times(1/vT(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,nT(i,e,n,!0)},Jk.hyperbolicTangent=Jk.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,eT(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},Jk.inverseCosine=Jk.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?aT(n,i,o):new n(0):new n(NaN):e.isZero()?aT(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=aT(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},Jk.inverseHyperbolicCosine=Jk.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Bk=!1,n=n.times(n).minus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},Jk.inverseHyperbolicSine=Jk.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Bk=!1,n=n.times(n).plus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln())},Jk.inverseHyperbolicTangent=Jk.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?nT(new o(i),t,e,!0):(o.precision=n=r-i.e,i=eT(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},Jk.inverseSine=Jk.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=aT(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Jk.inverseTangent=Jk.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=Zk)return(a=aT(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=Zk)return(a=aT(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Bk=!1,e=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<this.d.length-2},Jk.isNaN=function(){return!this.s},Jk.isNegative=Jk.isNeg=function(){return this.s<0},Jk.isPositive=Jk.isPos=function(){return this.s>0},Jk.isZero=function(){return!!this.d&&0===this.d[0]},Jk.lessThan=Jk.lt=function(t){return this.cmp(t)<0},Jk.lessThanOrEqualTo=Jk.lte=function(t){return this.cmp(t)<1},Jk.logarithm=Jk.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Bk=!1,a=fT(c,s=h+5),r=e?oT(l,s+10):fT(t,s),$k((u=eT(a,r,s,1)).d,i=h,d))do{if(a=fT(c,s+=10),r=e?oT(l,s+10):fT(t,s),u=eT(a,r,s,1),!o){+Xk(u.d).slice(i+1,i+15)+1==1e14&&(u=nT(u,h+1,0));break}}while($k(u.d,i+=10,d));return Bk=!0,nT(u,h,d)},Jk.minus=Jk.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return Bk?nT(t,s,u):t}if(n=Qk(t.e/7),l=Qk(f.e/7),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/Gk|0,c[i]%=Gk;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=iT(c,r),Bk?nT(t,s,u):t},Jk.precision=Jk.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Rk+t);return n.d?(e=sT(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},Jk.round=function(){var t=this,e=t.constructor;return nT(new e(t),t.e+1,e.rounding)},Jk.sine=Jk.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:gT(t,2,e,e);n=(n=1.4*Math.sqrt(r))>16?16:0|n,e=e.times(1/vT(5,n)),e=gT(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(jk>2?n.neg():n,t,e,!0)):new r(NaN)},Jk.squareRoot=Jk.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(Bk=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=Xk(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=Qk((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(eT(a,o,n+2,1)).times(.5),Xk(o.d).slice(0,n)===(e=Xk(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(nT(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(nT(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Bk=!0,nT(r,u,l.rounding,t)},Jk.tangent=Jk.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=eT(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,nT(2==jk||4==jk?n.neg():n,t,e,!0)):new r(NaN)},Jk.times=Jk.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=Qk(l.e/7)+Qk(t.e/7),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%Gk|0,e=s/Gk|0;o[i]=(o[i]+e)%Gk|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=iT(o,n),Bk?nT(t,h.precision,h.rounding):t},Jk.toBinary=function(t,e){return bT(this,2,t,e)},Jk.toDecimalPlaces=Jk.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(Kk(t,0,1e9),void 0===e?e=r.rounding:Kk(e,0,8),nT(n,t+n.e+1,e))},Jk.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,!0):(Kk(t,0,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=rT(i):(Kk(t,0,1e9),void 0===e?e=o.rounding:Kk(e,0,8),n=rT(r=nT(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Jk.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,y=f.constructor;if(!p)return new y(f);if(c=n=new y(1),r=u=new y(0),a=(o=(e=new y(r)).e=sT(p)-f.e-1)%7,e.d[0]=Yk(10,a<0?7+a:a),null==t)t=o>0?e:c;else{if(!(s=new y(t)).isInt()||s.lt(c))throw Error(Rk+s);t=s.gt(e)?o>0?e:c:s}for(Bk=!1,s=new y(Xk(p)),l=y.precision,y.precision=o=7*p.length*2;h=eT(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=eT(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=eT(c,r,o,1).minus(f).abs().cmp(eT(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],y.precision=l,Bk=!0,d},Jk.toHexadecimal=Jk.toHex=function(t,e){return bT(this,16,t,e)},Jk.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:Kk(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(Bk=!1,n=eT(n,t,0,e,1).times(t),Bk=!0,nT(n)):(t.s=n.s,n=t),n},Jk.toNumber=function(){return+this},Jk.toOctal=function(t,e){return bT(this,8,t,e)},Jk.toPower=Jk.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(Yk(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return nT(s,r,o);if((e=Qk(t.e/7))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=cT(u,s,n,r),t.s<0?new u(1).div(i):nT(i,r,o);if((a=s.s)<0){if(eu.maxE+1||e0?a/0:0):(Bk=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=dT(t.times(fT(s,r+n)),r)).d&&$k((i=nT(i,r+5,1)).d,r,o)&&(e=r+10,+Xk((i=nT(dT(t.times(fT(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=nT(i,r+1,0))),i.s=a,Bk=!0,u.rounding=o,nT(i,r,o))},Jk.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Kk(t,1,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toSignificantDigits=Jk.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(Kk(t,1,1e9),void 0===e?e=n.rounding:Kk(e,0,8)),nT(new n(this),t,e)},Jk.toString=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},Jk.truncated=Jk.trunc=function(){return nT(new this.constructor(this),this.e+1,1)},Jk.valueOf=Jk.toJSON=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var eT=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,y,m,g,v,w,b,M,A,N,I,E,x,k,T,L=r.constructor,S=r.s==i.s?1:-1,j=r.d,C=i.d;if(!(j&&j[0]&&C&&C[0]))return new L(r.s&&i.s&&(j?!C||j[0]!=C[0]:C)?j&&0==j[0]||!C?0*S:S/0:NaN);for(u?(f=1,l=r.e-i.e):(u=Gk,f=7,l=Qk(r.e/f)-Qk(i.e/f)),k=C.length,E=j.length,v=(g=new L(S)).d=[],h=0;C[h]==(j[h]||0);h++);if(C[h]>(j[h]||0)&&l--,null==o?(A=o=L.precision,a=L.rounding):A=s?o+(r.e-i.e)+1:o,A<0)v.push(1),p=!0;else{if(A=A/f+2|0,h=0,1==k){for(d=0,C=C[0],A++;(h1&&(C=t(C,d,u),j=t(j,d,u),k=C.length,E=j.length),I=k,b=(w=j.slice(0,k)).length;b=u/2&&++x;do{d=0,(c=e(C,w,k,b))<0?(M=w[0],k!=b&&(M=M*u+(w[1]||0)),(d=M/x|0)>1?(d>=u&&(d=u-1),1==(c=e(y=t(C,d,u),w,m=y.length,b=w.length))&&(d--,n(y,k=10;d/=10)h++;g.e=h+l*f-1,nT(g,s?o+g.e+1:o,a,p)}return g}}();function nT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=7,a=e,u=(l=h[d=0])/Yk(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/Yk(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%Yk(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Yk(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=Yk(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=Yk(10,7-o),h[d]=a>0?(l/Yk(10,i-a)%Yk(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==Gk&&(h[0]=1));break}if(h[d]+=s,h[d]!=Gk)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return Bk&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e0?o=o.charAt(0)+"."+o.slice(1)+uT(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+uT(-i-1)+o,n&&(r=n-a)>0&&(o+=uT(r))):i>=a?(o+=uT(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+uT(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=uT(r))),o}function iT(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function oT(t,e,n){if(e>qk)throw Bk=!0,n&&(t.precision=n),Error("[DecimalError] Precision limit exceeded");return nT(new t(zk),e,1,!0)}function aT(t,e,n){if(e>Zk)throw Error("[DecimalError] Precision limit exceeded");return nT(new t(Pk),e,n,!0)}function sT(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function uT(t){for(var e="";t--;)e+="0";return e}function cT(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for(Bk=!1;;){if(n%2&&MT((o=o.times(e)).d,a)&&(i=!0),0===(n=Qk(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}MT((e=e.times(e)).d,a)}return Bk=!0,o}function lT(t){return 1&t.d[t.d.length-1]}function hT(t,e,n){for(var r,i=new t(e[0]),o=0;++o17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(Bk=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(Yk(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=nT(o.times(t),u,1),n=n.times(++l),Xk((s=a.plus(eT(o,n,u,1))).d).slice(0,u)===Xk(a.d).slice(0,u)){for(i=h;i--;)a=nT(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&$k(a.d,u-r,f,c)))return nT(a,d.precision=p,f,Bk=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function fT(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,y=p.d,m=p.constructor,g=m.rounding,v=m.precision;if(p.s<0||!y||!y[0]||!p.e&&1==y[0]&&1==y.length)return new m(y&&!y[0]?-1/0:1!=p.s?NaN:y?0:p);if(null==e?(Bk=!1,l=v):l=e,m.precision=l+=10,r=(n=Xk(y)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=oT(m,l+2,v).times(o+""),p=fT(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=v,null==e?nT(p,v,g,Bk=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Xk((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),h=p,u=a=p=eT(p.minus(1),p.plus(1),l,1),d=nT(p.times(p),l,1),i=3;;){if(a=nT(a.times(d),l,1),Xk((c=u.plus(eT(a,new m(i),l,1))).d).slice(0,l)===Xk(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(oT(m,l+2,v).times(o+""))),u=eT(u,new m(f),l,1),null!=e)return m.precision=v,u;if(!$k(u.d,l-10,g,s))return nT(u,m.precision=v,g,Bk=!0);m.precision=l+=10,c=a=p=eT(h.minus(1),h.plus(1),l,1),d=nT(p.times(p),l,1),i=s=1}u=c,i+=2}}function pT(t){return String(t.s*t.s/0)}function yT(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),rt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Hk.test(e))return yT(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Fk.test(e))n=16,e=e.toLowerCase();else if(Wk.test(e))n=2;else{if(!Vk.test(e))throw Error(Rk+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=cT(r,new r(n),o,2*o)),o=l=(c=tT(e,n,Gk)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=iT(c,l),t.d=c,Bk=!1,a&&(t=eT(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?Yk(2,u):uL.pow(2,u))),Bk=!0,t)}function gT(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/7);for(Bk=!1,u=n.times(n),s=new t(r);;){if(a=eT(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=eT(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return Bk=!0,a.d.length=l+1,a}function vT(t,e){for(var n=t;--e;)n*=t;return n}function wT(t,e){var n,r=e.s<0,i=aT(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return jk=r?4:1,e;if((n=e.divToInt(i)).isZero())jk=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return jk=lT(n)?r?2:3:r?4:1,e;jk=lT(n)?r?1:4:r?3:2}return e.minus(i).abs()}function bT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(Kk(n,1,1e9),void 0===r?r=f.rounding:Kk(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=rT(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=tT(rT(d),10,i),d.e=d.d.length),o=u=(h=tT(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=eT(t,d,n,r,0,i)).d,o=t.e,c=Sk),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=tT(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";au)for(o-=u;o--;)l+="0";else oe)return t.length=e,!0}function AT(t){return new this(t).abs()}function NT(t){return new this(t).acos()}function IT(t){return new this(t).acosh()}function ET(t,e){return new this(t).plus(e)}function xT(t){return new this(t).asin()}function kT(t){return new this(t).asinh()}function TT(t){return new this(t).atan()}function LT(t){return new this(t).atanh()}function ST(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?aT(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=aT(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(eT(t,e,o,1)),e=aT(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(eT(t,e,o,1)):(n=aT(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function jT(t){return new this(t).cbrt()}function CT(t){return nT(t=new this(t),t.e+1,2)}function DT(t,e,n){return new this(t).clamp(e,n)}function OT(t){if(!t||"object"!=typeof t)throw Error("[DecimalError] Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-Dk,0,"toExpPos",0,Dk,"maxE",0,Dk,"minE",-Dk,0,"modulo",0,9];for(e=0;e=o[e+1]&&r<=o[e+2]))throw Error(Rk+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=_k[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Rk+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[n]=!0}else this[n]=!1}return this}function zT(t){return new this(t).cos()}function PT(t){return new this(t).cosh()}function _T(t,e){return new this(t).div(e)}function BT(t){return new this(t).exp()}function RT(t){return nT(t=new this(t),t.e+1,3)}function UT(){var t,e,n=new this(0);for(Bk=!1,t=0;t=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(e=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function KT(t){return nT(t=new this(t),t.e+1,this.rounding)}function $T(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function tL(t){return new this(t).sin()}function eL(t){return new this(t).sinh()}function nL(t){return new this(t).sqrt()}function rL(t,e){return new this(t).sub(e)}function iL(){var t=0,e=arguments,n=new this(e[t]);for(Bk=!1;n.s&&++to.maxE?(i.e=NaN,i.d=null):t.e=10;n/=10)e++;return void(Bk?e>o.maxE?(i.e=NaN,i.d=null):en.call(e,...t))),e=void 0)}return n}zk=new uL(zk),Pk=new uL(Pk);class lL{constructor({blockchain:t,tokenIn:e,decimalsIn:n,tokenOut:r,decimalsOut:i,path:o,pools:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,exchange:h,approvalRequired:d,getApproval:f,getPrep:p,getTransaction:y}){this.blockchain=t,this.tokenIn=e,this.decimalsIn=n,this.tokenOut=r,this.decimalsOut=i,this.path=o,this.pools=a,this.amountIn=cL([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=cL([l,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=cL([c,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=cL([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=h,this.getPrep=p,this.getTransaction=y}}let hL=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];hL.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],hL.solana=["solana"];const dL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:i,amountOut:o})=>{let a=i.add(i.mul(100*parseFloat("0.5")).div(1e4));if(!hL.evm.includes(t.blockchain||e))return a;const s=await PN({blockchain:t.blockchain||e,method:"latestBlockNumber"});let u=[];for(var c=0;c<=2;c++)u.push(s-c);const l=await Promise.all(u.map((async i=>{let{amountIn:a}=await t.getAmounts({exchange:t,blockchain:e,path:r,pools:n,amountOut:o,block:i});return a})));if(!l[0]||!l[1]||!l[2])return a;let h;if(l[0].gt(l[1])&&l[1].gt(l[2])){const t=l[0].sub(l[1]),e=l[1].sub(l[2]),n=t.add(e).div(2);if(h=l[0].add(n),h.gt(a))return h}else if(!l[0].eq(l[1])&&!l[1].eq(l[2])){const t=l[0].sub(l[1]).abs(),e=l[1].sub(l[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=l[0].gt(l[1])&&l[0].gt(l[2])?l[0]:l[1].gt(l[2])&&l[1].gt(l[0])?l[1]:l[2],h=r.add(n),h.gt(a))return h}return a},fL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amounts:i,tokenIn:o,tokenOut:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amountInInput:h,amountOutInput:d,amountInMaxInput:f,amountOutMinInput:p})=>{if(p||d){if(hL.evm.includes(t.blockchain||e))s=u=await dL({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:s,amountOut:p||c});else if(hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((o,a)=>{if(0!=a){let o=dL({exchange:t,pools:n,exchangePath:[r[a-1],r[a]],amountIn:i[a-1],amountOut:i[a]});return o.then((t=>e.push(t))),o}}))),e.push(i[i.length-1]),s=u=(i=e)[0]}}else if((f||h)&&hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((n,o)=>{if(0!==o&&on.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,exchangePath:[r[o-1],r[o]],amountIn:i[o-1],amountOut:i[o]});return n.then((t=>(e.unshift(t),t))),n}}))),e.push(i[0]),c=l=(i=e.slice().reverse())[i.length-1]}return{amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amounts:i}},pL=t=>t.match("0x")?am(t):t;let yL=async({amount:t,blockchain:e,address:n})=>await Ak.BigNumber({amount:t,blockchain:e,address:n}),mL=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await yL({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await yL({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await yL({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await yL({amount:a,blockchain:t,address:n})),u};class gL{constructor(...t){Object.assign(this,...t)}async route({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}){return e===n?Promise.resolve():(void 0===t&&(this.scope?t=this.scope:1===this.blockchains.length&&(t=this.blockchains[0])),(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if(void 0===t&&null!=e.blockchains&&e.blockchains.length>1)throw"You need to provide a blockchain when calling route on an exchange that supports multiple blockchains!";if(void 0!==o&&void 0!==i)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==a&&void 0!==s)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==i&&void 0!==a)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==o&&void 0!==s)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),await(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s,findPath:u,getAmounts:c,getPrep:l,getTransaction:h,slippage:d})=>{if(n=pL(n),r=pL(r),[i,o,a,s].filter(Boolean).length>1)throw"You can only pass one: amountIn, amountOut, amountInMax or amountOutMin";if([i,o,a,s].filter(Boolean).length<1)throw"You need to pass exactly one: amountIn, amountOut, amountInMax or amountOutMin";return new Promise((async f=>{let{path:p,exchangePath:y,pools:m}=await u({blockchain:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s});if(void 0===p||0==p.length)return f();let g,[v,w,b,M]=[i,o,a,s];try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await c({exchange:e,blockchain:t,path:p,pools:m,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s}))}catch(t){return f()}if([i,a,o,s].every((t=>null==t)))return f();if(d||e.slippage)try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await fL({exchange:e,blockchain:t,pools:m,exchangePath:y,amounts:g,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M}))}catch(t){return f()}const A=await new Ak({blockchain:t,address:n}).decimals(),N=await new Ak({blockchain:t,address:r}).decimals();f(new lL({blockchain:t,tokenIn:n,decimalsIn:A,tokenOut:r,decimalsOut:N,path:p,pools:m,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,exchange:e,getPrep:async({account:o})=>await l({exchange:e,blockchain:t,tokenIn:n,tokenOut:r,amountIn:i||a,account:o}),getTransaction:async({account:n,permit2:r,inputTokenPushed:u})=>await h({exchange:e,blockchain:t,pools:m,path:p,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M,account:n,permit2:r,inputTokenPushed:u})}))}))})({...await mL({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),blockchain:t,findPath:this.findPath,getAmounts:this.getAmounts,getPrep:this.getPrep,getTransaction:this.getTransaction,slippage:this.slippage}))}}function vL(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const wL=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},bL=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(cN(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(cN(e.toString(),o)),ML=async({blockchain:t,exchange:e,path:n})=>{const r=wL({blockchain:t,exchange:e,path:n});if(!r||1===r.length)return!1;try{let i=await PN({blockchain:t,address:e[t].factory.address,method:"getPair",api:e[t].factory.api,cache:36e5,params:wL({blockchain:t,exchange:e,path:n})});if(!i||i==Hf[t].zero)return!1;let[o,a,s]=await Promise.all([PN({blockchain:t,address:i,method:"getReserves",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token0",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token1",api:e[t].pair.api,cache:36e5})]);if(r.includes(Hf[t].wrapped.address))return bL({min:1,token:Hf[t].wrapped.address,decimals:Hf[t].currency.decimals,reserves:o,token0:a,token1:s});if(n.find((e=>Hf[t].stables.usd.includes(e)))){let e=n.find((e=>Hf[t].stables.usd.includes(e))),r=new Ak({blockchain:t,address:e}),i=await r.decimals();return bL({min:1e3,token:e,decimals:i,reserves:o,token0:a,token1:s})}return!0}catch(t){return console.log("e",t),!1}};let AL=({blockchain:t,exchange:e,path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsOut",api:e[t].router.api,params:{amountIn:r,path:wL({blockchain:t,exchange:e,path:n})}}).then((t=>{i(t[t.length-1])})).catch((()=>i()))})),NL=({blockchain:t,exchange:e,path:n,amountOut:r,block:i})=>new Promise((o=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsIn",api:e[t].router.api,params:{amountOut:r,path:wL({blockchain:t,exchange:e,path:n})},block:i}).then((t=>o(t[0]))).catch((()=>o()))}));var IL={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let i;if(await ML({blockchain:t,exchange:e,path:[n,r]}))i=[n,r];else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[r,Hf[t].wrapped.address]}))i=[n,Hf[t].wrapped.address,r];else if(!Hf[t].stables.usd.includes(n)&&(await Promise.all(Hf[t].stables.usd.map((r=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[Hf[t].wrapped.address,r]})){let o=(await Promise.all(Hf[t].stables.usd.map((async r=>await ML({blockchain:t,exchange:e,path:[n,r]})?r:void 0)))).find(Boolean);i=[n,o,Hf[t].wrapped.address,r]}else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&!Hf[t].stables.usd.includes(r)&&(await Promise.all(Hf[t].stables.usd.map((n=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length){let o=(await Promise.all(Hf[t].stables.usd.map((async n=>await ML({blockchain:t,exchange:e,path:[n,r]})?n:void 0)))).find(Boolean);i=[n,Hf[t].wrapped.address,o,r]}return vL([i,"optionalAccess",t=>t.length])&&i[0]==Hf[t].currency.address?i.splice(1,0,Hf[t].wrapped.address):vL([i,"optionalAccess",t=>t.length])&&i[i.length-1]==Hf[t].currency.address&&i.splice(i.length-1,0,Hf[t].wrapped.address),{path:i,exchangePath:wL({blockchain:t,exchange:e,path:i})}},pathExists:ML,getAmounts:async({blockchain:t,exchange:e,path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:a,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(s){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:s,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}else if(c){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:c,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(u){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:u,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}return{amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address?s||l?(d.method="swapExactETHForTokens",d.value=r.toString(),d.params={amountOutMin:a.toString()}):(u||c)&&(d.method="swapETHForExactTokens",d.value=i.toString(),d.params={amountOut:o.toString()}):n[n.length-1]===Hf[e].currency.address?s||l?(d.method="swapExactTokensForETH",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactETH",d.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(d.method="swapExactTokensForTokens",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactTokens",d.params={amountInMax:i.toString(),amountOut:o.toString()}),d.params=Object.assign({},d.params,{path:wL({blockchain:e,exchange:t,path:n}),to:h,deadline:Math.round(Date.now()/1e3)+86400}),d},ROUTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]};const EL={name:"honeyswap",label:"Honeyswap",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABQCAYAAADBTPF9AAAACXBIWXMAAAsTAAALEwEAmpwYAAALmklEQVR4nO2de3BU1R3HP7+7eQALAcSNyq4ELDpUS0HJdrRm0aE6oPWJWqtQxUdn1KpcdQy04nssslQbdKxa7cC0iq22+BhsUQcfbBzQAL4V7VQM7OK4i4oJBJLs3l//uEHDkvfevbsb85nJHzn33PP73fu99+x5/M65Mt08jXwlVpuYCTwCjAS+BD5FeRXhaX+Vb51Tdja/khhZUsQpCGcBE4HRQCmwoqWFS8ZN8zU7ZctpJF8FjEbixSLyBnB0B4ebgZeAuzIRMhqJe0XkKuBKYFwn2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rktKn009j06GBgFDOK7xa2NwJcpozTusZq/6Ot9yusPf8TWxIuKi7m0NSU3AZ1+mTML7AEeVtVFgVD55y7a7TV5s9VWR5RVeC3vod4NDfW7louIB5hM9pdnr1RldiDkW1ZW4d2ZZVsZk0+Tcp0SCJXH/VW+G1Q5Fng2S2beB87xV/lOD4R8b3WbO08oCAH3Egj53vVX+c5SOBPoNE6kl2wH5qnqsf4q3wqHynSNghJwL4Eq33Nq6XHADbT77FwvSQF/UdUp/ipfuFC/Yp3Xv4FdUVbhTZaN8a795rOmJ4DBIkym5zFFr6rqRYFQ+QNlFd7MI6xySEG+ge05dKovFgj5rgKmAi92k30Tyiy1dFogVN6nUPZ8Iy/2C3UCf5VvHTA9VpuYCVyEPdCQwn4rU8ALqvpIIFS+I3deOs//AZb84smmUsyHAAAAAElFTkSuQmCC",protocol:"uniswap_v2",slippage:!0,blockchains:["gnosis"],gnosis:{router:{address:"0x1C232F01118CB8B424793ae03F870aa7D0ac7f77",api:IL.ROUTER},factory:{address:"0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7",api:IL.FACTORY},pair:{api:IL.PAIR}}};var xL=t=>new gL(Object.assign(EL,{scope:t,findPath:t=>IL.findPath({...t,exchange:EL}),pathExists:t=>IL.pathExists({...t,exchange:EL}),getAmounts:t=>IL.getAmounts({...t,exchange:EL}),getPrep:t=>IL.getPrep({...t,exchange:EL}),getTransaction:t=>IL.getTransaction({...t,exchange:EL})}));const kL="79226673515401279992447579055",TL=t=>-t;class LL{static priceToSqrtPriceX64(t,e,n){return r=t.mul(uL.pow(10,n-e)).sqrt(),new rf(r.mul(uL.pow(2,64)).floor().toFixed());var r}static sqrtPriceX64ToPrice(t,e,n){return(r=t,new uL(r.toString()).mul(uL.pow(2,-64))).pow(2).mul(uL.pow(10,e-n));var r}static tickIndexToSqrtPriceX64(t){return new rf(t>0?function(t){let e;e=new rf(0!=(1&t)?"79232123823359799118286999567":"79228162514264337593543950336");0!=(2&t)&&(e=SL(e.mul(new rf("79236085330515764027303304731")),96,256));0!=(4&t)&&(e=SL(e.mul(new rf("79244008939048815603706035061")),96,256));0!=(8&t)&&(e=SL(e.mul(new rf("79259858533276714757314932305")),96,256));0!=(16&t)&&(e=SL(e.mul(new rf("79291567232598584799939703904")),96,256));0!=(32&t)&&(e=SL(e.mul(new rf("79355022692464371645785046466")),96,256));0!=(64&t)&&(e=SL(e.mul(new rf("79482085999252804386437311141")),96,256));0!=(128&t)&&(e=SL(e.mul(new rf("79736823300114093921829183326")),96,256));0!=(256&t)&&(e=SL(e.mul(new rf("80248749790819932309965073892")),96,256));0!=(512&t)&&(e=SL(e.mul(new rf("81282483887344747381513967011")),96,256));0!=(1024&t)&&(e=SL(e.mul(new rf("83390072131320151908154831281")),96,256));0!=(2048&t)&&(e=SL(e.mul(new rf("87770609709833776024991924138")),96,256));0!=(4096&t)&&(e=SL(e.mul(new rf("97234110755111693312479820773")),96,256));0!=(8192&t)&&(e=SL(e.mul(new rf("119332217159966728226237229890")),96,256));0!=(16384&t)&&(e=SL(e.mul(new rf("179736315981702064433883588727")),96,256));0!=(32768&t)&&(e=SL(e.mul(new rf("407748233172238350107850275304")),96,256));0!=(65536&t)&&(e=SL(e.mul(new rf("2098478828474011932436660412517")),96,256));0!=(131072&t)&&(e=SL(e.mul(new rf("55581415166113811149459800483533")),96,256));0!=(262144&t)&&(e=SL(e.mul(new rf("38992368544603139932233054999993551")),96,256));return SL(e,32,256)}(t):function(t){let e,n=Math.abs(t);e=new rf(0!=(1&n)?"18445821805675392311":"18446744073709551616");0!=(2&n)&&(e=SL(e.mul(new rf("18444899583751176498")),64,256));0!=(4&n)&&(e=SL(e.mul(new rf("18443055278223354162")),64,256));0!=(8&n)&&(e=SL(e.mul(new rf("18439367220385604838")),64,256));0!=(16&n)&&(e=SL(e.mul(new rf("18431993317065449817")),64,256));0!=(32&n)&&(e=SL(e.mul(new rf("18417254355718160513")),64,256));0!=(64&n)&&(e=SL(e.mul(new rf("18387811781193591352")),64,256));0!=(128&n)&&(e=SL(e.mul(new rf("18329067761203520168")),64,256));0!=(256&n)&&(e=SL(e.mul(new rf("18212142134806087854")),64,256));0!=(512&n)&&(e=SL(e.mul(new rf("17980523815641551639")),64,256));0!=(1024&n)&&(e=SL(e.mul(new rf("17526086738831147013")),64,256));0!=(2048&n)&&(e=SL(e.mul(new rf("16651378430235024244")),64,256));0!=(4096&n)&&(e=SL(e.mul(new rf("15030750278693429944")),64,256));0!=(8192&n)&&(e=SL(e.mul(new rf("12247334978882834399")),64,256));0!=(16384&n)&&(e=SL(e.mul(new rf("8131365268884726200")),64,256));0!=(32768&n)&&(e=SL(e.mul(new rf("3584323654723342297")),64,256));0!=(65536&n)&&(e=SL(e.mul(new rf("696457651847595233")),64,256));0!=(131072&n)&&(e=SL(e.mul(new rf("26294789957452057")),64,256));0!=(262144&n)&&(e=SL(e.mul(new rf("37481735321082")),64,256));return e}(t))}static sqrtPriceX64ToTickIndex(t){if(t.gt(new rf(kL))||t.lt(new rf("4295048016")))throw new Error("Provided sqrtPrice is not within the supported sqrtPrice range.");const e=t.bitLength()-1,n=function(t,e,n){let r=t.toTwos(n).shln(e);return r.imaskn(n+1),r.fromTwos(n)}(new rf(e-64),32,128);let r=new rf("8000000000000000","hex"),i=0,o=new rf(0),a=e>=64?t.shrn(e-63):t.shln(63-e);for(;r.gt(new rf(0))&&i<14;){a=a.mul(a);let t=a.shrn(127);a=a.shrn(63+t.toNumber()),o=o.add(r.mul(t)),r=r.shrn(1),i+=1}const s=o.shrn(32),u=n.add(s).mul(new rf("59543866431248")),c=SL(u.sub(new rf("184467440737095516")),64,128).toNumber(),l=SL(u.add(new rf("15793534762490258745")),64,128).toNumber();if(c==l)return c;return LL.tickIndexToSqrtPriceX64(l).lte(t)?l:c}static tickIndexToPrice(t,e,n){return LL.sqrtPriceX64ToPrice(LL.tickIndexToSqrtPriceX64(t),e,n)}static priceToTickIndex(t,e,n){return LL.sqrtPriceX64ToTickIndex(LL.priceToSqrtPriceX64(t,e,n))}static priceToInitializableTickIndex(t,e,n,r){return((t,e)=>t-t%e)(LL.priceToTickIndex(t,e,n),r)}static invertPrice(t,e,n){const r=LL.priceToTickIndex(t,e,n),i=TL(r);return LL.tickIndexToPrice(i,n,e)}static invertSqrtPriceX64(t){const e=LL.sqrtPriceX64ToTickIndex(t),n=TL(e);return LL.tickIndexToSqrtPriceX64(n)}}function SL(t,e,n){let r=t.toTwos(n).shrn(e);return r.imaskn(n-e+1),r.fromTwos(n-e)}const jL=new rf(1e4),CL=new rf(1e6),DL=new rf(0),OL=new rf(1),zL=new rf(2),PL=zL.pow(new rf(64)).sub(OL);class _L extends rf{toBuffer(){const t=super.toArray().reverse(),e=buffer.Buffer.from(t);if(8===e.length)return e;assert__default.default(e.length<8,"u64 too large");const n=buffer.Buffer.alloc(8);return e.copy(n),n}static fromBuffer(t){return assert__default.default(8===t.length,`Invalid buffer length: ${t.length}`),new _L([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(""),16)}}class BL{static mul(t,e,n){const r=t.mul(e);if(this.isOverLimit(r,n))throw new Error(`Mul result higher than u${n}`);return r}static mulDiv(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!1,r)}static mulDivRoundUp(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!0,r)}static mulDivRoundUpIf(t,e,n,r,i){if(n.eq(DL))throw new Error("mulDiv denominator is zero");const o=this.mul(t,e,i),a=o.div(n);return r&&o.mod(n).gt(DL)?a.add(OL):a}static checked_mul_shift_right(t,e,n){return this.checked_mul_shift_right_round_up_if(t,e,!1,n)}static checked_mul_shift_right_round_up_if(t,e,n,r){if(t.eq(DL)||e.eq(DL))return DL;const i=this.mul(t,e,r);if(this.isOverLimit(i,r))throw new Error(`MulShiftRight overflowed u${r}.`);const o=i.div(new rf(2).pow(new rf(64)));const a=n&&o.and(PL).gt(DL);if(a&&o.eq(PL))throw new Error(`MulShiftRight overflowed u${r}.`);return a?o.add(OL):o}static isOverLimit(t,e){const n=zL.pow(new rf(e)).sub(OL);return t.gt(n)}static divRoundUp(t,e){return this.divRoundUpIf(t,e,!0)}static divRoundUpIf(t,e,n){if(e.eq(DL))throw new Error("divRoundUpIf - divide by zero");let r=t.div(e);return n&&t.mod(e).gt(DL)?r.add(OL):r}}const RL=(t,e,n)=>{const r=LL.tickIndexToSqrtPriceX64(t);return{nextTickPrice:r,nextSqrtPriceLimit:n?rf.max(e,r):rf.min(e,r)}},UL=(t,e)=>t.gt(e)?[e,t]:[t,e],QL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i),s=n.mul(a).shln(64),u=i.mul(o),c=s.div(u),l=s.mod(u),h=r&&!l.eq(DL)?c.add(OL):c;if(h.gt(PL))throw new Error("Results larger than U64");return h},YL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i);return BL.checked_mul_shift_right_round_up_if(n,a,r,128)},WL=(t,e,n,r,i)=>r===i?((t,e,n,r)=>{if(n.eq(DL))return t;let i=BL.mul(t,n,256),o=BL.mul(e,t,256).shln(64);if(BL.isOverLimit(o,256))throw new Error("getNextSqrtPriceFromARoundUp - numerator overflow u256");let a=e.shln(64);if(!r&&a.lte(i))throw new Error("getNextSqrtPriceFromARoundUp - Unable to divide currLiquidityX64 by product");let s=r?a.add(i):a.sub(i),u=BL.divRoundUp(o,s);if(u.lt(new rf("4295048016")))throw new Error("getNextSqrtPriceFromARoundUp - price less than min sqrt price");if(u.gt(new rf(kL)))throw new Error("getNextSqrtPriceFromARoundUp - price less than max sqrt price");return u})(t,e,n,r):((t,e,n,r)=>{let i=n.shln(64),o=BL.divRoundUpIf(i,e,!r);return r?t.add(o):t.sub(o)})(t,e,n,r),FL=(t,e,n,r,i)=>i===r?QL(t,e,n,r):YL(t,e,n,r),VL=(t,e,n,r,i,o,a)=>{let s=FL(r,i,n,o,a),u=t;if(o){u=BL.mulDiv(t,CL.sub(new rf(e)),CL,128)}let c=u.gte(s)?i:WL(r,n,u,o,a),l=c.eq(i),h=((t,e,n,r,i)=>i===r?YL(t,e,n,!r):QL(t,e,n,!r))(r,c,n,o,a);l||(s=FL(r,c,n,o,a));let d,f=o?s:h,p=o?h:s;if(!o&&p.gt(t)&&(p=t),o&&!l)d=t.sub(f);else{const t=new rf(e);d=BL.mulDivRoundUp(f,t,CL.sub(t),128)}return{amountIn:f,amountOut:p,nextPrice:c,feeAmount:d}},HL=(t,e,n)=>n?e.sub(t):e.add(t),GL=(t,e,n,r,i)=>{let o=r,a=i,s=t;if(e>0){let t=((t,e)=>t.mul(new _L(e).div(jL)))(s,e);s=s.sub(t),o=o.add(r)}if(n.gt(DL)){const t=s.shln(64).div(n);a=a.add(t)}return{nextProtocolFee:o,nextFeeGrowthGlobalInput:a}},qL=pf([hf("mint"),hf("vault"),hf("authority"),yf("emissionsPerSecondX64"),yf("growthGlobalX64")]),ZL=pf([vf("anchorDiscriminator"),hf("whirlpoolsConfig"),Kd(wf(),1,"whirlpoolBump"),mf("tickSpacing"),Kd(wf(),2,"tickSpacingSeed"),mf("feeRate"),mf("protocolFeeRate"),yf("liquidity"),yf("sqrtPrice"),uf("tickCurrentIndex"),vf("protocolFeeOwedA"),vf("protocolFeeOwedB"),hf("tokenMintA"),hf("tokenVaultA"),yf("feeGrowthGlobalA"),hf("tokenMintB"),hf("tokenVaultB"),yf("feeGrowthGlobalB"),vf("rewardLastUpdatedTimestamp"),Kd(qL,3,"rewardInfos")]),JL=pf([af("initialized"),sf("liquidityNet"),yf("liquidityGross"),yf("feeGrowthOutsideA"),yf("feeGrowthOutsideB"),Kd(yf(),3,"reward_growths_outside")]),XL=pf([vf("anchorDiscriminator"),uf("startTickIndex"),Kd(JL,88,"ticks"),hf("whirlpool")]),KL=(t,e,n)=>{const r=(Math.floor(t/e/88)+n)*e*88,i=88*e;if(r<-443636-(-443636%i+i))throw`startTickIndex is too small - - ${r}`;if(r>443636)throw`startTickIndex is too large - ${r}`;return r},$L=async({pool:t,freshWhirlpoolData:e,aToB:n})=>{const r=await(async({aToB:t,pool:e,tickSpacing:n,tickCurrentIndex:r})=>{const i=t?0:n;let o=0,a=[];for(let s=0;s<3;s++){let s;try{s=KL(r+i,n,o)}catch(t){return a}const u=(await Xs.findProgramAddress([nf.from("tick_array"),new Xs(e.toString()).toBuffer(),nf.from(s.toString())],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0];a.push(u),o=t?o-1:o+1}return a})({aToB:n,pool:t,tickSpacing:e.tickSpacing,tickCurrentIndex:e.tickCurrentIndex});return await Promise.all(r.map((async(t,e)=>{let n;try{n=await PN({blockchain:"solana",address:t.toString(),api:XL,cache:10})}catch(t){}return{address:t,data:n}})))};class tS{static fromTickIndex(t,e){const n=Math.floor(Math.floor(t/e)/88);let r=Math.floor(t%(88*e)/e);return r<0&&(r=88+r),new tS(n,r,e)}constructor(t,e,n){if(e>=88)throw new Error("Invalid offsetIndex - value has to be smaller than TICK_ARRAY_SIZE");if(e<0)throw new Error("Invalid offsetIndex - value is smaller than 0");if(n<0)throw new Error("Invalid tickSpacing - value is less than 0");this.arrayIndex=t,this.offsetIndex=e,this.tickSpacing=n}toTickIndex(){return 88*this.arrayIndex*this.tickSpacing+this.offsetIndex*this.tickSpacing}toNextInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()+this.tickSpacing,this.tickSpacing)}toPrevInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()-this.tickSpacing,this.tickSpacing)}}class eS{constructor(t,e,n){if(!t[0]||!t[0].data)throw new Error("TickArray index 0 must be initialized");this.sequence=[];for(const e of t){if(!e||!e.data)break;this.sequence.push({address:e.address,data:e.data})}this.tickArrays=t,this.tickSpacing=e,this.aToB=n,this.touchedArrays=[...Array(this.sequence.length).fill(!1)],this.startArrayIndex=tS.fromTickIndex(this.sequence[0].data.startTickIndex,this.tickSpacing).arrayIndex}isValidTickArray0(t){const e=this.aToB?0:this.tickSpacing,n=this.sequence[0].data;return this.checkIfIndexIsInTickArrayRange(n.startTickIndex,t+e)}getNumOfTouchedArrays(){return this.touchedArrays.filter((t=>!!t)).length}getTouchedArrays(t){let e=this.touchedArrays.reduce(((t,e,n)=>(e&&t.push(this.sequence[n].address),t)),[]);if(0===e.length)return[];const n=t-e.length;return n>0&&(e=e.concat(Array(n).fill(e[e.length-1]))),e}getTick(t){const e=tS.fromTickIndex(t,this.tickSpacing);if(!this.isArrayIndexInBounds(e,this.aToB))throw new Error("Provided tick index is out of bounds for this sequence.");const n=this.getLocalArrayIndex(e.arrayIndex,this.aToB),r=this.sequence[n].data;if(this.touchedArrays[n]=!0,!r)throw new Error(`TickArray at index ${n} is not initialized.`);if(!this.checkIfIndexIsInTickArrayRange(r.startTickIndex,t))throw new Error(`TickArray at index ${n} is unexpected for this sequence.`);return r.ticks[e.offsetIndex]}findNextInitializedTickIndex(t){const e=this.aToB?t:t+this.tickSpacing;let n=tS.fromTickIndex(e,this.tickSpacing);if(!this.isArrayIndexInBounds(n,this.aToB))throw new Error(`Swap input value traversed too many arrays. Out of bounds at attempt to traverse tick index - ${n.toTickIndex()}.`);for(;this.isArrayIndexInBounds(n,this.aToB);){const t=this.getTick(n.toTickIndex());if(t.initialized)return{nextIndex:n.toTickIndex(),nextTickData:t};n=this.aToB?n.toPrevInitializableTickIndex():n.toNextInitializableTickIndex()}return{nextIndex:Math.max(Math.min(this.aToB?n.toTickIndex()+this.tickSpacing:n.toTickIndex()-1,443636),-443636),nextTickData:null}}getLocalArrayIndex(t,e){return e?this.startArrayIndex-t:t-this.startArrayIndex}isArrayIndexInBounds(t,e){const n=this.getLocalArrayIndex(t.arrayIndex,e),r=this.sequence.length;return n>=0&&n=t&&e{try{const n=await PN({blockchain:"solana",address:t.pubkey.toString(),api:ZL,cache:10}),s=n.tokenMintA.toString()===e,u=await $L({pool:t.pubkey,freshWhirlpoolData:n,aToB:s}),c=new eS(u,n.tickSpacing,s),l=new rf(s?"4295048016":kL),h=!(!r&&!i);return{price:(({tokenAmount:t,aToB:e,freshWhirlpoolData:n,tickSequence:r,sqrtPriceLimit:i,amountSpecifiedIsInput:o})=>{let a=t,s=DL,u=n.sqrtPrice,c=n.liquidity,l=n.tickCurrentIndex,h=DL;const d=n.feeRate,f=n.protocolFeeRate;let p=new _L(0),y=e?n.feeGrowthGlobalA:n.feeGrowthGlobalB;for(;a.gt(DL)&&!i.eq(u);){let{nextIndex:t}=r.findNextInitializedTickIndex(l),{nextTickPrice:n,nextSqrtPriceLimit:m}=RL(t,i,e);const g=VL(a,d,c,u,m,o,e);h=h.add(g.feeAmount),o?(a=a.sub(g.amountIn),a=a.sub(g.feeAmount),s=s.add(g.amountOut)):(a=a.sub(g.amountOut),s=s.add(g.amountIn),s=s.add(g.feeAmount));let{nextProtocolFee:v,nextFeeGrowthGlobalInput:w}=GL(g.feeAmount,f,c,p,y);if(p=v,y=w,g.nextPrice.eq(n)){const n=r.getTick(t);n.initialized&&(c=HL(n.liquidityNet,c,e)),l=e?t-1:t}else l=LL.sqrtPriceX64ToTickIndex(g.nextPrice);u=g.nextPrice}return s})({tokenAmount:new rf((r||i||o||a).toString()),aToB:s,freshWhirlpoolData:n,tickSequence:c,sqrtPriceLimit:l,amountSpecifiedIsInput:h}).toString(),tickArrays:u,aToB:s,sqrtPriceLimit:l}}catch(t){return{price:void 0,tickArrays:void 0,aToB:void 0,sqrtPriceLimit:void 0}}};let rS=async(t,e)=>await PN("solana://whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc/getProgramAccounts",{params:{filters:[{dataSize:ZL.span},{memcmp:{offset:8,bytes:"2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ"}},{memcmp:{offset:101,bytes:t}},{memcmp:{offset:181,bytes:e}}]},api:ZL,cache:86400,cacheKey:["whirlpool",t.toString(),e.toString()].join("-")}),iS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{try{let a=await rS(t,e);return 0===a.length&&(a=await rS(e,t)),a=a.filter((t=>t.data.liquidity.gt(1))),a=(await Promise.all(a.map((async a=>{const{price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l}=await nS({account:a,tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});return void 0!==s&&{pubkey:a.pubkey,price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l,data:{tokenVaultA:a.data.tokenVaultA,tokenVaultB:a.data.tokenVaultB}}})))).filter(Boolean),a}catch(t){return[]}},oS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{const a=await iS({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});if(!a||0===a.length)return;let s;return s=n||r?(t=>t.reduce(((t,e)=>Fp.from(e.price).gt(Fp.from(t.price))?e:t)))(a):(t=>t.reduce(((t,e)=>Fp.from(e.price).lt(Fp.from(t.price))?e:t)))(a),s};function aS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const sS=Hf.solana;let uS=({path:t})=>{if(!t)return;let e=t.map(((e,n)=>e===sS.currency.address&&t[n+1]!=sS.wrapped.address&&t[n-1]!=sS.wrapped.address?sS.wrapped.address:e));return e[0]==sS.currency.address&&e[1]==sS.wrapped.address?e.splice(0,1):e[e.length-1]==sS.currency.address&&e[e.length-2]==sS.wrapped.address&&e.splice(e.length-1,1),e},cS=async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})=>1!=t.length&&(t=uS({path:t}),(await iS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})).length>0),lS=async({path:t,amountIn:e,amountInMax:n})=>{let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[2],amountIn:e?r[1]:void 0,amountInMax:n?r[1]:void 0})).price)),r.length==t.length)return r},hS=async({path:t,amountOut:e,amountOutMin:n})=>{t=t.slice().reverse();let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[0],amountOut:e,amountOutMin:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[2],tokenOut:t[1],amountOut:e?r[1]:void 0,amountOutMin:n?r[1]:void 0})).price)),r.length==t.length)return r.slice().reverse()};const dS=Hf.solana,fS=new rf("14449647541112719096"),pS=new rf("16635068063392030915"),yS=async({instructions:t,owner:e,token:n,account:r})=>{let i;try{i=!!await PN({blockchain:"solana",address:r.toString()})}catch(t){}i||t.push(await Ak.solana.createAssociatedTokenAccountInstruction({token:n,owner:e,payer:e}))},mS=async({account:t,poolOne:e,tickArraysOne:n,tokenAccountOneA:r,tokenVaultOneA:i,tokenAccountOneB:o,tokenVaultOneB:a,poolTwo:s,tickArraysTwo:u,tokenAccountTwoA:c,tokenVaultTwoA:l,tokenAccountTwoB:h,tokenVaultTwoB:d})=>{let f=!1;const p=n.map(((t,e)=>!1!==f?n[f]:t.data?t:(f=e-1,n[e-1])));let y=!1;const m=u.map(((t,e)=>!1!==y?u[y]:t.data?t:(y=e-1,u[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(s.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(a.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(c.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(l.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(h.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(d.toString()),isWritable:!0,isSigner:!1},{pubkey:p[0].address,isWritable:!0,isSigner:!1},{pubkey:p[1].address,isWritable:!0,isSigner:!1},{pubkey:p[2].address,isWritable:!0,isSigner:!1},{pubkey:m[0].address,isWritable:!0,isSigner:!1},{pubkey:m[1].address,isWritable:!0,isSigner:!1},{pubkey:m[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(s.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},gS=({amount:t,otherAmountThreshold:e,amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a})=>{let s,u;return s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]),u=nf.alloc(s.span),s.encode({anchorDiscriminator:pS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a},u),u},vS=async({account:t,pool:e,tokenAccountA:n,tokenVaultA:r,tokenAccountB:i,tokenVaultB:o,tickArrays:a})=>{let s=!1;const u=a.map(((t,e)=>!1!==s?a[s]:t.data?t:(s=e-1,a[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(n.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:u[0].address,isWritable:!0,isSigner:!1},{pubkey:u[1].address,isWritable:!0,isSigner:!1},{pubkey:u[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},wS=({amount:t,otherAmountThreshold:e,sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i})=>{let o,a;return o=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]),a=nf.alloc(o.span),o.encode({anchorDiscriminator:fS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i},a),a};var bS={findPath:async({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o})=>{if([t,e].includes(sS.currency.address)&&[t,e].includes(sS.wrapped.address))return{path:void 0,exchangePath:void 0};let a,s,u,c;return await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?a=[t,e]:t!=sS.wrapped.address&&t!=sS.currency.address&&await cS({path:[t,sS.wrapped.address],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})&&e!=sS.wrapped.address&&e!=sS.currency.address&&await cS({path:[e,sS.wrapped.address],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?a=[t,sS.wrapped.address,e]:!sS.stables.usd.includes(t)&&(s=(await Promise.all(sS.stables.usd.map((async e=>await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?e:void 0)))).filter(Boolean))&&!sS.stables.usd.includes(e)&&(u=(await Promise.all(sS.stables.usd.map((async t=>await cS({path:[e,t],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?t:void 0)))).filter(Boolean))&&(c=s.filter((t=>u.includes(t)))[0])&&(a=[t,c,e]),aS([a,"optionalAccess",t=>t.length])&&a[0]==sS.currency.address?a.splice(1,0,sS.wrapped.address):aS([a,"optionalAccess",t=>t.length])&&a[a.length-1]==sS.currency.address&&a.splice(a.length-1,0,sS.wrapped.address),{path:a,exchangePath:uS({path:a})}},pathExists:cS,getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=uS({path:t}),r){if(s=await hS({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await lS({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await hS({path:t,amountOutMin:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await lS({path:t,amountInMax:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amounts:o,amountInInput:a,amountOutInput:s,amountInMaxInput:u,amountOutMinInput:c,account:l})=>{let h={blockchain:"solana"},d=[];const f=uS({path:t});if(f.length>3)throw"Orca can only handle fixed paths with a max length of 3 (2 pools)!";const p=f[0],y=3==f.length?f[1]:void 0,m=f[f.length-1];let g;2==f.length?g=[await oS({tokenIn:p,tokenOut:m,amountIn:a||u,amountOut:s||c})]:a||u?(g=[await oS({tokenIn:p,tokenOut:y,amountIn:a||u})],g.push(await oS({tokenIn:y,tokenOut:m,amountIn:g[0].price}))):(g=[await oS({tokenIn:y,tokenOut:m,amountOut:s||c})],g.unshift(await oS({tokenIn:p,tokenOut:y,amountOut:g[0].price})));let v,w=t[0]===dS.currency.address&&f[0]===dS.wrapped.address,b=t[t.length-1]===dS.currency.address&&f[f.length-1]===dS.wrapped.address;const M=await LN("solana");if(w||b){const t=await M.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span),n=Zl.generate();v=n.publicKey.toString();const r=w?new rf(e.toString()).add(new rf(t)):new rf(t);let i=Wu.createAccount({fromPubkey:new Xs(l),newAccountPubkey:new Xs(v),programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r});i.signers=[n],d.push(i),d.push(Ak.solana.initializeAccountInstruction({account:v,token:dS.wrapped.address,owner:l}))}if(1===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:h}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await vS({account:l,pool:g[0].pubkey,tokenAccountA:g[0].aToB?u:h,tokenVaultA:g[0].data.tokenVaultA,tokenAccountB:g[0].aToB?h:u,tokenVaultB:g[0].data.tokenVaultB,tickArrays:g[0].tickArrays}),data:wS({amount:o,otherAmountThreshold:s,sqrtPriceLimit:g[0].sqrtPriceLimit,amountSpecifiedIsInput:t,aToB:g[0].aToB})}))}else if(2===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=f[1],y=new Xs(await Ak.solana.findProgramAddress({owner:l,token:h}));await yS({instructions:d,owner:l,token:h,account:y});let M=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:M}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await mS({account:l,poolOne:g[0].pubkey,tickArraysOne:g[0].tickArrays,tokenAccountOneA:g[0].aToB?u:y,tokenVaultOneA:g[0].data.tokenVaultA,tokenAccountOneB:g[0].aToB?y:u,tokenVaultOneB:g[0].data.tokenVaultB,poolTwo:g[1].pubkey,tickArraysTwo:g[1].tickArrays,tokenAccountTwoA:g[1].aToB?y:M,tokenVaultTwoA:g[1].data.tokenVaultA,tokenAccountTwoB:g[1].aToB?M:y,tokenVaultTwoB:g[1].data.tokenVaultB}),data:gS({amount:o,otherAmountThreshold:s,amountSpecifiedIsInput:t,aToBOne:g[0].aToB,aToBTwo:g[1].aToB,sqrtPriceLimitOne:g[0].sqrtPriceLimit,sqrtPriceLimitTwo:g[1].sqrtPriceLimit})}))}return(w||b)&&d.push(Ak.solana.closeAccountInstruction({account:v,owner:l})),h.instructions=d,h},WHIRLPOOL_LAYOUT:ZL};const MS={name:"orca",label:"Orca",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImthdG1hbl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjRkZEMTVDIiBkPSJNNDg4LjQsMjIyLjljMCwxMDMu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I4LjgsMzQuM2MxNy41LDM5LDE3LjYsMzYuMiwxNy42LDM2LjJjMzIuNS0xOC4yLDE5LjEtNTguNSwxNC4zLTcwLjQKCUMyMjYuNiwyMjMsMjI0LjcsMjIzLDIyNCwyMjQuMnoiLz4KPHBhdGggZD0iTTE1MC40LDI2MC4xYzE4LjcsMi40LDI5LjgtMTMuOCw0NC44LTEuNmMxOS45LDM3LjgsMTcuNiwzNi4yLDE3LjYsMzYuMmMtMzQuNCwxNC40LTU3LjktMjEtNjQuMy0zMi4xCglDMTQ3LjgsMjYxLjMsMTQ5LDI1OS45LDE1MC40LDI2MC4xeiIvPgo8cGF0aCBkPSJNMzA2LjksMjM2YzAsMCwxOC43LDE5LjEsOC45LDIyLjFjLTEyLjItNy41LTM0LTEuNy00NC43LDEuOWMtMi42LDAuOS01LjItMS40LTQuMy00LjFjMy42LTEwLDEyLjYtMjguNiwyOS45LTMxCglDMzA2LjksMjIyLjQsMzA2LjksMjM2LDMwNi45LDIzNnoiLz4KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTMxOC4zLDE0Mi41Yy0yLjEtMy02LjQtMTEsNi44LTExYzEzLjIsMCwzMy4zLDE0LjksMzcuNCwyMC40Yy0xLjMsMy40LTkuOCw0LjEtMTQsMy44Yy00LjItMC4zLTExLjUtMS0xNy0zLjgKCUMzMjYsMTQ5LjIsMzIwLjUsMTQ1LjUsMzE4LjMsMTQyLjV6Ii8+Cjwvc3ZnPgo=",protocol:"orca",slippage:!0,blockchains:["solana"],solana:{router:{address:"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",api:bS.WHIRLPOOL_LAYOUT}}};var AS=t=>new gL(Object.assign(MS,{scope:t,findPath:t=>bS.findPath({...t,exchange:MS}),pathExists:t=>bS.pathExists({...t,exchange:MS}),getAmounts:t=>bS.getAmounts({...t,exchange:MS}),getPrep:t=>{},getTransaction:t=>bS.getTransaction({...t,exchange:MS})}));const NS={name:"pancakeswap",label:"PancakeSwap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xMTcuODk2Qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["bsc"],bsc:{router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:IL.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:IL.FACTORY},pair:{api:IL.PAIR}}};var IS=t=>new gL(Object.assign(NS,{scope:t,findPath:t=>IL.findPath({...t,exchange:NS}),pathExists:t=>IL.pathExists({...t,exchange:NS}),getAmounts:t=>IL.getAmounts({...t,exchange:NS}),getPrep:t=>IL.getPrep({...t,exchange:NS}),getTransaction:t=>IL.getTransaction({...t,exchange:NS})}));function ES(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const xS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},kS=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=xS({blockchain:t,exchange:e,path:n})).length>2)throw"PancakeSwap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;return n=r?await(async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:e,pool:t,inputAmount:r}):await(async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:e,pool:t,outputAmount:i}),{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let TS=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,LS=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var SS={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await kS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return ES([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):ES([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:xS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await kS({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i,tokenOut:o})=>{if(n===Hf[e].currency.address)return;let a;a=o===Hf[e].currency.address?t[e].smartRouter.address:t[e].router.address;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,a]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[a,Hf[e].maxInt]}}}},getTransaction:async({blockchain:t,exchange:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d,inputTokenPushed:f})=>{const p={blockchain:t,from:d},y=Math.floor(Date.now()/1e3)+21600,m=xS({blockchain:t,exchange:e,path:r});if(r[r.length-1]===Hf[t].currency.address){p.to=e[t].smartRouter.address,p.api=e[t].smartRouter.api,p.method="multicall";const r=new Og(e[t].smartRouter.api);if(p.params={data:[]},2===m.length)u||h?p.params.data.push(r.encodeFunctionData("exactInputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}]));else{const d=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?p.params.data.push(r.encodeFunctionData("exactInput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}]))}p.params.data.push(r.encodeFunctionData("unwrapWETH9",[(s||a).toString(),d]))}else if(p.to=e[t].router.address,p.api=e[t].router.api,r[0]===Hf[t].currency.address&&(p.value=(i||o).toString()),2===m.length)u||h?(p.method="exactInputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}}):(c||l)&&(p.method="exactOutputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}});else{const t=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?(p.method="exactInput",p.params={params:{path:t,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}}):(c||l)&&(p.method="exactOutput",p.params={params:{path:t,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}})}return p},ROUTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct ISwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct ISwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],SMART_ROUTER:[{inputs:[{internalType:"address",name:"_factoryV2",type:"address"},{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factoryV3",type:"address"},{internalType:"address",name:"_positionManager",type:"address"},{internalType:"address",name:"_stableFactory",type:"address"},{internalType:"address",name:"_stableInfo",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"factory",type:"address"},{indexed:!0,internalType:"address",name:"info",type:"address"}],name:"SetStableSwap",type:"event"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"data",type:"bytes"}],name:"callPositionManager",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"paths",type:"bytes[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactInputStableSwap",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactOutputStableSwap",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factoryV2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"getApprovalType",outputs:[{internalType:"enum IApproveAndCall.ApprovalType",name:"",type:"uint8"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"}],internalType:"struct IApproveAndCall.IncreaseLiquidityParams",name:"params",type:"tuple"}],name:"increaseLiquidity",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],internalType:"struct IApproveAndCall.MintParams",name:"params",type:"tuple"}],name:"mint",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"previousBlockhash",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"positionManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"pull",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_info",type:"address"}],name:"setStableSwap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stableSwapFactory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"stableSwapInfo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"wrapETH",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_poolDeployer",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"bool",name:"whitelistRequested",type:"bool"},{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"FeeAmountExtraInfoUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"lmPoolDeployer",type:"address"}],name:"SetLmPoolDeployer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"verified",type:"bool"}],name:"WhiteListAdded",type:"event"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacingExtraInfo",outputs:[{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPoolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"poolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],name:"setFeeAmountExtraInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPoolDeployer",type:"address"}],name:"setLmPoolDeployer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"verified",type:"bool"}],name:"setWhiteListAddress",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint32",name:"feeProtocol0Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol0New",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1New",type:"uint32"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"addr",type:"address"}],name:"SetLmPoolEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken1",type:"uint128"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPool",outputs:[{internalType:"contract IPancakeV3LmPool",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint32",name:"feeProtocol",type:"uint32"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]};const jS={name:"pancakeswap_v3",label:"PancakeSwap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJod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A1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"pancakeswap_v3",slippage:!0,fees:[100,500,2500,1e4],blockchains:["bsc"],bsc:{router:{address:"0x1b81D678ffb9C0263b24A97847620C99d213eB14",api:SS.ROUTER},smartRouter:{address:"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4",api:SS.SMART_ROUTER},factory:{address:"0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865",api:SS.FACTORY},pair:{api:SS.POOL},quoter:{address:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",api:SS.QUOTER}}};var CS=t=>new gL(Object.assign(jS,{scope:t,findPath:t=>SS.findPath({...t,exchange:jS}),pathExists:t=>SS.pathExists({...t,exchange:jS}),getAmounts:t=>SS.getAmounts({...t,exchange:jS}),getPrep:t=>SS.getPrep({...t,exchange:jS}),getTransaction:t=>SS.getTransaction({...t,exchange:jS})}));const DS={name:"quickswap",label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0i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TM0LjYsNDIuMzdhMTk5Ljg5LDE5OS44OSwwLDAsMS0zOS4zNywyNy41NCwyMTkuNSwyMTkuNSwwLDAsMS01NC4yNiwyMC43MSwyMDkuMjcsMjA5LjI3LDAsMCwxLTM2LjA1LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",protocol:"uniswap_v2",slippage:!0,blockchains:["polygon"],polygon:{router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:IL.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:IL.FACTORY},pair:{api:IL.PAIR}}};var OS=t=>new gL(Object.assign(DS,{scope:t,findPath:t=>IL.findPath({...t,exchange:DS}),pathExists:t=>IL.pathExists({...t,exchange:DS}),getAmounts:t=>IL.getAmounts({...t,exchange:DS}),getPrep:t=>IL.getPrep({...t,exchange:DS}),getTransaction:t=>IL.getTransaction({...t,exchange:DS})}));const zS={name:"spookyswap",label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQxIDY0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQxIDY0MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZpbGw9IiMxMjExMjIiIGQ9Ik0zNC4yLDMyMGMwL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yLjgtOC41cy0xNSwxNy0xOS42LDE0LjNjLTUuMi0yLjYsMC43LTI0LjgsMC43LTI0LjhzLTIxLjUtOS4xLTE5LjYtMTQuM2MxLjMtNS4yLDIzLjUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",protocol:"uniswap_v2",slippage:!0,blockchains:["fantom"],fantom:{router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:IL.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:IL.FACTORY},pair:{api:IL.PAIR}}};var PS=t=>new gL(Object.assign(zS,{scope:t,findPath:t=>IL.findPath({...t,exchange:zS}),pathExists:t=>IL.pathExists({...t,exchange:zS}),getAmounts:t=>IL.getAmounts({...t,exchange:zS}),getPrep:t=>IL.getPrep({...t,exchange:zS}),getTransaction:t=>IL.getTransaction({...t,exchange:zS})}));function _S(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const BS=({blockchain:t,path:e})=>{if(!e)return;let n=e.map(((n,r)=>n===Hf[t].currency.address&&e[r+1]!=Hf[t].wrapped.address&&e[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:n));return n[0]==Hf[t].currency.address&&n[1]==Hf[t].wrapped.address?n.splice(0,1):n[n.length-1]==Hf[t].currency.address&&n[n.length-2]==Hf[t].wrapped.address&&n.splice(n.length-1,1),n},RS=async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,block:o})=>{let a;if(n=BS({blockchain:e,path:n}),a=r?await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountIn:r}}).catch((()=>{})):await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountOut:i}}).catch((()=>{})),a&&!a.virtualAmountsWithoutSlippage.some((t=>"0"===t.toString())))return a};let US=async({exchange:t,blockchain:e,path:n,pools:r,amountIn:i})=>{let o=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,params:{route:BS({blockchain:e,path:n}),amountIn:i}}).catch((()=>{}));if(o)return o.virtualAmountsWithoutSlippage[o.virtualAmountsWithoutSlippage.length-1]},QS=async({exchange:t,blockchain:e,path:n,pools:r,amountOut:i,block:o})=>{let a=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:BS({blockchain:e,path:n}),amountOut:i}}).catch((()=>{}));if(a)return a.virtualAmountsWithoutSlippage[0]};var YS={findPath:async({exchange:t,blockchain:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[e].currency.address)&&[n,r].includes(Hf[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await RS({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[e].wrapped.address||r==Hf[e].wrapped.address||(c=[],o||s?(c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length&&(u=[n,Hf[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return _S([u,"optionalAccess",t=>t.length])&&u[0]==Hf[e].currency.address?u.splice(1,0,Hf[e].wrapped.address):_S([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[e].currency.address&&u.splice(u.length-1,0,Hf[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:BS({blockchain:e,path:u})}},pathExists:async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>!!await RS({exchange:t,blockchain:e,path:n,amountIn:r||o,amountOut:i||a}),getAmounts:async({exchange:t,blockchain:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getTransaction:async({exchange:t,blockchain:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d})=>{const f={blockchain:e,from:d,to:t[e].router.address,api:t[e].router.api},p=Math.round(Date.now()/1e3)+86400,y=[n.map((t=>t.binSteps[0])),n.map((t=>t.versions[0])),BS({blockchain:e,path:r})];return r[0]===Hf[e].currency.address?l?(f.method="swapNATIVEForExactTokens",f.params={amountOut:a,path:y,to:d,deadline:p},f.value=o):(f.method="swapExactNATIVEForTokens",f.params={amountOutMin:s||a,path:y,to:d,deadline:p},f.value=i):r[r.length-1]===Hf[e].currency.address?l?(f.method="swapTokensForExactNATIVE",f.params={amountNATIVEOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForNATIVE",f.params={amountIn:i,amountOutMinNATIVE:s||a,path:y,to:d,deadline:p}):l?(f.method="swapTokensForExactTokens",f.params={amountOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForTokens",f.params={amountIn:i,amountOutMin:s||a,path:y,to:d,deadline:p}),f},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},ROUTER:[{inputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"},{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"},{internalType:"contract ILBLegacyFactory",name:"legacyFactory",type:"address"},{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"},{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[{internalType:"uint256",name:"amountSlippage",type:"uint256"}],name:"LBRouter__AmountSlippageBPTooBig",type:"error"},{inputs:[{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],name:"LBRouter__AmountSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__BinReserveOverflows",type:"error"},{inputs:[],name:"LBRouter__BrokenSwapSafetyCheck",type:"error"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"currentTimestamp",type:"uint256"}],name:"LBRouter__DeadlineExceeded",type:"error"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBRouter__FailedToSendNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"idDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"}],name:"LBRouter__IdDesiredOverflows",type:"error"},{inputs:[{internalType:"int256",name:"id",type:"int256"}],name:"LBRouter__IdOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"uint256",name:"activeId",type:"uint256"}],name:"LBRouter__IdSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"LBRouter__InsufficientAmountOut",type:"error"},{inputs:[{internalType:"address",name:"wrongToken",type:"address"}],name:"LBRouter__InvalidTokenPath",type:"error"},{inputs:[{internalType:"uint256",name:"version",type:"uint256"}],name:"LBRouter__InvalidVersion",type:"error"},{inputs:[],name:"LBRouter__LengthsMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"LBRouter__MaxAmountInExceeded",type:"error"},{inputs:[],name:"LBRouter__NotFactoryOwner",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBRouter__PairNotCreated",type:"error"},{inputs:[],name:"LBRouter__SenderIsNotWNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__SwapOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"excess",type:"uint256"}],name:"LBRouter__TooMuchTokensIn",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"reserve",type:"uint256"}],name:"LBRouter__WrongAmounts",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"msgValue",type:"uint256"}],name:"LBRouter__WrongNativeLiquidityParameters",type:"error"},{inputs:[],name:"LBRouter__WrongTokenOrder",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"lbFactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactory",outputs:[{internalType:"contract ILBLegacyFactory",name:"legacyLBfactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouter",outputs:[{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getV1Factory",outputs:[{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWNATIVE",outputs:[{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountNATIVEMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountNATIVE",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVE",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVESupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNATIVEForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountNATIVEOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactNATIVE",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"sweep",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBToken",name:"lbToken",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"sweepLBToken",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"feeRecipient",type:"address"},{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"LBFactory__AddressZero",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepHasNoPreset",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepTooLow",type:"error"},{inputs:[{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"uint256",name:"maxFees",type:"uint256"}],name:"LBFactory__FlashLoanFeeAboveMax",type:"error"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"LBFactory__IdenticalAddresses",type:"error"},{inputs:[],name:"LBFactory__ImplementationNotSet",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"_binStep",type:"uint256"}],name:"LBFactory__LBPairAlreadyExists",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairDoesNotExist",type:"error"},{inputs:[],name:"LBFactory__LBPairIgnoredIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairNotCreated",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__LBPairSafetyCheckFailed",type:"error"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__PresetIsLockedForUsers",type:"error"},{inputs:[],name:"LBFactory__PresetOpenStateIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetAlreadyWhitelisted",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetNotWhitelisted",type:"error"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"LBFactory__SameFeeRecipient",type:"error"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"LBFactory__SameFlashLoanFee",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__SameImplementation",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"PendingOwnable__AddressZero",type:"error"},{inputs:[],name:"PendingOwnable__NoPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__PendingOwnerAlreadySet",type:"error"},{inputs:[],name:"SafeCast__Exceeds16Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldRecipient",type:"address"},{indexed:!1,internalType:"address",name:"newRecipient",type:"address"}],name:"FeeRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldFlashLoanFee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newFlashLoanFee",type:"uint256"}],name:"FlashLoanFeeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"tokenX",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenY",type:"address"},{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"uint256",name:"pid",type:"uint256"}],name:"LBPairCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"bool",name:"ignored",type:"bool"}],name:"LBPairIgnoredStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldLBPairImplementation",type:"address"},{indexed:!1,internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBPairImplementationSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"PendingOwnerSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!0,internalType:"bool",name:"isOpen",type:"bool"}],name:"PresetOpenStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"}],name:"PresetRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"uint256",name:"baseFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"filterPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"decayPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"reductionFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"variableFeeControl",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolShare",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"}],name:"PresetSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetRemoved",type:"event"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"addQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"becomeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllBinSteps",outputs:[{internalType:"uint256[]",name:"binStepWithPreset",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"}],name:"getAllLBPairs",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation[]",name:"lbPairsAvailable",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeRecipient",outputs:[{internalType:"address",name:"feeRecipient",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFlashLoanFee",outputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getLBPairAtIndex",outputs:[{internalType:"contract ILBPair",name:"lbPair",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLBPairImplementation",outputs:[{internalType:"address",name:"lbPairImplementation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenA",type:"address"},{internalType:"contract IERC20",name:"tokenB",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getLBPairInformation",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation",name:"lbPairInformation",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxFlashLoanFee",outputs:[{internalType:"uint256",name:"maxFee",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getMinBinStep",outputs:[{internalType:"uint256",name:"minBinStep",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getNumberOfLBPairs",outputs:[{internalType:"uint256",name:"lbPairNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumberOfQuoteAssets",outputs:[{internalType:"uint256",name:"numberOfQuoteAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOpenBinSteps",outputs:[{internalType:"uint256[]",name:"openBinStep",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getPreset",outputs:[{internalType:"uint256",name:"baseFactor",type:"uint256"},{internalType:"uint256",name:"filterPeriod",type:"uint256"},{internalType:"uint256",name:"decayPeriod",type:"uint256"},{internalType:"uint256",name:"reductionFactor",type:"uint256"},{internalType:"uint256",name:"variableFeeControl",type:"uint256"},{internalType:"uint256",name:"protocolShare",type:"uint256"},{internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"},{internalType:"bool",name:"isOpen",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getQuoteAssetAtIndex",outputs:[{internalType:"contract IERC20",name:"asset",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isQuoteAsset",outputs:[{internalType:"bool",name:"isQuote",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"}],name:"removePreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"removeQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"revokePendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"setFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setFeesParametersOnPair",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"setFlashLoanFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"ignored",type:"bool"}],name:"setLBPairIgnored",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newLBPairImplementation",type:"address"}],name:"setLBPairImplementation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner_",type:"address"}],name:"setPendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPresetOpenState",outputs:[],stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[{internalType:"contract ILBFactory",name:"factory_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"BinHelper__CompositionFactorFlawed",type:"error"},{inputs:[],name:"BinHelper__LiquidityOverflow",type:"error"},{inputs:[],name:"FeeHelper__FeeTooLarge",type:"error"},{inputs:[],name:"LBPair__AddressZero",type:"error"},{inputs:[],name:"LBPair__AlreadyInitialized",type:"error"},{inputs:[],name:"LBPair__EmptyMarketConfigs",type:"error"},{inputs:[],name:"LBPair__FlashLoanCallbackFailed",type:"error"},{inputs:[],name:"LBPair__FlashLoanInsufficientAmount",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountIn",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountOut",type:"error"},{inputs:[],name:"LBPair__InvalidInput",type:"error"},{inputs:[],name:"LBPair__InvalidStaticFeeParameters",type:"error"},{inputs:[],name:"LBPair__MaxTotalFeeExceeded",type:"error"},{inputs:[],name:"LBPair__OnlyFactory",type:"error"},{inputs:[],name:"LBPair__OnlyProtocolFeeRecipient",type:"error"},{inputs:[],name:"LBPair__OutOfLiquidity",type:"error"},{inputs:[],name:"LBPair__TokenNotSupported",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmountsOut",type:"error"},{inputs:[],name:"LBPair__ZeroBorrowAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroShares",type:"error"},{inputs:[],name:"LBToken__AddressThisOrZero",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__BurnExceedsBalance",type:"error"},{inputs:[],name:"LBToken__InvalidLength",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"LBToken__SelfApproval",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"LBToken__SpenderNotApproved",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__TransferExceedsBalance",type:"error"},{inputs:[],name:"LiquidityConfigurations__InvalidConfig",type:"error"},{inputs:[],name:"OracleHelper__InvalidOracleId",type:"error"},{inputs:[],name:"OracleHelper__LookUpTimestampTooOld",type:"error"},{inputs:[],name:"OracleHelper__NewLengthTooSmall",type:"error"},{inputs:[],name:"PackedUint128Math__AddOverflow",type:"error"},{inputs:[],name:"PackedUint128Math__MultiplierTooLarge",type:"error"},{inputs:[],name:"PackedUint128Math__SubUnderflow",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"ReentrancyGuard__ReentrantCall",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds40Bits",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[],name:"Uint128x128Math__LogUnderflow",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"feeRecipient",type:"address"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CollectedProtocolFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CompositionFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"DepositedToBins",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{indexed:!1,internalType:"uint24",name:"activeId",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amounts",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"idReference",type:"uint24"},{indexed:!1,internalType:"uint24",name:"volatilityReference",type:"uint24"}],name:"ForcedDecay",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"oracleLength",type:"uint16"}],name:"OracleLengthIncreased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"baseFactor",type:"uint16"},{indexed:!1,internalType:"uint16",name:"filterPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"decayPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"reductionFactor",type:"uint16"},{indexed:!1,internalType:"uint24",name:"variableFeeControl",type:"uint24"},{indexed:!1,internalType:"uint16",name:"protocolShare",type:"uint16"},{indexed:!1,internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"StaticFeeParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amountsIn",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"amountsOut",type:"bytes32"},{indexed:!1,internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"WithdrawnFromBins",type:"event"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"approveForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"batchBalances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"batchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amountsToBurn",type:"uint256[]"}],name:"burn",outputs:[{internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"collectProtocolFees",outputs:[{internalType:"bytes32",name:"collectedProtocolFees",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{internalType:"bytes32",name:"amounts",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getActiveId",outputs:[{internalType:"uint24",name:"activeId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getBin",outputs:[{internalType:"uint128",name:"binReserveX",type:"uint128"},{internalType:"uint128",name:"binReserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBinStep",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"id",type:"uint24"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getNextNonEmptyBin",outputs:[{internalType:"uint24",name:"nextId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOracleParameters",outputs:[{internalType:"uint8",name:"sampleLifetime",type:"uint8"},{internalType:"uint16",name:"size",type:"uint16"},{internalType:"uint16",name:"activeSize",type:"uint16"},{internalType:"uint40",name:"lastUpdated",type:"uint40"},{internalType:"uint40",name:"firstTimestamp",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint40",name:"lookupTimestamp",type:"uint40"}],name:"getOracleSampleAt",outputs:[{internalType:"uint64",name:"cumulativeId",type:"uint64"},{internalType:"uint64",name:"cumulativeVolatility",type:"uint64"},{internalType:"uint64",name:"cumulativeBinCrossed",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"price",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getProtocolFees",outputs:[{internalType:"uint128",name:"protocolFeeX",type:"uint128"},{internalType:"uint128",name:"protocolFeeY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReserves",outputs:[{internalType:"uint128",name:"reserveX",type:"uint128"},{internalType:"uint128",name:"reserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStaticFeeParameters",outputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenX",outputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getTokenY",outputs:[{internalType:"contract IERC20",name:"tokenY",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVariableFeeParameters",outputs:[{internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"volatilityReference",type:"uint24"},{internalType:"uint24",name:"idReference",type:"uint24"},{internalType:"uint40",name:"timeOfLastUpdate",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"newLength",type:"uint16"}],name:"increaseOracleLength",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"activeId",type:"uint24"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bytes32[]",name:"liquidityConfigs",type:"bytes32[]"},{internalType:"address",name:"refundTo",type:"address"}],name:"mint",outputs:[{internalType:"bytes32",name:"amountsReceived",type:"bytes32"},{internalType:"bytes32",name:"amountsLeft",type:"bytes32"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setStaticFeeParameters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"address",name:"to",type:"address"}],name:"swap",outputs:[{internalType:"bytes32",name:"amountsOut",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"factoryV1",type:"address"},{internalType:"address",name:"legacyFactoryV2",type:"address"},{internalType:"address",name:"factoryV2",type:"address"},{internalType:"address",name:"legacyRouterV2",type:"address"},{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"JoeLibrary__AddressZero",type:"error"},{inputs:[],name:"JoeLibrary__IdenticalAddresses",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[],name:"LBQuoter_InvalidLength",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountIn",type:"uint128"}],name:"findBestPathFromAmountIn",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountOut",type:"uint128"}],name:"findBestPathFromAmountOut",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV1",outputs:[{internalType:"address",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV2",outputs:[{internalType:"address",name:"factoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactoryV2",outputs:[{internalType:"address",name:"legacyFactoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouterV2",outputs:[{internalType:"address",name:"legacyRouterV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRouterV2",outputs:[{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"view",type:"function"}]};const WS={name:"trader_joe_v2_1",label:"Trader Joe v2.1",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABvCAYAAAA0YEQFAAABAGlDQ1BpY2MAABiVY2BgPMEABCwGDAy5eSVFQe5OChGRUQrsDxgYgRAMEpOLCxhwA6Cqb9cgai/r4lGHC3CmpBYnA+kPQKxSBLQcaKQIkC2SDmFrgNhJELYNiF1eUlACZAeA2EUhQc5AdgqQrZGOxE5CYicXFIHU9wDZNrk5pckIdzPwpOaFBgNpDiCWYShmCGJwZ3AC+R+iJH8RA4PFVwYG5gkIsaSZDAzbWxkYJG4hxFQWMDDwtzAwbDuPEEOESUFiUSJYiAWImdLSGBg+LWdg4I1kYBC+wMDAFQ0LCBxuUwC7zZ0hHwjTGXIYUoEingx5DMkMekCWEYMBgyGDGQCm1j8/yRb+6wAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAABPXpUWHRSYXcgcHJvZmlsZSB0eXBlIGljYwAAKJGdU9mtxCAM/KeKLcH4JOUkJEiv/waeuaJslP3YHYkgOWbGHkz4yzm8Klg0QEXMCSaY2qa7HsaGgmyMCJJkkRUB7GgnxjoRNCoZGfyIRlZcNVyZd8L9V8bwZf6irGKkvX8oI4wc3IXWfS808qiY1a5xTGf8LZ/yjAcztxSsE0SB+cMF2I3uylGHACYXeIwH/XTAL8BwCqShTNl9zSaztRNxepRV9BCRmTBbcQLzmPi9e+HAeI7BBVpWbESUSu+JFnhMxGWp+2ZJeoH7es8L3fPuHZTUWtk0lyfCOi9wGxcDjYYar9c//AFURzuIa5/UXVpFkcaYrbLdPPLJ/mDe2G/ezQqrd9UzLWOZV6QeVOlJ7Mrqj6kS49Fj5J/KQ05OGv4BiF6+ZwMoF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ICQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNy0wN1QwOToxOTowOCswMDowMHqfsLUAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjMtMDctMDdUMDk6MTk6MDgrMDA6MDAtipFqAAAAHnRFWHRpY2M6Y29weXJpZ2h0AEdvb2dsZSBJbmMuIDIwMTasCzM4AAAAFHRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQrqQcwcAAAAASUVORK5CYII=",protocol:"trader_joe_v2_1",slippage:!0,blockchains:["avalanche"],avalanche:{router:{address:"0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30",api:YS.ROUTER},factory:{address:"0x8e42f2F4101563bF679975178e880FD87d3eFd4e",api:YS.FACTORY},pair:{api:YS.PAIR},quoter:{address:"0x64b57F4249aA99a812212cee7DAEFEDC40B203cD",api:YS.QUOTER}}};var FS=t=>new gL(Object.assign(WS,{scope:t,findPath:t=>YS.findPath({...t,exchange:WS}),pathExists:t=>YS.pathExists({...t,exchange:WS}),getAmounts:t=>YS.getAmounts({...t,exchange:WS}),getPrep:t=>YS.getPrep({...t,exchange:WS}),getTransaction:t=>YS.getTransaction({...t,exchange:WS})}));const VS={name:"uniswap_v2",label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY5MiAxMjIuMzIgMjE4LjQ0NSAxMjIuMjEzIDIyMS4xOTUgMTIxLjc5MUMyMjYuNDY0IDEyMC45OCAyMzguOTA1IDEyMi4wODUgMjQ3LjQ3OSAxMjQuMTIzQzI2Ny40OTQgMTI4Ljg4MSAyODUuNzA3IDE0MS4wNjkgMzA1LjE0OCAxNjIuNzE0TDMxMC4zMTMgMTY4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Acb4c659F2488D",api:IL.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:IL.FACTORY},pair:{api:IL.PAIR}}};var HS=t=>new gL(Object.assign(VS,{scope:t,findPath:t=>IL.findPath({...t,exchange:VS}),pathExists:t=>IL.pathExists({...t,exchange:VS}),getAmounts:t=>IL.getAmounts({...t,exchange:VS}),getPrep:t=>IL.getPrep({...t,exchange:VS}),getTransaction:t=>IL.getTransaction({...t,exchange:VS})}));function GS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const qS="0x0000000000000000000000000000000000000001",ZS="0x0000000000000000000000000000000000000002",JS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},XS=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=JS({blockchain:t,exchange:e,path:n})).length>2)throw"Uniswap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;return n=r?await(async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:e,pool:t,inputAmount:r}):await(async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:e,pool:t,outputAmount:i}),{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let KS=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,$S=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var tj={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await XS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await XS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await XS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await XS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await XS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await XS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await XS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await XS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await XS({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return GS([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):GS([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:JS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await XS({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await $S({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await KS({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await $S({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await KS({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].permit.address]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].permit.address,Hf[e].maxInt]}}}{const o=await PN({blockchain:e,address:t[e].permit.address,method:"allowance",api:t[e].permit.api,params:[i,n,t[e].router.address]});if(o.amount.lt(r)||o.expiration-1800{let y,m=[],g=[],v="0";if(f){const t=Tp(f.signature).length;let e;65!==t&&64!==t||(e=function(t){return Dp(Lp([(t=Rp(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}(Rp(f.signature))),m.push("0a"),g.push(_m.encode(["((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)","bytes"],[f,e]))}r[0]===Hf[t].currency.address&&(m.push("0b"),g.push(_m.encode(["address","uint256"],[ZS,(i||o).toString()])),v=(i||o).toString()),1===n.length?y=oN(["address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1]]):2===n.length&&(y=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]])),h||u?(m.push("00"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(i||o).toString(),(a||s).toString(),y,r[0]!==Hf[t].currency.address&&!p]))):(m.push("01"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(a||s).toString(),(i||o).toString(),y,r[0]!==Hf[t].currency.address&&!p]))),r[r.length-1]===Hf[t].currency.address&&(m.push("0c"),g.push(_m.encode(["address","uint256"],[qS,(a||s).toString()])));return{blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api,method:"execute",params:{commands:`0x${m.join("")}`,inputs:g},value:v}},ROUTER:[{inputs:[{components:[{internalType:"address",name:"permit2",type:"address"},{internalType:"address",name:"weth9",type:"address"},{internalType:"address",name:"seaportV1_5",type:"address"},{internalType:"address",name:"seaportV1_4",type:"address"},{internalType:"address",name:"openseaConduit",type:"address"},{internalType:"address",name:"nftxZap",type:"address"},{internalType:"address",name:"x2y2",type:"address"},{internalType:"address",name:"foundation",type:"address"},{internalType:"address",name:"sudoswap",type:"address"},{internalType:"address",name:"elementMarket",type:"address"},{internalType:"address",name:"nft20Zap",type:"address"},{internalType:"address",name:"cryptopunks",type:"address"},{internalType:"address",name:"looksRareV2",type:"address"},{internalType:"address",name:"routerRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareToken",type:"address"},{internalType:"address",name:"v2Factory",type:"address"},{internalType:"address",name:"v3Factory",type:"address"},{internalType:"bytes32",name:"pairInitCodeHash",type:"bytes32"},{internalType:"bytes32",name:"poolInitCodeHash",type:"bytes32"}],internalType:"struct RouterParameters",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BalanceTooLow",type:"error"},{inputs:[],name:"BuyPunkFailed",type:"error"},{inputs:[],name:"ContractLocked",type:"error"},{inputs:[],name:"ETHNotAccepted",type:"error"},{inputs:[{internalType:"uint256",name:"commandIndex",type:"uint256"},{internalType:"bytes",name:"message",type:"bytes"}],name:"ExecutionFailed",type:"error"},{inputs:[],name:"FromAddressIsNotOwner",type:"error"},{inputs:[],name:"InsufficientETH",type:"error"},{inputs:[],name:"InsufficientToken",type:"error"},{inputs:[],name:"InvalidBips",type:"error"},{inputs:[{internalType:"uint256",name:"commandType",type:"uint256"}],name:"InvalidCommandType",type:"error"},{inputs:[],name:"InvalidOwnerERC1155",type:"error"},{inputs:[],name:"InvalidOwnerERC721",type:"error"},{inputs:[],name:"InvalidPath",type:"error"},{inputs:[],name:"InvalidReserves",type:"error"},{inputs:[],name:"InvalidSpender",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[],name:"SliceOutOfBounds",type:"error"},{inputs:[],name:"TransactionDeadlinePassed",type:"error"},{inputs:[],name:"UnableToClaim",type:"error"},{inputs:[],name:"UnsafeCast",type:"error"},{inputs:[],name:"V2InvalidPath",type:"error"},{inputs:[],name:"V2TooLittleReceived",type:"error"},{inputs:[],name:"V2TooMuchRequested",type:"error"},{inputs:[],name:"V3InvalidAmountOut",type:"error"},{inputs:[],name:"V3InvalidCaller",type:"error"},{inputs:[],name:"V3InvalidSwap",type:"error"},{inputs:[],name:"V3TooLittleReceived",type:"error"},{inputs:[],name:"V3TooMuchRequested",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardsSent",type:"event"},{inputs:[{internalType:"bytes",name:"looksRareClaim",type:"bytes"}],name:"collectRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"parameters",outputs:[{internalType:"address",name:"factory",type:"address"},{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"view",type:"function"}],PERMIT2:[{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"}],name:"AllowanceExpired",type:"error"},{inputs:[],name:"ExcessiveInvalidation",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"InsufficientAllowance",type:"error"},{inputs:[{internalType:"uint256",name:"maxAmount",type:"uint256"}],name:"InvalidAmount",type:"error"},{inputs:[],name:"InvalidContractSignature",type:"error"},{inputs:[],name:"InvalidNonce",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSignatureLength",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"signatureDeadline",type:"uint256"}],name:"SignatureExpired",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"spender",type:"address"}],name:"Lockdown",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint48",name:"newNonce",type:"uint48"},{indexed:!1,internalType:"uint48",name:"oldNonce",type:"uint48"}],name:"NonceInvalidation",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"},{indexed:!1,internalType:"uint48",name:"nonce",type:"uint48"}],name:"Permit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"word",type:"uint256"},{indexed:!1,internalType:"uint256",name:"mask",type:"uint256"}],name:"UnorderedNonceInvalidation",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint48",name:"newNonce",type:"uint48"}],name:"invalidateNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wordPos",type:"uint256"},{internalType:"uint256",name:"mask",type:"uint256"}],name:"invalidateUnorderedNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],internalType:"struct IAllowanceTransfer.TokenSpenderPair[]",name:"approvals",type:"tuple[]"}],name:"lockdown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"nonceBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails[]",name:"details",type:"tuple[]"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitBatch",name:"permitBatch",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],internalType:"struct IAllowanceTransfer.AllowanceTransferDetails[]",name:"transferDetails",type:"tuple[]"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]};const ej={name:"uniswap_v3",label:"Uniswap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIGRhdGEtdGVzdGlkPSJ1bmlzd2FwLWxvZ28iIGNsYXNzPSJyZ3c2ZXo0NHAgcmd3NmV6NGVqIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAuMzUyNiAxOS45MjQyQzIwLjI5MjggMjAuMTU0OSAyMC4xODg1IDIwLjM3MTUgMjAuMDQ1NSAyMC41NjE4QzE5Ljc3OTMgMjAuOTA4OCAxOS40MjcgMjEuMTc5NCAxOS4wMjM5IDIxLjM0NjZDMTguNjYxNCAyMS41MDM1IDE4LjI3NzQgMjEuNjA1IDE3Ljg4NDkgMjEuNjQ3NUMxNy44MDQyIDIxLjY1NzggMTcuNzIwNiAyMS42NjQxIDE3LjYzOTUgMjEuNjcwM0wxNy42MjYzIDIxLjY3MTNDMTcuMzc3NyAyMS42ODA4IDE3LjEzODcgMjEuNzcgMTYuOTQ0MiAyMS45MjU4QzE2Ljc0OTcgMjIuMDgxNyAxNi42MSAyMi4yOTYgMTYuNTQ1NSAyMi41MzczQzE2LjUxNiAyMi42NTc0IDE2LjQ5NCAyMi43NzkyIDE2LjQ3OTggMjIuOTAyMUMxNi40NTcyIDIzLjA4NzQgMTYuNDQ1NiAyMy4yNzcxIDE2LjQzMyAyMy40ODIzQzE2LjQyNCAyMy42Mjk1IDE2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E4NCAzNy4wMDQ5IDIxLjA5OTMgMzYuOTgzNCAyMS4wODAxIDM2Ljk2MTlaIiBmaWxsPSJjdXJyZW50Q29sb3IiPjwvcGF0aD48L3N2Zz4K",protocol:"uniswap_v3",slippage:!0,fees:[100,500,3e3,1e4],blockchains:["ethereum","bsc","polygon","optimism","arbitrum"],ethereum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},bsc:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},polygon:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},optimism:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},arbitrum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},base:{router:{address:"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC",api:tj.ROUTER},factory:{address:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}}};var nj=t=>new gL(Object.assign(ej,{scope:t,findPath:t=>tj.findPath({...t,exchange:ej}),pathExists:t=>tj.pathExists({...t,exchange:ej}),getAmounts:t=>tj.getAmounts({...t,exchange:ej}),getPrep:t=>tj.getPrep({...t,exchange:ej}),getTransaction:t=>tj.getTransaction({...t,exchange:ej})}));var rj={findPath:async({blockchain:t,tokenIn:e,tokenOut:n})=>{if(![e,n].includes(Hf[t].currency.address)||![e,n].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let r=[e,n];return{path:r,exchangePath:r}},pathExists:async({blockchain:t,path:e})=>!(!e||2!==e.length)&&(e.includes(Hf[t].currency.address)&&e.includes(Hf[t].wrapped.address)),getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address&&n[1]===Hf[e].wrapped.address?(d.method="deposit",d.value=r.toString(),d):n[0]===Hf[e].wrapped.address&&n[1]===Hf[e].currency.address?(d.method="withdraw",d.value=0,d.params={wad:r},d):void 0},WETH:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]};const ij={name:"wavax",label:"Wrapped Avax",logo:Hf.avalanche.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["avalanche"],avalanche:{router:{address:Hf.avalanche.wrapped.address,api:rj.WETH}}};var oj=t=>new gL(Object.assign(ij,{scope:t,findPath:t=>rj.findPath({...t,exchange:ij}),pathExists:t=>rj.pathExists({...t,exchange:ij}),getAmounts:t=>rj.getAmounts({...t,exchange:ij}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:ij})}));const aj={name:"wbnb",label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOTIgMTkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOTIgMTkyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPS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}};var sj=t=>new gL(Object.assign(aj,{scope:t,findPath:t=>rj.findPath({...t,exchange:aj}),pathExists:t=>rj.pathExists({...t,exchange:aj}),getAmounts:t=>rj.getAmounts({...t,exchange:aj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:aj})}));const uj={name:"weth",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["ethereum"],ethereum:{router:{address:Hf.ethereum.wrapped.address,api:rj.WETH}}};var cj=t=>new gL(Object.assign(uj,{scope:t,findPath:t=>rj.findPath({...t,exchange:uj}),pathExists:t=>rj.pathExists({...t,exchange:uj}),getAmounts:t=>rj.getAmounts({...t,exchange:uj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:uj})}));const lj={name:"weth_arbitrum",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjE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YXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["arbitrum"],arbitrum:{router:{address:Hf.arbitrum.wrapped.address,api:rj.WETH}}};var hj=t=>new gL(Object.assign(lj,{scope:t,findPath:t=>rj.findPath({...t,exchange:lj}),pathExists:t=>rj.pathExists({...t,exchange:lj}),getAmounts:t=>rj.getAmounts({...t,exchange:lj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:lj})}));const dj={name:"weth_optimism",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["optimism"],optimism:{router:{address:Hf.optimism.wrapped.address,api:rj.WETH}}};var fj=t=>new gL(Object.assign(dj,{scope:t,findPath:t=>rj.findPath({...t,exchange:dj}),pathExists:t=>rj.pathExists({...t,exchange:dj}),getAmounts:t=>rj.getAmounts({...t,exchange:dj}),getPrep:t=>{},getTransaction:t=>rj.getT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TQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["base"],base:{router:{address:Hf.base.wrapped.address,api:rj.WETH}}};var yj=t=>new gL(Object.assign(pj,{scope:t,findPath:t=>rj.findPath({...t,exchange:pj}),pathExists:t=>rj.pathExists({...t,exchange:pj}),getAmounts:t=>rj.getAmounts({...t,exchange:pj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:pj})}));const mj={name:"wftm",label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTkyIDE5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iY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C40LDAuMS0wLjYsMC4yTDY1LjYsOTUuM2MwLDAtMC4xLDAtMC4xLDBsMCwwbDAsMGwwLjEsMGwyNy42LDE0LjYKCQkJYzAuMiwwLjEsMC40LDAuMiwwLjYsMC4yVjgwLjV6IE05OC4yLDgwLjV2MjkuOGMwLjItMC4xLDAuNC0wLjEsMC42LTAuMmwyNy42LTE0LjZjMCwwLDAuMSwwLDAuMSwwbDAsMGwwLDBsLTAuMSwwTDk4LjgsODAuNwoJCQlDOTguNiw4MC42LDk4LjQsODAuNSw5OC4yLDgwLjV6IE0xMjYuNiw2NC40bC0yNC44LDEzbDI0LjgsMTNWNjQuNHogTTY1LjIsNjQuNHYyNi4xbDI0LjgtMTNMNjUuMiw2NC40eiBNOTguNyw0NS4xCgkJCWMtMS40LTAuOC00LTAuOC01LjUsMEw2NS42LDU5LjdjMCwwLTAuMSwwLTAuMSwwbDAsMGwwLDBsMC4xLDBsMjcuNiwxNC42YzEuNCwwLjgsNCwwLjgsNS41LDBsMjcuNi0xNC42YzAsMCwwLjEsMCwwLjEsMGwwLDBsMCwwCgkJCWwtMC4xLDBMOTguNyw0NS4xeiBNMTMwLjcsNDYuNWwxLjcsMS4xbDAuMywwLjJjMC41LDAuMywwLjksMC42LDEuMywwLjhjNC4yLDIuOCw1LjcsNS45LDUuNywxMi4zbDAsMC4yaC00LjNjMC0yLjgtMC4zLTQuNy0xLTYKCQkJYy0wLjUtMS4xLTEuMy0xLjktMi44LTIuOWwtMC4xLTAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["fantom"],fantom:{router:{address:Hf.fantom.wrapped.address,api:rj.WETH}}};var gj=t=>new gL(Object.assign(mj,{scope:t,findPath:t=>rj.findPath({...t,exchange:mj}),pathExists:t=>rj.pathExists({...t,exchange:mj}),getAmounts:t=>rj.getAmounts({...t,exchange:mj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:mj})}));const vj={name:"wmatic",label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NS40IDQ1LjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM4MjQ3RTU7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzEuOSwxNi42Yy0wLjctMC40LTEuNi0wLjQtMi4yLDBsLTUuMywzLjFsLTMuNSwybC01LjEsMy4xYy0wLjcsMC40LTEuNiwwLjQtMi4yLDBsLTQtMi40CgljLTAuNi0wLjQtMS4xLTEuMS0xLjEtMnYtNC42YzAtMC45LDAuNS0xLjYsMS4xLTJsNC0yLjNjMC43LTAuNCwxLjUtMC40LDIuMiwwbDQsMi40YzAuNywwLjQsMS4xLDEuMSwxLjEsMnYzLjFsMy41LTIuMXYtMy4yCgljMC0wLjktMC40LTEuNi0xLjEtMmwtNy41LTQuNGMtMC43LTAuNC0xLjUtMC40LTIuMiwwTDYsMTEuN2MtMC43LDAuNC0xLjEsMS4xLTEuMSwxLjh2OC43YzAsMC45LDAuNCwxLjYsMS4xLDJsNy42LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw1LjEtMi45bDMuNS0yLjFsNS4xLTIuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",protocol:"weth",slippage:!1,blockchains:["polygon"],polygon:{router:{address:Hf.polygon.wrapped.address,api:rj.WETH}}};var wj=t=>new gL(Object.assign(vj,{scope:t,findPath:t=>rj.findPath({...t,exchange:vj}),pathExists:t=>rj.pathExists({...t,exchange:vj}),getAmounts:t=>rj.getAmounts({...t,exchange:vj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:vj})}));const bj={name:"wxdai",label:"Wrapped XDAI",logo:Hf.gnosis.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["gnosis"],gnosis:{router:{address:Hf.gnosis.wrapped.address,api:rj.WETH}}};var Mj=t=>new gL(Object.assign(bj,{scope:t,findPath:t=>rj.findPath({...t,exchange:bj}),pathExists:t=>rj.pathExists({...t,exchange:bj}),getAmounts:t=>rj.getAmounts({...t,exchange:bj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:bj})}));const Aj=[AS(),nj(),CS(),HS(),IS(),FS(),OS(),PS(),xL(),cj(),fj(),yj(),hj(),sj(),wj(),gj(),oj(),Mj()];Aj.forEach((t=>{Aj[t.name]=t})),Aj.ethereum=[nj("ethereum"),HS("ethereum"),cj("ethereum")],Aj.ethereum.forEach((t=>{Aj.ethereum[t.name]=t})),Aj.bsc=[CS("bsc"),nj("bsc"),IS("bsc"),sj("bsc")],Aj.bsc.forEach((t=>{Aj.bsc[t.name]=t})),Aj.polygon=[nj("polygon"),OS("polygon"),wj("polygon")],Aj.polygon.forEach((t=>{Aj.polygon[t.name]=t})),Aj.solana=[AS("solana")],Aj.solana.forEach((t=>{Aj.solana[t.name]=t})),Aj.optimism=[nj("optimism"),fj("optimism")],Aj.optimism.forEach((t=>{Aj.optimism[t.name]=t})),Aj.base=[nj("base"),yj("base")],Aj.base.forEach((t=>{Aj.base[t.name]=t})),Aj.arbitrum=[nj("arbitrum"),hj("arbitrum")],Aj.arbitrum.forEach((t=>{Aj.arbitrum[t.name]=t})),Aj.fantom=[PS("fantom"),gj("fantom")],Aj.fantom.forEach((t=>{Aj.fantom[t.name]=t})),Aj.avalanche=[FS("avalanche"),oj("avalanche")],Aj.avalanche.forEach((t=>{Aj.avalanche[t.name]=t})),Aj.gnosis=[xL("gnosis"),Mj("gnosis")],Aj.gnosis.forEach((t=>{Aj.gnosis[t.name]=t}));Aj.route=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>Promise.all(Aj[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})))).then((t=>t.filter(Boolean).sort(((t,e)=>(r||o?BigInt(t.amountOut)BigInt(e.amountIn))?1:(r||o?BigInt(t.amountOut)>BigInt(e.amountOut):BigInt(t.amountIn)Ij||(Ij="object"==typeof r?r:window,Ij);const xj=()=>(void 0===Ej()._Web3ClientConfiguration&&(Ej()._Web3ClientConfiguration={}),Ej()._Web3ClientConfiguration);function kj(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class Tj extends ZA{constructor(t,e,n,r){super(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[]}detectNetwork(){return Promise.resolve(Hf.findByName(this._network).id)}requestChunk(t,e){try{const n=t.map((t=>t.request));return $M(e,JSON.stringify(n)).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(kj([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else kj([r,"optionalAccess",t=>t.result])?t.resolve(r.result):t.reject()}))})).catch((e=>{if(e&&"SERVER_ERROR"==e.code){const e=this._endpoints.indexOf(this._endpoint)+1;this._failover(),this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this.requestChunk(t,this._endpoint)}else t.forEach((t=>{t.reject(e)}))}))}catch(e){t.forEach((t=>{t.reject()}))}}send(t,e){const n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t,this._endpoint))))}),xj().batchInterval||10)),i}}const Lj=()=>(null==Ej()._Web3ClientProviders&&(Ej()._Web3ClientProviders={}),Ej()._Web3ClientProviders),Sj=(t,e)=>{void 0===Lj()[t]&&(Lj()[t]=[]);const n=Lj()[t].indexOf(e);n>-1&&Lj()[t].splice(n,1),Lj()[t].unshift(e)},jj=async(t,e,n=!0)=>{let r;Lj()[t]=e.map(((r,i)=>new Tj(r,t,e,(()=>{1===Lj()[t].length?jj(t,e,n):Lj()[t].splice(i,1)}))));let i=Ej();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=Lj()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=Lj()[t][o]}Sj(t,r)};var Cj=async t=>{let e=Lj();if(e&&e[t])return e[t][0];let n=Ej();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await jj(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},Dj=async t=>{let e=Lj();if(e&&e[t])return e[t];let n=Ej();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await jj(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};class Oj extends ql{constructor(t,e,n,r){super(t),this._provider=new ql(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[],this._rpcRequest=this._rpcRequestReplacement.bind(this)}requestChunk(t){const e=t.map((t=>t.request)),n=e=>{if(e&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((t=>e.toString().match(t)))){const e=this._endpoints.indexOf(this._endpoint)+1;this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this._provider=new ql(this._endpoint),this.requestChunk(t)}else t.forEach((t=>{t.reject(e)}))};try{return this._provider._rpcBatchRequest(e).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else r?t.resolve(r):t.reject()}))})).catch(n)}catch(t){return n(t)}}_rpcRequestReplacement(t,e){const n={methodName:t,args:e};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t))))}),xj().batchInterval||10)),i}}const zj=()=>(null==Ej()._Web3ClientProviders&&(Ej()._Web3ClientProviders={}),Ej()._Web3ClientProviders),Pj=(t,e)=>{void 0===zj()[t]&&(zj()[t]=[]);const n=zj()[t].indexOf(e);n>-1&&zj()[t].splice(n,1),zj()[t].unshift(e)},_j=async(t,e,n=!0)=>{let r;zj()[t]=e.map(((r,i)=>new Oj(r,t,e,(()=>{1===zj()[t].length?_j(t,e,n):zj()[t].splice(i,1)}))));let i=Ej();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=zj()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"getIdentity",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=zj()[t][o]}Pj(t,r)};var Bj=async t=>{let e=zj();if(e&&e[t])return e[t][0];let n=Ej();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await _j(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},Rj=async t=>{let e=zj();if(e&&e[t])return e[t];let n=Ej();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await _j(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};let Uj=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];Uj.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],Uj.solana=["solana"];let Qj=()=>(null==Ej()._Web3ClientCacheStore&&(Ej()._Web3ClientCacheStore={}),Ej()._Web3ClientCacheStore),Yj=()=>(null==Ej()._Web3ClientPromiseStore&&(Ej()._Web3ClientPromiseStore={}),Ej()._Web3ClientPromiseStore),Wj=function({key:t}){Yj()[t]=void 0},Fj=function({call:t,key:e,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:t}){return Yj()[t]}({key:e=JSON.stringify(e)});if(a)return a.then(r).catch(i);(function({key:t,promise:e}){return Yj()[t]=e,e})({key:e,promise:new Promise(((a,s)=>0===n?t().then((t=>{r(t),a(t)})).catch((t=>{i(t),s(t)})):(o=function({key:t,expires:e}){let n=Qj()[t];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.expiresAt])>Date.now())return n.value}({key:e,expires:n}),o?(r(o),a(o),o):void t().then((t=>{t&&function({key:t,value:e,expires:n}){Qj()[t]={expiresAt:Date.now()+n,value:e}}({key:e,value:t,expires:n}),r(t),a(t)})).catch((t=>{i(t),s(t)})))))}).then((()=>{Wj({key:e})})).catch((()=>{Wj({key:e})}))}))};const Vj=async t=>{if(Uj.evm.includes(t))return await Cj(t);if(Uj.solana.includes(t))return await Bj(t);throw"Unknown blockchain: "+t};const Hj=({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=new PM(t,e,i),s=(({contract:t,method:e,params:n})=>t.interface.fragments.find((t=>t.name==e)).inputs.map(((t,e)=>Array.isArray(n)?n[e]:n[t.name])))({contract:a,method:n,params:r}),u=a.interface.fragments.find((t=>t.name===n));return void 0===a[n]&&(n=`${n}(${u.inputs.map((t=>t.type)).join(",")})`),u&&"nonpayable"===u.stateMutability?a.callStatic[n](...s,{blockTag:o}):a[n](...s,{blockTag:o})},Gj=({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a})=>n?Hj({address:e,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:t,provider:e})=>e.getBalance(t))({address:e,provider:a}):"transactionCount"===r?(({address:t,provider:e})=>e.getTransactionCount(t))({address:e,provider:a}):void 0;const qj=async({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a,providers:s})=>{try{if(null==r||"getAccountInfo"===r)return null==n&&(n=of),await(async({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=await i.getAccountInfo(new Xs(t));if(a&&a.data)return e.decode(a.data)})({address:e,api:n,method:r,params:i,provider:a,block:o});if("getProgramAccounts"===r)return await a.getProgramAccounts(new Xs(e),i).then((t=>n?t.map((t=>(t.data=n.decode(t.account.data),t))):t));if("getTokenAccountBalance"===r)return await a.getTokenAccountBalance(new Xs(e));if("latestBlockNumber"===r)return await a.getSlot(i||void 0);if("balance"===r)return await(({address:t,provider:e})=>e.getBalance(new Xs(t)))({address:e,provider:a})}catch(u){if(s&&u&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((t=>u.toString().match(t)))){let u=s[s.indexOf(a)+1]||s[0];return qj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:u,providers:s})}throw u}};const Zj=async function(t,e){const{blockchain:n,address:r,method:i}=(t=>{if("object"==typeof t)return t;let e=t.match(/(?\w+):\/\/(?[\w\d]+)(\/(?[\w\d]+)*)?/);return null==e.groups.part2?e.groups.part1.match(/\d/)?{blockchain:e.groups.blockchain,address:e.groups.part1}:{blockchain:e.groups.blockchain,method:e.groups.part1}:{blockchain:e.groups.blockchain,address:e.groups.part1,method:e.groups.part2}})(t),{api:o,params:a,cache:s,block:u,timeout:c,strategy:l,cacheKey:h}=("object"==typeof t?t:e)||{};return await Fj({expires:s||0,key:h||[n,r,i,a,u],call:async()=>{if(Uj.evm.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{if(s=s||xj().strategy||"failover",a=a||xj().timeout||void 0,"fastest"===s){const s=await Dj(t);let u=[];const c=s.map((a=>new Promise((s=>{u.push(Gj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(s))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return u=Promise.all(u.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,u])}{const s=await Cj(t),u=Gj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([u,a])):u}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});if(Uj.solana.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{s=s||xj().strategy||"failover",a=a||xj().timeout||void 0;const u=await Rj(t);if("fastest"===s){let s=[];const c=u.map((a=>new Promise((u=>{s.push(qj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(u))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return s=Promise.all(s.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,s])}{const s=await Bj(t),c=qj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s,providers:u});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([c,a])):c}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});throw"Unknown blockchain: "+n}})},Jj=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=e.fromToken.address===Hf.solana.currency.address?new rf(e.fromAmount):new rf("0"),r=await Vj("solana"),i=new rf(await r.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),o=e.fromAddress,a=n.add(i);return[Wu.createAccount({fromPubkey:new Xs(o),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:a}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:o})]},Xj=async({wSolEscrowAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=await Vj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),i=await lC();return[Wu.createAccount({fromPubkey:new Xs(e.fromAddress),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:i.toString()})]},Kj=({paymentRoute:t})=>{let e=[...t.exchangeRoutes[0].path];return e.indexOf(Hf.solana.currency.address)>-1&&e.splice(e.indexOf(Hf.solana.currency.address),1),e.indexOf(t.fromToken.address)>-1&&e.splice(e.indexOf(t.fromToken.address),1),e.indexOf(t.toToken.address)>-1&&e.splice(e.indexOf(t.toToken.address),1),2===e.length&&e[0]===Hf.solana.wrapped.address?e[1]:e[0]},$j=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:Kj({paymentRoute:t}),owner:t.fromAddress}),tC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||pC(t.exchangeRoutes[0].path).length<=2)return;return await(async({paymentRoute:t})=>await Zj({blockchain:"solana",address:await $j({paymentRoute:t}),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t})?void 0:Ak.solana.createAssociatedTokenAccountInstruction({token:Kj({paymentRoute:t}),owner:t.fromAddress,payer:t.fromAddress})},eC=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(t)return Ak.solana.closeAccountInstruction({account:t.publicKey.toString(),owner:e.fromAddress})},nC=async({from:t})=>{let e=[nf.from("payments"),new Xs(t).toBuffer()],[n]=await Xs.findProgramAddress(e,new Xs(Nj.solana.address));return n},rC=async({from:t})=>{let e=(await nC({from:t})).toString();return await Zj({blockchain:"solana",address:e,api:pf([vf("anchorDiscriminator"),vf("nonce")]),cache:1e3})},iC=async({from:t})=>{if(await rC({from:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Nj.solana.api.createPaymentsAccount.layout.span);return Nj.solana.api.createPaymentsAccount.layout.encode({anchorDiscriminator:Nj.solana.api.createPaymentsAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Nj.solana.address),data:n})},oC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.fromToken.address,owner:t.fromAddress}),aC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.toAddress}),sC=async({paymentRoute:t})=>{if(t.toToken.address===Hf.solana.currency.address){const e=await Zj({blockchain:"solana",method:"balance",address:t.toAddress}),n=await Vj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.toAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.toAddress),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.toAddress}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.toAddress,payer:t.fromAddress})}},uC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.fee.receiver}),cC=async({paymentRoute:t})=>{if(t.fee){if(t.toToken.address===Hf.solana.currency.address){const e=await Zj({blockchain:"solana",method:"balance",address:t.fee.receiver}),n=await Vj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.feeAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.fee.receiver),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.fee.receiver}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.fee.receiver,payer:t.fromAddress})}}},lC=async()=>{let t=[nf.from("escrow_sol")],[e,n]=await Xs.findProgramAddress(t,new Xs(Nj.solana.address));return e},hC=async({paymentRoute:t})=>{let e=[nf.from("escrow"),new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address).toBuffer()],[n,r]=await Xs.findProgramAddress(e,new Xs(Nj.solana.address));return n},dC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address===Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Zj({blockchain:"solana",address:(await hC({paymentRoute:t})).toString(),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address),isSigner:!1,isWritable:!0},{pubkey:await hC({paymentRoute:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Nj.solana.api.createEscrowTokenAccount.layout.span);return Nj.solana.api.createEscrowTokenAccount.layout.encode({anchorDiscriminator:Nj.solana.api.createEscrowTokenAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Nj.solana.address),data:n})},fC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address!=Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Zj({blockchain:"solana",address:(await lC()).toString(),api:pf([vf("amount"),hf("owner")]),cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC(),isSigner:!1,isWritable:!0}],n=nf.alloc(Nj.solana.api.createEscrowSolAccount.layout.span);return Nj.solana.api.createEscrowSolAccount.layout.encode({anchorDiscriminator:Nj.solana.api.createEscrowSolAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Nj.solana.address),data:n})},pC=t=>t.filter((t=>t!==Hf.solana.currency.address)),yC=async({paymentRoute:t,wSolSenderAccountKeypair:e,wSolEscrowAccountKeypair:n,nonce:r,deadline:i})=>{switch((({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return"routeSol";if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address&&0===t.exchangeRoutes.length)return"routeToken";if(t.exchangeRoutes.length>0&&2===pC(t.exchangeRoutes[0].path).length)return t.toToken.address===Hf.solana.currency.address?"routeOrcaSwapSolOut":"routeOrcaSwap";if(t.exchangeRoutes.length>0&&pC(t.exchangeRoutes[0].path).length>2)return t.toToken.address===Hf.solana.currency.address?"routeOrcaTwoHopSwapSolOut":"routeOrcaTwoHopSwap";throw"Payment method does not exist!"})({paymentRoute:t})){case"routeSol":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=new Xs(t.toAddress),i=t.fee?new Xs(t.fee.receiver):r,o=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0}],a=nf.alloc(Nj.solana.api.routeSol.layout.span);return Nj.solana.api.routeSol.layout.encode({anchorDiscriminator:Nj.solana.api.routeSol.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},a),new gu({keys:o,programId:new Xs(Nj.solana.address),data:a})})({paymentRoute:t,nonce:r,deadline:i});case"routeToken":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=await oC({paymentRoute:t}),i=await aC({paymentRoute:t}),o=t.fee?await uC({paymentRoute:t}):i,a=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(r),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0}],s=nf.alloc(Nj.solana.api.routeToken.layout.span);return Nj.solana.api.routeToken.layout.encode({anchorDiscriminator:Nj.solana.api.routeToken.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},s),new gu({keys:a,programId:new Xs(Nj.solana.address),data:s})})({paymentRoute:t,nonce:r,deadline:i});case"routeOrcaSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=n?n.publicKey:await oC({paymentRoute:t}),o=await aC({paymentRoute:t}),a=t.fee?await uC({paymentRoute:t}):o,s=await hC({paymentRoute:t}),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),c=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(u.data),l=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},u.keys[2],u.keys[4],u.keys[6],u.keys[7],u.keys[8],u.keys[9],u.keys[10],{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0},{pubkey:new Xs(a),isSigner:!1,isWritable:!0}],h=nf.alloc(Nj.solana.api.routeOrcaSwap.layout.span);return Nj.solana.api.routeOrcaSwap.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaSwap.anchorDiscriminator,nonce:e,amountIn:c.amount,sqrtPriceLimit:c.sqrtPriceLimit,amountSpecifiedIsInput:c.amountSpecifiedIsInput,aToB:c.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},h),new gu({keys:l,programId:new Xs(Nj.solana.address),data:h})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=await oC({paymentRoute:t}),o=n.publicKey,a=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(a.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},a.keys[2],a.keys[4],a.keys[6],a.keys[7],a.keys[8],a.keys[9],a.keys[10],{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:await lC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Nj.solana.api.routeOrcaSwapSolOut.layout.span);return Nj.solana.api.routeOrcaSwapSolOut.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,sqrtPriceLimit:s.sqrtPriceLimit,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToB:s.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Nj.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i});case"routeOrcaTwoHopSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=new Xs(await aC({paymentRoute:t})),o=t.fee?new Xs(await uC({paymentRoute:t})):i,a=await hC({paymentRoute:t}),s=new Xs(await $j({paymentRoute:t})),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),c=n?n.publicKey:new Xs(await oC({paymentRoute:t})),l=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(u.data),h=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},u.keys[2],u.keys[3],{pubkey:c,isSigner:!1,isWritable:!0},u.keys[5],u.keys[7],{pubkey:s,isSigner:!1,isWritable:!0},u.keys[9],u.keys[11],u.keys[12],u.keys[13],u.keys[14],u.keys[15],u.keys[16],u.keys[17],u.keys[18],u.keys[19],{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0}],d=nf.alloc(Nj.solana.api.routeOrcaTwoHopSwap.layout.span);return Nj.solana.api.routeOrcaTwoHopSwap.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaTwoHopSwap.anchorDiscriminator,nonce:e,amountIn:l.amount,amountSpecifiedIsInput:l.amountSpecifiedIsInput,aToBOne:l.aToBOne,aToBTwo:l.aToBTwo,sqrtPriceLimitOne:l.sqrtPriceLimitOne,sqrtPriceLimitTwo:l.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},d),new gu({keys:h,programId:new Xs(Nj.solana.address),data:d})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaTwoHopSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=new Xs(await $j({paymentRoute:t})),o=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),a=new Xs(await oC({paymentRoute:t})),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(o.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},o.keys[2],o.keys[3],o.keys[5],o.keys[7],{pubkey:i,isSigner:!1,isWritable:!0},o.keys[9],o.keys[11],o.keys[12],o.keys[13],o.keys[14],o.keys[15],o.keys[16],o.keys[17],o.keys[18],o.keys[19],{pubkey:n.publicKey,isSigner:!1,isWritable:!0},{pubkey:await lC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Nj.solana.api.routeOrcaTwoHopSwapSolOut.layout.span);return Nj.solana.api.routeOrcaTwoHopSwapSolOut.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaTwoHopSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToBOne:s.aToBOne,aToBTwo:s.aToBTwo,sqrtPriceLimitOne:s.sqrtPriceLimitOne,sqrtPriceLimitTwo:s.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Nj.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i})}},mC=async({paymentRoute:t})=>{const e=await rC({from:t.fromAddress}),n=Math.ceil((new Date).getTime()/1e3)+1800,r=(t=>t?t.nonce:new rf("0"))(e),i=await(async({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t}),o=await(async({paymentRoute:t})=>{if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t});let a=(await Promise.all([iC({from:t.fromAddress}),Jj({paymentRoute:t,wSolSenderAccountKeypair:i}),tC({paymentRoute:t}),sC({paymentRoute:t}),cC({paymentRoute:t}),fC({paymentRoute:t}),Xj({paymentRoute:t,wSolEscrowAccountKeypair:o}),dC({paymentRoute:t}),yC({paymentRoute:t,wSolSenderAccountKeypair:i,wSolEscrowAccountKeypair:o,nonce:r,deadline:n}),eC({paymentRoute:t,wSolSenderAccountKeypair:i})])).filter(Boolean).flat();const s={blockchain:t.blockchain,instructions:a,signers:[i,o].filter(Boolean),alts:[Nj.solana.alt]};return s.deadline=n,s.nonce=r.toString(),s},gC=[{inputs:[{internalType:"address",name:"_PERMIT2",type:"address"},{internalType:"address",name:"_FORWARDER",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ExchangeCallFailed",type:"error"},{inputs:[],name:"ExchangeCallMissing",type:"error"},{inputs:[],name:"ExchangeNotApproved",type:"error"},{inputs:[],name:"ForwardingPaymentFailed",type:"error"},{inputs:[],name:"InsufficientBalanceInAfterPayment",type:"error"},{inputs:[],name:"InsufficientBalanceOutAfterPayment",type:"error"},{inputs:[],name:"NativeFeePaymentFailed",type:"error"},{inputs:[],name:"NativePaymentFailed",type:"error"},{inputs:[],name:"PaymentDeadlineReached",type:"error"},{inputs:[],name:"PaymentToZeroAddressNotAllowed",type:"error"},{inputs:[],name:"WrongAmountPaidIn",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Disabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Enabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"InternalTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"FORWARDER",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"exchange",type:"address"},{internalType:"bool",name:"enabled",type:"bool"}],name:"enable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"exchanges",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IPermit2.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IPermit2.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var vC={ethereum:{address:"0x6466F27B169C908Ba8174d80aEfa7173CbC3D0c7",api:gC},bsc:{address:"0x7ea09401db4692a8AEF4111b75bD32AE758f552A",api:gC},polygon:{address:"0x50CFAB577623B1359602E11514a9482B061A941e",api:gC},fantom:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:gC},avalanche:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:gC},gnosis:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:gC},arbitrum:{address:"0xA1cfbeeF344A52e18f748fd6a126f9426A40fbc7",api:gC},optimism:{address:"0x8698E529E9867eEbcC68b4792daC627cd8870736",api:gC},base:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11",api:gC}},wC={...vC,...Nj},bC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{},MC="object"==typeof bC&&bC&&bC.Object===Object&&bC,AC="object"==typeof self&&self&&self.Object===Object&&self,NC=(MC||AC||Function("return this")()).Symbol;NC&&NC.toStringTag,NC&&NC.toStringTag;const IC=t=>{switch(t){case"solana":return 125e-6;case"gnosis":return.009;case"polygon":return.01;case"fantom":return.05;case"avalanche":return.1;case"bsc":return.2;case"base":return.25;case"arbitrum":return.3;case"optimism":return.4;case"ethereum":return 10;default:return 100}},EC={arbitrum:{[Hf.arbitrum.wrapped.address]:"0x7E655088214d0657251A51aDccE9109CFd23B5B5"},avalanche:{[Hf.avalanche.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},base:{[Hf.base.wrapped.address]:"0xD1711710843B125a6a01FfDF9b95fDc3064BeF7A"},bsc:{[Hf.bsc.wrapped.address]:"0xeEb80d14abfB058AA78DE38813fe705c3e3b243E"},ethereum:{[Hf.ethereum.wrapped.address]:"0x298f4980525594b3b982779cf74ba76819708D43"},fantom:{[Hf.fantom.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},gnosis:{[Hf.gnosis.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},optimism:{[Hf.optimism.wrapped.address]:"0x69594057e2C0224deb1180c7a5Df9ec9d5B611B5"},polygon:{[Hf.polygon.wrapped.address]:"0xaE59C9d3E055BdFAa583E169aA5Ebe395689476a"},solana:{}},xC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?t.toAddress:t.toToken.address:vC[t.blockchain].address,kC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:Ak[t.blockchain].DEFAULT:vC[t.blockchain].api,TC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:"transfer":"pay",LC=async({paymentRoute:t})=>{if(t.directTransfer&&!t.fee)return t.toToken.address==Hf[t.blockchain].currency.address?void 0:[t.toAddress,t.toAmount];{const e=Math.ceil(new Date/1e3)+3600,n=t.exchangeRoutes[0],r=(({exchangeRoute:t,blockchain:e})=>void 0===t?0:"uniswap_v3"===t.exchange.name||t.exchange[e].router.address===Hf[e].wrapped.address?2:1)({exchangeRoute:n,blockchain:t.blockchain}),i=n?await n.getTransaction({account:vC[t.blockchain].address,inputTokenPushed:2===r}):void 0,o=i?(({exchangeTransaction:t})=>{const e=new PM(t.to,t.api),n=t.method,r=t.params;let i,o,a;return o=e.interface.fragments.find((t=>!(t.name!=n||t.inputs&&r&&"object"==typeof r&&t.inputs.length!=Object.keys(r).length))),1===o.inputs.length&&"tuple"===o.inputs[0].type?(i=n,a=[r[o.inputs[0].name]]):(i=`${n}(${o.inputs.map((t=>t.type)).join(",")})`,a=o.inputs.map((t=>{if("tuple"===t.type){let e={};return t.components.forEach(((n,i)=>{e[n.name]=r[t.name][i]})),i=n,e}return r[t.name]}))),e.interface.encodeFunctionData(i,a)})({exchangeTransaction:i}):Hf[t.blockchain].zero;let a=Hf[t.blockchain].zero;return n&&(a="bsc"===t.blockchain&&"pancakeswap_v3"===n.exchange.name&&t.toToken.address===Hf[t.blockchain].currency.address?n.exchange[t.blockchain].smartRouter.address:EC[i.blockchain][n.exchange[t.blockchain].router.address]||n.exchange[t.blockchain].router.address),{payment:{amountIn:t.fromAmount,paymentAmount:t.toAmount,feeAmount:t.feeAmount||0,tokenInAddress:t.fromToken.address,exchangeAddress:a,tokenOutAddress:t.toToken.address,paymentReceiverAddress:t.toAddress,feeReceiverAddress:t.fee?t.fee.receiver:Hf[t.blockchain].zero,exchangeType:r,receiverType:0,exchangeCallData:o,receiverCallData:Hf[t.blockchain].zero,deadline:e}}}},SC=({paymentRoute:t})=>t.fromToken.address==Hf[t.blockchain].currency.address?t.directTransfer?t.toAmount.toString():t.fromAmount.toString():Fp.from("0").toString();let jC=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];jC.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],jC.solana=["solana"];const CC=({paymentRoute:t,fee:e})=>{if(jC.evm.includes(t.blockchain))return(async({paymentRoute:t})=>({blockchain:t.blockchain,to:xC({paymentRoute:t}),api:kC({paymentRoute:t}),method:TC({paymentRoute:t}),params:await LC({paymentRoute:t}),value:SC({paymentRoute:t})}))({paymentRoute:t,fee:e});if(jC.solana.includes(t.blockchain))return mC({paymentRoute:t,fee:e});throw"Blockchain not supported!"};function DC(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class OC{constructor({blockchain:t,fromAddress:e,fromToken:n,fromAmount:r,fromDecimals:i,fromBalance:o,toToken:a,toAmount:s,toDecimals:u,toAddress:c,fee:l,feeAmount:h,exchangeRoutes:d,approvalRequired:f,approvalTransaction:p,directTransfer:y}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=DC([r||s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=i,this.fromBalance=o,this.toToken=a,this.toAmount=DC([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=u,this.toAddress=c,this.fee=l,this.feeAmount=h,this.exchangeRoutes=d||[],this.approvalRequired=f,this.approvalTransaction=p,this.directTransfer=y,this.getTransaction=async()=>await CC({paymentRoute:this})}}function zC({assets:t,blacklist:e,accept:n,from:r}){return Promise.resolve(_C({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new Ak(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new Ak({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new OC({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new Ak({blockchain:r,address:e.toToken}),u=await s.decimals();return new OC({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>YC({routes:t}))).then(BC).then(RC).then(UC).then((t=>HC({routes:t}))).then(QC).then(qC).then(GC).then((t=>t.map((t=>new OC(t)))))}function PC({accept:t,from:e,whitelist:n,blacklist:r,drip:i}){if(t.some((t=>t&&t.fee&&"string"==typeof t.fee.amount&&t.fee.amount.match(/\.\d\d+\%/))))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(o,a)=>{let s=[],u=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{u.push(t),s.push({blockchain:t,address:e})}));else t.forEach((t=>{u.push(t.blockchain),s.push({blockchain:t.blockchain,address:t.token||t.toToken})}));[...new Set(u)].forEach((t=>{s.find((e=>e.blockchain===t&&e.address===Hf[t].currency.address))||s.push({blockchain:t,address:Hf[t].currency.address})})),s.sort(((t,e)=>IC(t.blockchain)[t.blockchain,t.address.toLowerCase()].join(""))),f=()=>Math.ceil(new Date),p=f();setTimeout((()=>{l.forEach((t=>y(PC,!1)))}),3e3);const y=(t,e=!0)=>{try{const n={blockchain:t.blockchain,address:t.fromToken.address},r=[n.blockchain,n.address.toLowerCase()].join(""),o=f()-p>3e3;if(h.indexOf(r)>-1)return;if(d.indexOf(r)===c){if(h.push(r),i(t),c+=1,!e)return;l.forEach((e=>y(t,!1)))}else c>=d.length||o?(-1===d.indexOf(r)||c>=d.length||o)&&(h.push(r),i(t)):l.find((t=>t.blockchain===n.blockchain&&t.address.toLowerCase()===n.address.toLowerCase()))||(l.push(n),l.sort(((t,e)=>((t,e,n)=>{if(!t||0===t.length)return 0;let r=t.indexOf([e.blockchain,e.address.toLowerCase()].join("")),i=t.indexOf([n.blockchain,n.address.toLowerCase()].join(""));return-1!==r&&-1===i?-1:-1!==i&&-1===r?1:r{zC({assets:[n],blacklist:r,accept:t,from:e}).then((t=>{DC([t,"optionalAccess",t=>t.length])&&y(t[0])}))}:void 0});let g=await zC({assets:m,blacklist:r,accept:t,from:e})||[];g.assets=m,o(g)}))}let _C=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),BC=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?Aj.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?Aj.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),RC=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),UC=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?Fp.from(t.fromBalance).gte(Fp.from(t.toAmount)):t.fromAmount&&t.toAmount?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountIn)):void 0)),QC=t=>Promise.all(t.map((t=>"solana"===t.blockchain?Promise.resolve(Hf.solana.maxInt):t.fromToken.allowance(t.fromAddress,wC[t.blockchain].address).catch((()=>{}))))).then((e=>(t.map(((n,r)=>{void 0===e[r]||n.directTransfer||n.fromToken.address.toLowerCase()==Hf[n.blockchain].currency.address.toLowerCase()||"solana"===n.blockchain?t[r].approvalRequired=!1:(t[r].approvalRequired=Fp.from(n.fromAmount).gte(Fp.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:Ak[n.blockchain].DEFAULT,method:"approve",params:[wC[n.blockchain].address,Hf[n.blockchain].maxInt]}))})),t))),YC=({routes:t})=>t.map((t=>(jC.evm.includes(t.blockchain)?t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==t.fee:"solana"===t.blockchain&&(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()),t))),WC=({paymentRoute:t,exchangeRoute:e})=>{let n,r,i;return e?(e&&e.exchange.wrapper,n=e.amountIn.toString(),r=FC({amount:e.amountOutMin.toString(),paymentRoute:t})):(n=t.fromAmount,r=FC({amount:t.fromAmount,paymentRoute:t})),t.fee&&(i=VC({paymentRoute:t})),{fromAmount:n,toAmount:r,feeAmount:i}},FC=({amount:t,paymentRoute:e})=>{if(e.fee){let n=VC({paymentRoute:e});return Fp.from(t).sub(n).toString()}return t},VC=({paymentRoute:t})=>{if("string"==typeof t.fee.amount&&t.fee.amount.match("%"))return Fp.from(t.toAmount).mul(10*parseFloat(t.fee.amount)).div(1e3).toString();if("string"==typeof t.fee.amount)return t.fee.amount;if("number"==typeof t.fee.amount)return cN(t.fee.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},HC=({routes:t})=>t.map((t=>{if(jC.evm.includes(t.blockchain))if(t.directTransfer&&!t.fee)t.fromAmount=t.toAmount;else{let{fromAmount:e,toAmount:n,feeAmount:r}=WC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}else if(jC.solana.includes(t.blockchain)){let{fromAmount:e,toAmount:n,feeAmount:r}=WC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}return t})),GC=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!Fp.from(t.fromAmount).lt(Fp.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r{let e=-1;return t.sort(((t,n)=>IC(t.fromToken.blockchain)0){for(o+=a,e=1;en)throw Error(Rk+t)}function $k(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=Yk(10,7-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==Yk(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==Yk(10,e-3)-1,a}function tT(t,e,n){for(var r,i,o=[0],a=0,s=t.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Jk.absoluteValue=Jk.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),nT(t)},Jk.ceil=function(){return nT(new this.constructor(this),this.e+1,2)},Jk.clampedTo=Jk.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Rk+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},Jk.comparedTo=Jk.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;es[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},Jk.cosine=Jk.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;(r=e.d.length)<32?i=(1/vT(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=gT(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(2==jk||3==jk?n.neg():n,t,e,!0)):new r(1):new r(NaN)},Jk.cubeRoot=Jk.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(Bk=!1,(o=l.s*Yk(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=Xk(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Yk(n,1/3),t=Qk((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=eT(c.plus(l).times(s),c.plus(u),a+2,1),Xk(s.d).slice(0,a)===(n=Xk(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(nT(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(nT(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return Bk=!0,nT(r,t,h.rounding,e)},Jk.decimalPlaces=Jk.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-Qk(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},Jk.dividedBy=Jk.div=function(t){return eT(this,new this.constructor(t))},Jk.dividedToIntegerBy=Jk.divToInt=function(t){var e=this.constructor;return nT(eT(this,new e(t),0,1,1),e.precision,e.rounding)},Jk.equals=Jk.eq=function(t){return 0===this.cmp(t)},Jk.floor=function(){return nT(new this.constructor(this),this.e+1,3)},Jk.greaterThan=Jk.gt=function(t){return this.cmp(t)>0},Jk.greaterThanOrEqualTo=Jk.gte=function(t){var e=this.cmp(t);return 1==e||0===e},Jk.hyperbolicCosine=Jk.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/vT(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=gT(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return nT(o,a.precision=n,a.rounding=r,!0)},Jk.hyperbolicSine=Jk.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=gT(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=gT(o,2,i=i.times(1/vT(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,nT(i,e,n,!0)},Jk.hyperbolicTangent=Jk.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,eT(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},Jk.inverseCosine=Jk.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?aT(n,i,o):new n(0):new n(NaN):e.isZero()?aT(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=aT(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},Jk.inverseHyperbolicCosine=Jk.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Bk=!1,n=n.times(n).minus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},Jk.inverseHyperbolicSine=Jk.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Bk=!1,n=n.times(n).plus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln())},Jk.inverseHyperbolicTangent=Jk.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?nT(new o(i),t,e,!0):(o.precision=n=r-i.e,i=eT(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},Jk.inverseSine=Jk.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=aT(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Jk.inverseTangent=Jk.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=Zk)return(a=aT(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=Zk)return(a=aT(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Bk=!1,e=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<this.d.length-2},Jk.isNaN=function(){return!this.s},Jk.isNegative=Jk.isNeg=function(){return this.s<0},Jk.isPositive=Jk.isPos=function(){return this.s>0},Jk.isZero=function(){return!!this.d&&0===this.d[0]},Jk.lessThan=Jk.lt=function(t){return this.cmp(t)<0},Jk.lessThanOrEqualTo=Jk.lte=function(t){return this.cmp(t)<1},Jk.logarithm=Jk.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Bk=!1,a=fT(c,s=h+5),r=e?oT(l,s+10):fT(t,s),$k((u=eT(a,r,s,1)).d,i=h,d))do{if(a=fT(c,s+=10),r=e?oT(l,s+10):fT(t,s),u=eT(a,r,s,1),!o){+Xk(u.d).slice(i+1,i+15)+1==1e14&&(u=nT(u,h+1,0));break}}while($k(u.d,i+=10,d));return Bk=!0,nT(u,h,d)},Jk.minus=Jk.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return Bk?nT(t,s,u):t}if(n=Qk(t.e/7),l=Qk(f.e/7),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/Gk|0,c[i]%=Gk;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=iT(c,r),Bk?nT(t,s,u):t},Jk.precision=Jk.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Rk+t);return n.d?(e=sT(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},Jk.round=function(){var t=this,e=t.constructor;return nT(new e(t),t.e+1,e.rounding)},Jk.sine=Jk.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:gT(t,2,e,e);n=(n=1.4*Math.sqrt(r))>16?16:0|n,e=e.times(1/vT(5,n)),e=gT(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(jk>2?n.neg():n,t,e,!0)):new r(NaN)},Jk.squareRoot=Jk.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(Bk=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=Xk(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=Qk((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(eT(a,o,n+2,1)).times(.5),Xk(o.d).slice(0,n)===(e=Xk(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(nT(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(nT(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Bk=!0,nT(r,u,l.rounding,t)},Jk.tangent=Jk.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=eT(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,nT(2==jk||4==jk?n.neg():n,t,e,!0)):new r(NaN)},Jk.times=Jk.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=Qk(l.e/7)+Qk(t.e/7),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%Gk|0,e=s/Gk|0;o[i]=(o[i]+e)%Gk|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=iT(o,n),Bk?nT(t,h.precision,h.rounding):t},Jk.toBinary=function(t,e){return bT(this,2,t,e)},Jk.toDecimalPlaces=Jk.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(Kk(t,0,1e9),void 0===e?e=r.rounding:Kk(e,0,8),nT(n,t+n.e+1,e))},Jk.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,!0):(Kk(t,0,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=rT(i):(Kk(t,0,1e9),void 0===e?e=o.rounding:Kk(e,0,8),n=rT(r=nT(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Jk.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,y=f.constructor;if(!p)return new y(f);if(c=n=new y(1),r=u=new y(0),a=(o=(e=new y(r)).e=sT(p)-f.e-1)%7,e.d[0]=Yk(10,a<0?7+a:a),null==t)t=o>0?e:c;else{if(!(s=new y(t)).isInt()||s.lt(c))throw Error(Rk+s);t=s.gt(e)?o>0?e:c:s}for(Bk=!1,s=new y(Xk(p)),l=y.precision,y.precision=o=7*p.length*2;h=eT(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=eT(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=eT(c,r,o,1).minus(f).abs().cmp(eT(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],y.precision=l,Bk=!0,d},Jk.toHexadecimal=Jk.toHex=function(t,e){return bT(this,16,t,e)},Jk.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:Kk(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(Bk=!1,n=eT(n,t,0,e,1).times(t),Bk=!0,nT(n)):(t.s=n.s,n=t),n},Jk.toNumber=function(){return+this},Jk.toOctal=function(t,e){return bT(this,8,t,e)},Jk.toPower=Jk.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(Yk(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return nT(s,r,o);if((e=Qk(t.e/7))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=cT(u,s,n,r),t.s<0?new u(1).div(i):nT(i,r,o);if((a=s.s)<0){if(eu.maxE+1||e0?a/0:0):(Bk=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=dT(t.times(fT(s,r+n)),r)).d&&$k((i=nT(i,r+5,1)).d,r,o)&&(e=r+10,+Xk((i=nT(dT(t.times(fT(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=nT(i,r+1,0))),i.s=a,Bk=!0,u.rounding=o,nT(i,r,o))},Jk.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Kk(t,1,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toSignificantDigits=Jk.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(Kk(t,1,1e9),void 0===e?e=n.rounding:Kk(e,0,8)),nT(new n(this),t,e)},Jk.toString=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},Jk.truncated=Jk.trunc=function(){return nT(new this.constructor(this),this.e+1,1)},Jk.valueOf=Jk.toJSON=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var eT=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,y,m,g,v,w,b,M,A,N,I,E,x,k,T,L=r.constructor,S=r.s==i.s?1:-1,j=r.d,C=i.d;if(!(j&&j[0]&&C&&C[0]))return new L(r.s&&i.s&&(j?!C||j[0]!=C[0]:C)?j&&0==j[0]||!C?0*S:S/0:NaN);for(u?(f=1,l=r.e-i.e):(u=Gk,f=7,l=Qk(r.e/f)-Qk(i.e/f)),k=C.length,E=j.length,v=(g=new L(S)).d=[],h=0;C[h]==(j[h]||0);h++);if(C[h]>(j[h]||0)&&l--,null==o?(A=o=L.precision,a=L.rounding):A=s?o+(r.e-i.e)+1:o,A<0)v.push(1),p=!0;else{if(A=A/f+2|0,h=0,1==k){for(d=0,C=C[0],A++;(h1&&(C=t(C,d,u),j=t(j,d,u),k=C.length,E=j.length),I=k,b=(w=j.slice(0,k)).length;b=u/2&&++x;do{d=0,(c=e(C,w,k,b))<0?(M=w[0],k!=b&&(M=M*u+(w[1]||0)),(d=M/x|0)>1?(d>=u&&(d=u-1),1==(c=e(y=t(C,d,u),w,m=y.length,b=w.length))&&(d--,n(y,k=10;d/=10)h++;g.e=h+l*f-1,nT(g,s?o+g.e+1:o,a,p)}return g}}();function nT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=7,a=e,u=(l=h[d=0])/Yk(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/Yk(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%Yk(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Yk(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=Yk(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=Yk(10,7-o),h[d]=a>0?(l/Yk(10,i-a)%Yk(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==Gk&&(h[0]=1));break}if(h[d]+=s,h[d]!=Gk)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return Bk&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e0?o=o.charAt(0)+"."+o.slice(1)+uT(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+uT(-i-1)+o,n&&(r=n-a)>0&&(o+=uT(r))):i>=a?(o+=uT(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+uT(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=uT(r))),o}function iT(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function oT(t,e,n){if(e>qk)throw Bk=!0,n&&(t.precision=n),Error("[DecimalError] Precision limit exceeded");return nT(new t(zk),e,1,!0)}function aT(t,e,n){if(e>Zk)throw Error("[DecimalError] Precision limit exceeded");return nT(new t(Pk),e,n,!0)}function sT(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function uT(t){for(var e="";t--;)e+="0";return e}function cT(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for(Bk=!1;;){if(n%2&&MT((o=o.times(e)).d,a)&&(i=!0),0===(n=Qk(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}MT((e=e.times(e)).d,a)}return Bk=!0,o}function lT(t){return 1&t.d[t.d.length-1]}function hT(t,e,n){for(var r,i=new t(e[0]),o=0;++o17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(Bk=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(Yk(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=nT(o.times(t),u,1),n=n.times(++l),Xk((s=a.plus(eT(o,n,u,1))).d).slice(0,u)===Xk(a.d).slice(0,u)){for(i=h;i--;)a=nT(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&$k(a.d,u-r,f,c)))return nT(a,d.precision=p,f,Bk=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function fT(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,y=p.d,m=p.constructor,g=m.rounding,v=m.precision;if(p.s<0||!y||!y[0]||!p.e&&1==y[0]&&1==y.length)return new m(y&&!y[0]?-1/0:1!=p.s?NaN:y?0:p);if(null==e?(Bk=!1,l=v):l=e,m.precision=l+=10,r=(n=Xk(y)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=oT(m,l+2,v).times(o+""),p=fT(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=v,null==e?nT(p,v,g,Bk=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Xk((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),h=p,u=a=p=eT(p.minus(1),p.plus(1),l,1),d=nT(p.times(p),l,1),i=3;;){if(a=nT(a.times(d),l,1),Xk((c=u.plus(eT(a,new m(i),l,1))).d).slice(0,l)===Xk(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(oT(m,l+2,v).times(o+""))),u=eT(u,new m(f),l,1),null!=e)return m.precision=v,u;if(!$k(u.d,l-10,g,s))return nT(u,m.precision=v,g,Bk=!0);m.precision=l+=10,c=a=p=eT(h.minus(1),h.plus(1),l,1),d=nT(p.times(p),l,1),i=s=1}u=c,i+=2}}function pT(t){return String(t.s*t.s/0)}function yT(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),rt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Hk.test(e))return yT(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Fk.test(e))n=16,e=e.toLowerCase();else if(Wk.test(e))n=2;else{if(!Vk.test(e))throw Error(Rk+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=cT(r,new r(n),o,2*o)),o=l=(c=tT(e,n,Gk)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=iT(c,l),t.d=c,Bk=!1,a&&(t=eT(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?Yk(2,u):uL.pow(2,u))),Bk=!0,t)}function gT(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/7);for(Bk=!1,u=n.times(n),s=new t(r);;){if(a=eT(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=eT(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return Bk=!0,a.d.length=l+1,a}function vT(t,e){for(var n=t;--e;)n*=t;return n}function wT(t,e){var n,r=e.s<0,i=aT(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return jk=r?4:1,e;if((n=e.divToInt(i)).isZero())jk=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return jk=lT(n)?r?2:3:r?4:1,e;jk=lT(n)?r?1:4:r?3:2}return e.minus(i).abs()}function bT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(Kk(n,1,1e9),void 0===r?r=f.rounding:Kk(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=rT(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=tT(rT(d),10,i),d.e=d.d.length),o=u=(h=tT(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=eT(t,d,n,r,0,i)).d,o=t.e,c=Sk),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=tT(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";au)for(o-=u;o--;)l+="0";else oe)return t.length=e,!0}function AT(t){return new this(t).abs()}function NT(t){return new this(t).acos()}function IT(t){return new this(t).acosh()}function ET(t,e){return new this(t).plus(e)}function xT(t){return new this(t).asin()}function kT(t){return new this(t).asinh()}function TT(t){return new this(t).atan()}function LT(t){return new this(t).atanh()}function ST(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?aT(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=aT(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(eT(t,e,o,1)),e=aT(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(eT(t,e,o,1)):(n=aT(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function jT(t){return new this(t).cbrt()}function CT(t){return nT(t=new this(t),t.e+1,2)}function DT(t,e,n){return new this(t).clamp(e,n)}function OT(t){if(!t||"object"!=typeof t)throw Error("[DecimalError] Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-Dk,0,"toExpPos",0,Dk,"maxE",0,Dk,"minE",-Dk,0,"modulo",0,9];for(e=0;e=o[e+1]&&r<=o[e+2]))throw Error(Rk+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=_k[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Rk+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[n]=!0}else this[n]=!1}return this}function zT(t){return new this(t).cos()}function PT(t){return new this(t).cosh()}function _T(t,e){return new this(t).div(e)}function BT(t){return new this(t).exp()}function RT(t){return nT(t=new this(t),t.e+1,3)}function UT(){var t,e,n=new this(0);for(Bk=!1,t=0;t=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(e=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function KT(t){return nT(t=new this(t),t.e+1,this.rounding)}function $T(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function tL(t){return new this(t).sin()}function eL(t){return new this(t).sinh()}function nL(t){return new this(t).sqrt()}function rL(t,e){return new this(t).sub(e)}function iL(){var t=0,e=arguments,n=new this(e[t]);for(Bk=!1;n.s&&++to.maxE?(i.e=NaN,i.d=null):t.e=10;n/=10)e++;return void(Bk?e>o.maxE?(i.e=NaN,i.d=null):en.call(e,...t))),e=void 0)}return n}zk=new uL(zk),Pk=new uL(Pk);class lL{constructor({blockchain:t,tokenIn:e,decimalsIn:n,tokenOut:r,decimalsOut:i,path:o,pools:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,exchange:h,approvalRequired:d,getApproval:f,getPrep:p,getTransaction:y}){this.blockchain=t,this.tokenIn=e,this.decimalsIn=n,this.tokenOut=r,this.decimalsOut=i,this.path=o,this.pools=a,this.amountIn=cL([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=cL([l,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=cL([c,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=cL([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=h,this.getPrep=p,this.getTransaction=y}}let hL=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];hL.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],hL.solana=["solana"];const dL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:i,amountOut:o})=>{let a=i.add(i.mul(100*parseFloat("0.5")).div(1e4));if(!hL.evm.includes(t.blockchain||e))return a;const s=await PN({blockchain:t.blockchain||e,method:"latestBlockNumber"});let u=[];for(var c=0;c<=2;c++)u.push(s-c);const l=await Promise.all(u.map((async i=>{let{amountIn:a}=await t.getAmounts({exchange:t,blockchain:e,path:r,pools:n,amountOut:o,block:i});return a})));if(!l[0]||!l[1]||!l[2])return a;let h;if(l[0].gt(l[1])&&l[1].gt(l[2])){const t=l[0].sub(l[1]),e=l[1].sub(l[2]),n=t.add(e).div(2);if(h=l[0].add(n),h.gt(a))return h}else if(!l[0].eq(l[1])&&!l[1].eq(l[2])){const t=l[0].sub(l[1]).abs(),e=l[1].sub(l[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=l[0].gt(l[1])&&l[0].gt(l[2])?l[0]:l[1].gt(l[2])&&l[1].gt(l[0])?l[1]:l[2],h=r.add(n),h.gt(a))return h}return a},fL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amounts:i,tokenIn:o,tokenOut:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amountInInput:h,amountOutInput:d,amountInMaxInput:f,amountOutMinInput:p})=>{if(p||d){if(hL.evm.includes(t.blockchain||e))s=u=await dL({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:s,amountOut:p||c});else if(hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((o,a)=>{if(0!=a){let o=dL({exchange:t,pools:n,exchangePath:[r[a-1],r[a]],amountIn:i[a-1],amountOut:i[a]});return o.then((t=>e.push(t))),o}}))),e.push(i[i.length-1]),s=u=(i=e)[0]}}else if((f||h)&&hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((n,o)=>{if(0!==o&&on.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,exchangePath:[r[o-1],r[o]],amountIn:i[o-1],amountOut:i[o]});return n.then((t=>(e.unshift(t),t))),n}}))),e.push(i[0]),c=l=(i=e.slice().reverse())[i.length-1]}return{amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amounts:i}},pL=t=>t.match("0x")?am(t):t;let yL=async({amount:t,blockchain:e,address:n})=>await Ak.BigNumber({amount:t,blockchain:e,address:n}),mL=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await yL({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await yL({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await yL({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await yL({amount:a,blockchain:t,address:n})),u};class gL{constructor(...t){Object.assign(this,...t)}async route({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}){return e===n?Promise.resolve():(void 0===t&&(this.scope?t=this.scope:1===this.blockchains.length&&(t=this.blockchains[0])),(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if(void 0===t&&null!=e.blockchains&&e.blockchains.length>1)throw"You need to provide a blockchain when calling route on an exchange that supports multiple blockchains!";if(void 0!==o&&void 0!==i)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==a&&void 0!==s)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==i&&void 0!==a)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==o&&void 0!==s)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),await(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s,findPath:u,getAmounts:c,getPrep:l,getTransaction:h,slippage:d})=>{if(n=pL(n),r=pL(r),[i,o,a,s].filter(Boolean).length>1)throw"You can only pass one: amountIn, amountOut, amountInMax or amountOutMin";if([i,o,a,s].filter(Boolean).length<1)throw"You need to pass exactly one: amountIn, amountOut, amountInMax or amountOutMin";return new Promise((async f=>{let{path:p,exchangePath:y,pools:m}=await u({blockchain:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s});if(void 0===p||0==p.length)return f();let g,[v,w,b,M]=[i,o,a,s];try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await c({exchange:e,blockchain:t,path:p,pools:m,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s}))}catch(t){return f()}if([i,a,o,s].every((t=>null==t)))return f();if(d||e.slippage)try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await fL({exchange:e,blockchain:t,pools:m,exchangePath:y,amounts:g,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M}))}catch(t){return f()}const A=await new Ak({blockchain:t,address:n}).decimals(),N=await new Ak({blockchain:t,address:r}).decimals();f(new lL({blockchain:t,tokenIn:n,decimalsIn:A,tokenOut:r,decimalsOut:N,path:p,pools:m,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,exchange:e,getPrep:async({account:o})=>await l({exchange:e,blockchain:t,tokenIn:n,tokenOut:r,amountIn:i||a,account:o}),getTransaction:async({account:n,permit2:r,inputTokenPushed:u})=>await h({exchange:e,blockchain:t,pools:m,path:p,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M,account:n,permit2:r,inputTokenPushed:u})}))}))})({...await mL({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),blockchain:t,findPath:this.findPath,getAmounts:this.getAmounts,getPrep:this.getPrep,getTransaction:this.getTransaction,slippage:this.slippage}))}}function vL(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const wL=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},bL=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(cN(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(cN(e.toString(),o)),ML=async({blockchain:t,exchange:e,path:n})=>{const r=wL({blockchain:t,exchange:e,path:n});if(!r||1===r.length)return!1;try{let i=await PN({blockchain:t,address:e[t].factory.address,method:"getPair",api:e[t].factory.api,cache:36e5,params:wL({blockchain:t,exchange:e,path:n})});if(!i||i==Hf[t].zero)return!1;let[o,a,s]=await Promise.all([PN({blockchain:t,address:i,method:"getReserves",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token0",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token1",api:e[t].pair.api,cache:36e5})]);if(r.includes(Hf[t].wrapped.address))return bL({min:1,token:Hf[t].wrapped.address,decimals:Hf[t].currency.decimals,reserves:o,token0:a,token1:s});if(n.find((e=>Hf[t].stables.usd.includes(e)))){let e=n.find((e=>Hf[t].stables.usd.includes(e))),r=new Ak({blockchain:t,address:e}),i=await r.decimals();return bL({min:1e3,token:e,decimals:i,reserves:o,token0:a,token1:s})}return!0}catch(t){return console.log("e",t),!1}};let AL=({blockchain:t,exchange:e,path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsOut",api:e[t].router.api,params:{amountIn:r,path:wL({blockchain:t,exchange:e,path:n})}}).then((t=>{i(t[t.length-1])})).catch((()=>i()))})),NL=({blockchain:t,exchange:e,path:n,amountOut:r,block:i})=>new Promise((o=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsIn",api:e[t].router.api,params:{amountOut:r,path:wL({blockchain:t,exchange:e,path:n})},block:i}).then((t=>o(t[0]))).catch((()=>o()))}));var IL={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let i;if(await ML({blockchain:t,exchange:e,path:[n,r]}))i=[n,r];else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[r,Hf[t].wrapped.address]}))i=[n,Hf[t].wrapped.address,r];else if(!Hf[t].stables.usd.includes(n)&&(await Promise.all(Hf[t].stables.usd.map((r=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[Hf[t].wrapped.address,r]})){let o=(await Promise.all(Hf[t].stables.usd.map((async r=>await ML({blockchain:t,exchange:e,path:[n,r]})?r:void 0)))).find(Boolean);i=[n,o,Hf[t].wrapped.address,r]}else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&!Hf[t].stables.usd.includes(r)&&(await Promise.all(Hf[t].stables.usd.map((n=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length){let o=(await Promise.all(Hf[t].stables.usd.map((async n=>await ML({blockchain:t,exchange:e,path:[n,r]})?n:void 0)))).find(Boolean);i=[n,Hf[t].wrapped.address,o,r]}return vL([i,"optionalAccess",t=>t.length])&&i[0]==Hf[t].currency.address?i.splice(1,0,Hf[t].wrapped.address):vL([i,"optionalAccess",t=>t.length])&&i[i.length-1]==Hf[t].currency.address&&i.splice(i.length-1,0,Hf[t].wrapped.address),{path:i,exchangePath:wL({blockchain:t,exchange:e,path:i})}},pathExists:ML,getAmounts:async({blockchain:t,exchange:e,path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:a,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(s){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:s,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}else if(c){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:c,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(u){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:u,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}return{amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address?s||l?(d.method="swapExactETHForTokens",d.value=r.toString(),d.params={amountOutMin:a.toString()}):(u||c)&&(d.method="swapETHForExactTokens",d.value=i.toString(),d.params={amountOut:o.toString()}):n[n.length-1]===Hf[e].currency.address?s||l?(d.method="swapExactTokensForETH",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactETH",d.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(d.method="swapExactTokensForTokens",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactTokens",d.params={amountInMax:i.toString(),amountOut:o.toString()}),d.params=Object.assign({},d.params,{path:wL({blockchain:e,exchange:t,path:n}),to:h,deadline:Math.round(Date.now()/1e3)+86400}),d},ROUTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]};const EL={name:"honey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zbBrGvU/FcLJryZdMjC09DidH6wlfL76774JUPZyWTMkmEZnIW59w1qgwxDOIHV5T99Yfz7xrRXDzqzGzfI+x78Txwd11N9dr0g52ukW8TciZwIfY2jk4FKn0F1AErFV25vmbeZ2BvG1lcxHXA9ZZK+scZ8wJDdIVlccuYE3wfwLeBXDOw79NPcLbm+gR4DniirqZ6Y2eZerTJQdAMT8BewHgCMAnwY38dpbux251AHPvDG28Da4ANXQW7RiPxw0XkduCCbh1zjzdVtcuNYtvEnIx9n4LY3yksx46B6Y699+l9YG3KKI0Y1p631tfMa+ruxF7vUtEWhVaO/bT5gAOBYdgD40lgN/Zbth1IKLqtJ46kE43ETxKRO4Fje3uug2xTZSHow73dqrktKn009j06GBgFDOK7xa2NwJcpozTusZq/6Ot9yusPf8TWxIuKi7m0NSU3AZ1+mTML7AEeVtVFgVD55y7a7TV5s9VWR5RVeC3vod4NDfW7louIB5hM9pdnr1RldiDkW1ZW4d2ZZVsZk0+Tcp0SCJXH/VW+G1Q5Fng2S2beB87xV/lOD4R8b3WbO08oCAH3Egj53vVX+c5SOBPoNE6kl2wH5qnqsf4q3wqHynSNghJwL4Eq33Nq6XHADbT77FwvSQF/UdUp/ipfuFC/Yp3Xv4FdUVbhTZaN8a795rOmJ4DBIkym5zFFr6rqRYFQ+QNlFd7MI6xySEG+ge05dKovFgj5rgKmAi92k30Tyiy1dFogVN6nUPZ8Iy/2C3UCf5VvHTA9VpuYCVyEPdCQwn4rU8ALqvpIIFS+I3deOs//AZb84smmUsyHAAAAAElFTkSuQmCC",protocol:"uniswap_v2",slippage:!0,blockchains:["gnosis"],gnosis:{router:{address:"0x1C232F01118CB8B424793ae03F870aa7D0ac7f77",api:IL.ROUTER},factory:{address:"0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7",api:IL.FACTORY},pair:{api:IL.PAIR}}};var xL=t=>new gL(Object.assign(EL,{scope:t,findPath:t=>IL.findPath({...t,exchange:EL}),pathExists:t=>IL.pathExists({...t,exchange:EL}),getAmounts:t=>IL.getAmounts({...t,exchange:EL}),getPrep:t=>IL.getPrep({...t,exchange:EL}),getTransaction:t=>IL.getTransaction({...t,exchange:EL})}));const kL="79226673515401279992447579055",TL=t=>-t;class LL{static priceToSqrtPriceX64(t,e,n){return r=t.mul(uL.pow(10,n-e)).sqrt(),new rf(r.mul(uL.pow(2,64)).floor().toFixed());var r}static sqrtPriceX64ToPrice(t,e,n){return(r=t,new uL(r.toString()).mul(uL.pow(2,-64))).pow(2).mul(uL.pow(10,e-n));var r}static tickIndexToSqrtPriceX64(t){return new rf(t>0?function(t){let e;e=new rf(0!=(1&t)?"79232123823359799118286999567":"79228162514264337593543950336");0!=(2&t)&&(e=SL(e.mul(new rf("79236085330515764027303304731")),96,256));0!=(4&t)&&(e=SL(e.mul(new rf("79244008939048815603706035061")),96,256));0!=(8&t)&&(e=SL(e.mul(new rf("79259858533276714757314932305")),96,256));0!=(16&t)&&(e=SL(e.mul(new rf("79291567232598584799939703904")),96,256));0!=(32&t)&&(e=SL(e.mul(new rf("79355022692464371645785046466")),96,256));0!=(64&t)&&(e=SL(e.mul(new rf("79482085999252804386437311141")),96,256));0!=(128&t)&&(e=SL(e.mul(new rf("79736823300114093921829183326")),96,256));0!=(256&t)&&(e=SL(e.mul(new rf("80248749790819932309965073892")),96,256));0!=(512&t)&&(e=SL(e.mul(new rf("81282483887344747381513967011")),96,256));0!=(1024&t)&&(e=SL(e.mul(new rf("83390072131320151908154831281")),96,256));0!=(2048&t)&&(e=SL(e.mul(new rf("87770609709833776024991924138")),96,256));0!=(4096&t)&&(e=SL(e.mul(new rf("97234110755111693312479820773")),96,256));0!=(8192&t)&&(e=SL(e.mul(new rf("119332217159966728226237229890")),96,256));0!=(16384&t)&&(e=SL(e.mul(new rf("179736315981702064433883588727")),96,256));0!=(32768&t)&&(e=SL(e.mul(new rf("407748233172238350107850275304")),96,256));0!=(65536&t)&&(e=SL(e.mul(new rf("2098478828474011932436660412517")),96,256));0!=(131072&t)&&(e=SL(e.mul(new rf("55581415166113811149459800483533")),96,256));0!=(262144&t)&&(e=SL(e.mul(new rf("38992368544603139932233054999993551")),96,256));return SL(e,32,256)}(t):function(t){let e,n=Math.abs(t);e=new rf(0!=(1&n)?"18445821805675392311":"18446744073709551616");0!=(2&n)&&(e=SL(e.mul(new rf("18444899583751176498")),64,256));0!=(4&n)&&(e=SL(e.mul(new rf("18443055278223354162")),64,256));0!=(8&n)&&(e=SL(e.mul(new rf("18439367220385604838")),64,256));0!=(16&n)&&(e=SL(e.mul(new rf("18431993317065449817")),64,256));0!=(32&n)&&(e=SL(e.mul(new rf("18417254355718160513")),64,256));0!=(64&n)&&(e=SL(e.mul(new rf("18387811781193591352")),64,256));0!=(128&n)&&(e=SL(e.mul(new rf("18329067761203520168")),64,256));0!=(256&n)&&(e=SL(e.mul(new rf("18212142134806087854")),64,256));0!=(512&n)&&(e=SL(e.mul(new rf("17980523815641551639")),64,256));0!=(1024&n)&&(e=SL(e.mul(new rf("17526086738831147013")),64,256));0!=(2048&n)&&(e=SL(e.mul(new rf("16651378430235024244")),64,256));0!=(4096&n)&&(e=SL(e.mul(new rf("15030750278693429944")),64,256));0!=(8192&n)&&(e=SL(e.mul(new rf("12247334978882834399")),64,256));0!=(16384&n)&&(e=SL(e.mul(new rf("8131365268884726200")),64,256));0!=(32768&n)&&(e=SL(e.mul(new rf("3584323654723342297")),64,256));0!=(65536&n)&&(e=SL(e.mul(new rf("696457651847595233")),64,256));0!=(131072&n)&&(e=SL(e.mul(new rf("26294789957452057")),64,256));0!=(262144&n)&&(e=SL(e.mul(new rf("37481735321082")),64,256));return e}(t))}static sqrtPriceX64ToTickIndex(t){if(t.gt(new rf(kL))||t.lt(new rf("4295048016")))throw new Error("Provided sqrtPrice is not within the supported sqrtPrice range.");const e=t.bitLength()-1,n=function(t,e,n){let r=t.toTwos(n).shln(e);return r.imaskn(n+1),r.fromTwos(n)}(new rf(e-64),32,128);let r=new rf("8000000000000000","hex"),i=0,o=new rf(0),a=e>=64?t.shrn(e-63):t.shln(63-e);for(;r.gt(new rf(0))&&i<14;){a=a.mul(a);let t=a.shrn(127);a=a.shrn(63+t.toNumber()),o=o.add(r.mul(t)),r=r.shrn(1),i+=1}const s=o.shrn(32),u=n.add(s).mul(new rf("59543866431248")),c=SL(u.sub(new rf("184467440737095516")),64,128).toNumber(),l=SL(u.add(new rf("15793534762490258745")),64,128).toNumber();if(c==l)return c;return LL.tickIndexToSqrtPriceX64(l).lte(t)?l:c}static tickIndexToPrice(t,e,n){return LL.sqrtPriceX64ToPrice(LL.tickIndexToSqrtPriceX64(t),e,n)}static priceToTickIndex(t,e,n){return LL.sqrtPriceX64ToTickIndex(LL.priceToSqrtPriceX64(t,e,n))}static priceToInitializableTickIndex(t,e,n,r){return((t,e)=>t-t%e)(LL.priceToTickIndex(t,e,n),r)}static invertPrice(t,e,n){const r=LL.priceToTickIndex(t,e,n),i=TL(r);return LL.tickIndexToPrice(i,n,e)}static invertSqrtPriceX64(t){const e=LL.sqrtPriceX64ToTickIndex(t),n=TL(e);return LL.tickIndexToSqrtPriceX64(n)}}function SL(t,e,n){let r=t.toTwos(n).shrn(e);return r.imaskn(n-e+1),r.fromTwos(n-e)}const jL=new rf(1e4),CL=new rf(1e6),DL=new rf(0),OL=new rf(1),zL=new rf(2),PL=zL.pow(new rf(64)).sub(OL);class _L extends rf{toBuffer(){const t=super.toArray().reverse(),e=buffer.Buffer.from(t);if(8===e.length)return e;assert__default.default(e.length<8,"u64 too large");const n=buffer.Buffer.alloc(8);return e.copy(n),n}static fromBuffer(t){return assert__default.default(8===t.length,`Invalid buffer length: ${t.length}`),new _L([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(""),16)}}class BL{static mul(t,e,n){const r=t.mul(e);if(this.isOverLimit(r,n))throw new Error(`Mul result higher than u${n}`);return r}static mulDiv(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!1,r)}static mulDivRoundUp(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!0,r)}static mulDivRoundUpIf(t,e,n,r,i){if(n.eq(DL))throw new Error("mulDiv denominator is zero");const o=this.mul(t,e,i),a=o.div(n);return r&&o.mod(n).gt(DL)?a.add(OL):a}static checked_mul_shift_right(t,e,n){return this.checked_mul_shift_right_round_up_if(t,e,!1,n)}static checked_mul_shift_right_round_up_if(t,e,n,r){if(t.eq(DL)||e.eq(DL))return DL;const i=this.mul(t,e,r);if(this.isOverLimit(i,r))throw new Error(`MulShiftRight overflowed u${r}.`);const o=i.div(new rf(2).pow(new rf(64)));const a=n&&o.and(PL).gt(DL);if(a&&o.eq(PL))throw new Error(`MulShiftRight overflowed u${r}.`);return a?o.add(OL):o}static isOverLimit(t,e){const n=zL.pow(new rf(e)).sub(OL);return t.gt(n)}static divRoundUp(t,e){return this.divRoundUpIf(t,e,!0)}static divRoundUpIf(t,e,n){if(e.eq(DL))throw new Error("divRoundUpIf - divide by zero");let r=t.div(e);return n&&t.mod(e).gt(DL)?r.add(OL):r}}const RL=(t,e,n)=>{const r=LL.tickIndexToSqrtPriceX64(t);return{nextTickPrice:r,nextSqrtPriceLimit:n?rf.max(e,r):rf.min(e,r)}},UL=(t,e)=>t.gt(e)?[e,t]:[t,e],QL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i),s=n.mul(a).shln(64),u=i.mul(o),c=s.div(u),l=s.mod(u),h=r&&!l.eq(DL)?c.add(OL):c;if(h.gt(PL))throw new Error("Results larger than U64");return h},YL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i);return BL.checked_mul_shift_right_round_up_if(n,a,r,128)},WL=(t,e,n,r,i)=>r===i?((t,e,n,r)=>{if(n.eq(DL))return t;let i=BL.mul(t,n,256),o=BL.mul(e,t,256).shln(64);if(BL.isOverLimit(o,256))throw new Error("getNextSqrtPriceFromARoundUp - numerator overflow u256");let a=e.shln(64);if(!r&&a.lte(i))throw new Error("getNextSqrtPriceFromARoundUp - Unable to divide currLiquidityX64 by product");let s=r?a.add(i):a.sub(i),u=BL.divRoundUp(o,s);if(u.lt(new rf("4295048016")))throw new Error("getNextSqrtPriceFromARoundUp - price less than min sqrt price");if(u.gt(new rf(kL)))throw new Error("getNextSqrtPriceFromARoundUp - price less than max sqrt price");return u})(t,e,n,r):((t,e,n,r)=>{let i=n.shln(64),o=BL.divRoundUpIf(i,e,!r);return r?t.add(o):t.sub(o)})(t,e,n,r),FL=(t,e,n,r,i)=>i===r?QL(t,e,n,r):YL(t,e,n,r),VL=(t,e,n,r,i,o,a)=>{let s=FL(r,i,n,o,a),u=t;if(o){u=BL.mulDiv(t,CL.sub(new rf(e)),CL,128)}let c=u.gte(s)?i:WL(r,n,u,o,a),l=c.eq(i),h=((t,e,n,r,i)=>i===r?YL(t,e,n,!r):QL(t,e,n,!r))(r,c,n,o,a);l||(s=FL(r,c,n,o,a));let d,f=o?s:h,p=o?h:s;if(!o&&p.gt(t)&&(p=t),o&&!l)d=t.sub(f);else{const t=new rf(e);d=BL.mulDivRoundUp(f,t,CL.sub(t),128)}return{amountIn:f,amountOut:p,nextPrice:c,feeAmount:d}},HL=(t,e,n)=>n?e.sub(t):e.add(t),GL=(t,e,n,r,i)=>{let o=r,a=i,s=t;if(e>0){let t=((t,e)=>t.mul(new _L(e).div(jL)))(s,e);s=s.sub(t),o=o.add(r)}if(n.gt(DL)){const t=s.shln(64).div(n);a=a.add(t)}return{nextProtocolFee:o,nextFeeGrowthGlobalInput:a}},qL=pf([hf("mint"),hf("vault"),hf("authority"),yf("emissionsPerSecondX64"),yf("growthGlobalX64")]),ZL=pf([vf("anchorDiscriminator"),hf("whirlpoolsConfig"),Kd(wf(),1,"whirlpoolBump"),mf("tickSpacing"),Kd(wf(),2,"tickSpacingSeed"),mf("feeRate"),mf("protocolFeeRate"),yf("liquidity"),yf("sqrtPrice"),uf("tickCurrentIndex"),vf("protocolFeeOwedA"),vf("protocolFeeOwedB"),hf("tokenMintA"),hf("tokenVaultA"),yf("feeGrowthGlobalA"),hf("tokenMintB"),hf("tokenVaultB"),yf("feeGrowthGlobalB"),vf("rewardLastUpdatedTimestamp"),Kd(qL,3,"rewardInfos")]),JL=pf([af("initialized"),sf("liquidityNet"),yf("liquidityGross"),yf("feeGrowthOutsideA"),yf("feeGrowthOutsideB"),Kd(yf(),3,"reward_growths_outside")]),XL=pf([vf("anchorDiscriminator"),uf("startTickIndex"),Kd(JL,88,"ticks"),hf("whirlpool")]),KL=(t,e,n)=>{const r=(Math.floor(t/e/88)+n)*e*88,i=88*e;if(r<-443636-(-443636%i+i))throw`startTickIndex is too small - - ${r}`;if(r>443636)throw`startTickIndex is too large - ${r}`;return r},$L=async({pool:t,freshWhirlpoolData:e,aToB:n})=>{const r=await(async({aToB:t,pool:e,tickSpacing:n,tickCurrentIndex:r})=>{const i=t?0:n;let o=0,a=[];for(let s=0;s<3;s++){let s;try{s=KL(r+i,n,o)}catch(t){return a}const u=(await Xs.findProgramAddress([nf.from("tick_array"),new Xs(e.toString()).toBuffer(),nf.from(s.toString())],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0];a.push(u),o=t?o-1:o+1}return a})({aToB:n,pool:t,tickSpacing:e.tickSpacing,tickCurrentIndex:e.tickCurrentIndex});return await Promise.all(r.map((async(t,e)=>{let n;try{n=await PN({blockchain:"solana",address:t.toString(),api:XL,cache:10})}catch(t){}return{address:t,data:n}})))};class tS{static fromTickIndex(t,e){const n=Math.floor(Math.floor(t/e)/88);let r=Math.floor(t%(88*e)/e);return r<0&&(r=88+r),new tS(n,r,e)}constructor(t,e,n){if(e>=88)throw new Error("Invalid offsetIndex - value has to be smaller than TICK_ARRAY_SIZE");if(e<0)throw new Error("Invalid offsetIndex - value is smaller than 0");if(n<0)throw new Error("Invalid tickSpacing - value is less than 0");this.arrayIndex=t,this.offsetIndex=e,this.tickSpacing=n}toTickIndex(){return 88*this.arrayIndex*this.tickSpacing+this.offsetIndex*this.tickSpacing}toNextInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()+this.tickSpacing,this.tickSpacing)}toPrevInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()-this.tickSpacing,this.tickSpacing)}}class eS{constructor(t,e,n){if(!t[0]||!t[0].data)throw new Error("TickArray index 0 must be initialized");this.sequence=[];for(const e of t){if(!e||!e.data)break;this.sequence.push({address:e.address,data:e.data})}this.tickArrays=t,this.tickSpacing=e,this.aToB=n,this.touchedArrays=[...Array(this.sequence.length).fill(!1)],this.startArrayIndex=tS.fromTickIndex(this.sequence[0].data.startTickIndex,this.tickSpacing).arrayIndex}isValidTickArray0(t){const e=this.aToB?0:this.tickSpacing,n=this.sequence[0].data;return this.checkIfIndexIsInTickArrayRange(n.startTickIndex,t+e)}getNumOfTouchedArrays(){return this.touchedArrays.filter((t=>!!t)).length}getTouchedArrays(t){let e=this.touchedArrays.reduce(((t,e,n)=>(e&&t.push(this.sequence[n].address),t)),[]);if(0===e.length)return[];const n=t-e.length;return n>0&&(e=e.concat(Array(n).fill(e[e.length-1]))),e}getTick(t){const e=tS.fromTickIndex(t,this.tickSpacing);if(!this.isArrayIndexInBounds(e,this.aToB))throw new Error("Provided tick index is out of bounds for this sequence.");const n=this.getLocalArrayIndex(e.arrayIndex,this.aToB),r=this.sequence[n].data;if(this.touchedArrays[n]=!0,!r)throw new Error(`TickArray at index ${n} is not initialized.`);if(!this.checkIfIndexIsInTickArrayRange(r.startTickIndex,t))throw new Error(`TickArray at index ${n} is unexpected for this sequence.`);return r.ticks[e.offsetIndex]}findNextInitializedTickIndex(t){const e=this.aToB?t:t+this.tickSpacing;let n=tS.fromTickIndex(e,this.tickSpacing);if(!this.isArrayIndexInBounds(n,this.aToB))throw new Error(`Swap input value traversed too many arrays. Out of bounds at attempt to traverse tick index - ${n.toTickIndex()}.`);for(;this.isArrayIndexInBounds(n,this.aToB);){const t=this.getTick(n.toTickIndex());if(t.initialized)return{nextIndex:n.toTickIndex(),nextTickData:t};n=this.aToB?n.toPrevInitializableTickIndex():n.toNextInitializableTickIndex()}return{nextIndex:Math.max(Math.min(this.aToB?n.toTickIndex()+this.tickSpacing:n.toTickIndex()-1,443636),-443636),nextTickData:null}}getLocalArrayIndex(t,e){return e?this.startArrayIndex-t:t-this.startArrayIndex}isArrayIndexInBounds(t,e){const n=this.getLocalArrayIndex(t.arrayIndex,e),r=this.sequence.length;return n>=0&&n=t&&e{try{const n=await PN({blockchain:"solana",address:t.pubkey.toString(),api:ZL,cache:10}),s=n.tokenMintA.toString()===e,u=await $L({pool:t.pubkey,freshWhirlpoolData:n,aToB:s}),c=new eS(u,n.tickSpacing,s),l=new rf(s?"4295048016":kL),h=!(!r&&!i);return{price:(({tokenAmount:t,aToB:e,freshWhirlpoolData:n,tickSequence:r,sqrtPriceLimit:i,amountSpecifiedIsInput:o})=>{let a=t,s=DL,u=n.sqrtPrice,c=n.liquidity,l=n.tickCurrentIndex,h=DL;const d=n.feeRate,f=n.protocolFeeRate;let p=new _L(0),y=e?n.feeGrowthGlobalA:n.feeGrowthGlobalB;for(;a.gt(DL)&&!i.eq(u);){let{nextIndex:t}=r.findNextInitializedTickIndex(l),{nextTickPrice:n,nextSqrtPriceLimit:m}=RL(t,i,e);const g=VL(a,d,c,u,m,o,e);h=h.add(g.feeAmount),o?(a=a.sub(g.amountIn),a=a.sub(g.feeAmount),s=s.add(g.amountOut)):(a=a.sub(g.amountOut),s=s.add(g.amountIn),s=s.add(g.feeAmount));let{nextProtocolFee:v,nextFeeGrowthGlobalInput:w}=GL(g.feeAmount,f,c,p,y);if(p=v,y=w,g.nextPrice.eq(n)){const n=r.getTick(t);n.initialized&&(c=HL(n.liquidityNet,c,e)),l=e?t-1:t}else l=LL.sqrtPriceX64ToTickIndex(g.nextPrice);u=g.nextPrice}return s})({tokenAmount:new rf((r||i||o||a).toString()),aToB:s,freshWhirlpoolData:n,tickSequence:c,sqrtPriceLimit:l,amountSpecifiedIsInput:h}).toString(),tickArrays:u,aToB:s,sqrtPriceLimit:l}}catch(t){return{price:void 0,tickArrays:void 0,aToB:void 0,sqrtPriceLimit:void 0}}};let rS=async(t,e)=>{if(e===Hf.solana.wrapped.address)return[];return await PN("solana://whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc/getProgramAccounts",{params:{filters:[{dataSize:ZL.span},{memcmp:{offset:8,bytes:"2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ"}},{memcmp:{offset:101,bytes:t}},{memcmp:{offset:181,bytes:e}}]},api:ZL,cache:86400,cacheKey:["whirlpool",t.toString(),e.toString()].join("-")})},iS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{try{let a=await rS(t,e);return 0===a.length&&(a=await rS(e,t)),a=a.filter((t=>t.data.liquidity.gt(1))),a=(await Promise.all(a.map((async a=>{const{price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l}=await nS({account:a,tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});return void 0!==s&&{pubkey:a.pubkey,price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l,data:{tokenVaultA:a.data.tokenVaultA,tokenVaultB:a.data.tokenVaultB}}})))).filter(Boolean),a}catch(t){return[]}},oS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{const a=await iS({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});if(!a||0===a.length)return;let s;return s=n||r?(t=>t.reduce(((t,e)=>Fp.from(e.price).gt(Fp.from(t.price))?e:t)))(a):(t=>t.reduce(((t,e)=>Fp.from(e.price).lt(Fp.from(t.price))?e:t)))(a),s};function aS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const sS=Hf.solana;let uS=({path:t})=>{if(!t)return;let e=t.map(((e,n)=>e===sS.currency.address&&t[n+1]!=sS.wrapped.address&&t[n-1]!=sS.wrapped.address?sS.wrapped.address:e));return e[0]==sS.currency.address&&e[1]==sS.wrapped.address?e.splice(0,1):e[e.length-1]==sS.currency.address&&e[e.length-2]==sS.wrapped.address&&e.splice(e.length-1,1),e},cS=async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})=>1!=t.length&&(t=uS({path:t}),(await iS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})).length>0),lS=async({path:t,amountIn:e,amountInMax:n})=>{let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[2],amountIn:e?r[1]:void 0,amountInMax:n?r[1]:void 0})).price)),r.length==t.length)return r},hS=async({path:t,amountOut:e,amountOutMin:n})=>{t=t.slice().reverse();let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[0],amountOut:e,amountOutMin:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[2],tokenOut:t[1],amountOut:e?r[1]:void 0,amountOutMin:n?r[1]:void 0})).price)),r.length==t.length)return r.slice().reverse()};const dS=Hf.solana,fS=new rf("14449647541112719096"),pS=new rf("16635068063392030915"),yS=async({instructions:t,owner:e,token:n,account:r})=>{let i;try{i=!!await PN({blockchain:"solana",address:r.toString()})}catch(t){}i||t.push(await Ak.solana.createAssociatedTokenAccountInstruction({token:n,owner:e,payer:e}))},mS=async({account:t,poolOne:e,tickArraysOne:n,tokenAccountOneA:r,tokenVaultOneA:i,tokenAccountOneB:o,tokenVaultOneB:a,poolTwo:s,tickArraysTwo:u,tokenAccountTwoA:c,tokenVaultTwoA:l,tokenAccountTwoB:h,tokenVaultTwoB:d})=>{let f=!1;const p=n.map(((t,e)=>!1!==f?n[f]:t.data?t:(f=e-1,n[e-1])));let y=!1;const m=u.map(((t,e)=>!1!==y?u[y]:t.data?t:(y=e-1,u[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(s.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(a.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(c.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(l.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(h.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(d.toString()),isWritable:!0,isSigner:!1},{pubkey:p[0].address,isWritable:!0,isSigner:!1},{pubkey:p[1].address,isWritable:!0,isSigner:!1},{pubkey:p[2].address,isWritable:!0,isSigner:!1},{pubkey:m[0].address,isWritable:!0,isSigner:!1},{pubkey:m[1].address,isWritable:!0,isSigner:!1},{pubkey:m[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(s.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},gS=({amount:t,otherAmountThreshold:e,amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a})=>{let s,u;return s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]),u=nf.alloc(s.span),s.encode({anchorDiscriminator:pS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a},u),u},vS=async({account:t,pool:e,tokenAccountA:n,tokenVaultA:r,tokenAccountB:i,tokenVaultB:o,tickArrays:a})=>{let s=!1;const u=a.map(((t,e)=>!1!==s?a[s]:t.data?t:(s=e-1,a[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(n.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:u[0].address,isWritable:!0,isSigner:!1},{pubkey:u[1].address,isWritable:!0,isSigner:!1},{pubkey:u[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},wS=({amount:t,otherAmountThreshold:e,sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i})=>{let o,a;return o=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]),a=nf.alloc(o.span),o.encode({anchorDiscriminator:fS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i},a),a};var bS={findPath:async({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o})=>{if([t,e].includes(sS.currency.address)&&[t,e].includes(sS.wrapped.address))return{path:void 0,exchangePath:void 0};let a,s,u,c;return await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?a=[t,e]:t!=sS.wrapped.address&&t!=sS.currency.address&&await cS({path:[t,sS.wrapped.address],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})&&e!=sS.wrapped.address&&e!=sS.currency.address&&await cS({path:[e,sS.wrapped.address],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?a=[t,sS.wrapped.address,e]:!sS.stables.usd.includes(t)&&(s=(await Promise.all(sS.stables.usd.map((async e=>await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?e:void 0)))).filter(Boolean))&&!sS.stables.usd.includes(e)&&(u=(await Promise.all(sS.stables.usd.map((async t=>await cS({path:[e,t],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?t:void 0)))).filter(Boolean))&&(c=s.filter((t=>u.includes(t)))[0])&&(a=[t,c,e]),aS([a,"optionalAccess",t=>t.length])&&a[0]==sS.currency.address?a.splice(1,0,sS.wrapped.address):aS([a,"optionalAccess",t=>t.length])&&a[a.length-1]==sS.currency.address&&a.splice(a.length-1,0,sS.wrapped.address),{path:a,exchangePath:uS({path:a})}},pathExists:cS,getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=uS({path:t}),r){if(s=await hS({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await lS({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await hS({path:t,amountOutMin:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await lS({path:t,amountInMax:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amounts:o,amountInInput:a,amountOutInput:s,amountInMaxInput:u,amountOutMinInput:c,account:l})=>{let h={blockchain:"solana"},d=[];const f=uS({path:t});if(f.length>3)throw"Orca can only handle fixed paths with a max length of 3 (2 pools)!";const p=f[0],y=3==f.length?f[1]:void 0,m=f[f.length-1];let g;2==f.length?g=[await oS({tokenIn:p,tokenOut:m,amountIn:a||u,amountOut:s||c})]:a||u?(g=[await oS({tokenIn:p,tokenOut:y,amountIn:a||u})],g.push(await oS({tokenIn:y,tokenOut:m,amountIn:g[0].price}))):(g=[await oS({tokenIn:y,tokenOut:m,amountOut:s||c})],g.unshift(await oS({tokenIn:p,tokenOut:y,amountOut:g[0].price})));let v,w=t[0]===dS.currency.address&&f[0]===dS.wrapped.address,b=t[t.length-1]===dS.currency.address&&f[f.length-1]===dS.wrapped.address;const M=await LN("solana");if(w||b){const t=await M.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span),n=Zl.generate();v=n.publicKey.toString();const r=w?new rf(e.toString()).add(new rf(t)):new rf(t);let i=Wu.createAccount({fromPubkey:new Xs(l),newAccountPubkey:new Xs(v),programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r});i.signers=[n],d.push(i),d.push(Ak.solana.initializeAccountInstruction({account:v,token:dS.wrapped.address,owner:l}))}if(1===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:h}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await vS({account:l,pool:g[0].pubkey,tokenAccountA:g[0].aToB?u:h,tokenVaultA:g[0].data.tokenVaultA,tokenAccountB:g[0].aToB?h:u,tokenVaultB:g[0].data.tokenVaultB,tickArrays:g[0].tickArrays}),data:wS({amount:o,otherAmountThreshold:s,sqrtPriceLimit:g[0].sqrtPriceLimit,amountSpecifiedIsInput:t,aToB:g[0].aToB})}))}else if(2===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=f[1],y=new Xs(await Ak.solana.findProgramAddress({owner:l,token:h}));await yS({instructions:d,owner:l,token:h,account:y});let M=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:M}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await mS({account:l,poolOne:g[0].pubkey,tickArraysOne:g[0].tickArrays,tokenAccountOneA:g[0].aToB?u:y,tokenVaultOneA:g[0].data.tokenVaultA,tokenAccountOneB:g[0].aToB?y:u,tokenVaultOneB:g[0].data.tokenVaultB,poolTwo:g[1].pubkey,tickArraysTwo:g[1].tickArrays,tokenAccountTwoA:g[1].aToB?y:M,tokenVaultTwoA:g[1].data.tokenVaultA,tokenAccountTwoB:g[1].aToB?M:y,tokenVaultTwoB:g[1].data.tokenVaultB}),data:gS({amount:o,otherAmountThreshold:s,amountSpecifiedIsInput:t,aToBOne:g[0].aToB,aToBTwo:g[1].aToB,sqrtPriceLimitOne:g[0].sqrtPriceLimit,sqrtPriceLimitTwo:g[1].sqrtPriceLimit})}))}return(w||b)&&d.push(Ak.solana.closeAccountInstruction({account:v,owner:l})),h.instructions=d,h},WHIRLPOOL_LAYOUT:ZL};const MS={name:"orca",label:"Orca",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjIuMCwgU1ZHIEV4cG9ydCBQb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LTkuOCw0LjEtMTQsMy44Yy00LjItMC4zLTExLjUtMS0xNy0zLjgKCUMzMjYsMTQ5LjIsMzIwLjUsMTQ1LjUsMzE4LjMsMTQyLjV6Ii8+Cjwvc3ZnPgo=",protocol:"orca",slippage:!0,blockchains:["solana"],solana:{router:{address:"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",api:bS.WHIRLPOOL_LAYOUT}}};var AS=t=>new gL(Object.assign(MS,{scope:t,findPath:t=>bS.findPath({...t,exchange:MS}),pathExists:t=>bS.pathExists({...t,exchange:MS}),getAmounts:t=>bS.getAmounts({...t,exchange:MS}),getPrep:t=>{},getTransaction:t=>bS.getTransaction({...t,exchange:MS})}));const NS={name:"pancakeswap",label:"PancakeSwap",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgMjEuOTUxNyA4NC4yMzg1QzI5LjgzNTkgNzYuNzEzMiAzOC41MzYzIDcxLjg5MzYgNDQuNTk0NSA2OS4xMjEzQzQzLjIyNDUgNjQuOTU5NCA0MS41MTUzIDU5LjUxMDggMzkuOTg2MSA1My44ODMyQzM3LjkzOTkgNDYuMzUyNyAzNS45MzI1IDM3LjUxNzQgMzUuOTMyNSAzMS4wNDI5QzM1LjkzMjUgMjMuMzc5NSAzNy42MjA0IDE1LjY4MzMgNDIuMTcxNCA5Ljc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sc:{router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:IL.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:IL.FACTORY},pair:{api:IL.PAIR}}};var IS=t=>new gL(Object.assign(NS,{scope:t,findPath:t=>IL.findPath({...t,exchange:NS}),pathExists:t=>IL.pathExists({...t,exchange:NS}),getAmounts:t=>IL.getAmounts({...t,exchange:NS}),getPrep:t=>IL.getPrep({...t,exchange:NS}),getTransaction:t=>IL.getTransaction({...t,exchange:NS})}));function ES(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const xS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},kS=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=xS({blockchain:t,exchange:e,path:n})).length>2)throw"PancakeSwap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;return n=r?await(async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:e,pool:t,inputAmount:r}):await(async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:e,pool:t,outputAmount:i}),{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let TS=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,LS=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var SS={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await kS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return ES([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):ES([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:xS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await kS({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i,tokenOut:o})=>{if(n===Hf[e].currency.address)return;let a;a=o===Hf[e].currency.address?t[e].smartRouter.address:t[e].router.address;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,a]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[a,Hf[e].maxInt]}}}},getTransaction:async({blockchain:t,exchange:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d,inputTokenPushed:f})=>{const p={blockchain:t,from:d},y=Math.floor(Date.now()/1e3)+21600,m=xS({blockchain:t,exchange:e,path:r});if(r[r.length-1]===Hf[t].currency.address){p.to=e[t].smartRouter.address,p.api=e[t].smartRouter.api,p.method="multicall";const r=new Og(e[t].smartRouter.api);if(p.params={data:[]},2===m.length)u||h?p.params.data.push(r.encodeFunctionData("exactInputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}]));else{const d=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?p.params.data.push(r.encodeFunctionData("exactInput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}]))}p.params.data.push(r.encodeFunctionData("unwrapWETH9",[(s||a).toString(),d]))}else if(p.to=e[t].router.address,p.api=e[t].router.api,r[0]===Hf[t].currency.address&&(p.value=(i||o).toString()),2===m.length)u||h?(p.method="exactInputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}}):(c||l)&&(p.method="exactOutputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}});else{const t=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?(p.method="exactInput",p.params={params:{path:t,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}}):(c||l)&&(p.method="exactOutput",p.params={params:{path:t,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}})}return p},ROUTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct ISwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct ISwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],SMART_ROUTER:[{inputs:[{internalType:"address",name:"_factoryV2",type:"address"},{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factoryV3",type:"address"},{internalType:"address",name:"_positionManager",type:"address"},{internalType:"address",name:"_stableFactory",type:"address"},{internalType:"address",name:"_stableInfo",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"factory",type:"address"},{indexed:!0,internalType:"address",name:"info",type:"address"}],name:"SetStableSwap",type:"event"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"data",type:"bytes"}],name:"callPositionManager",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"paths",type:"bytes[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactInputStableSwap",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactOutputStableSwap",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factoryV2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"getApprovalType",outputs:[{internalType:"enum IApproveAndCall.ApprovalType",name:"",type:"uint8"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"}],internalType:"struct IApproveAndCall.IncreaseLiquidityParams",name:"params",type:"tuple"}],name:"increaseLiquidity",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],internalType:"struct IApproveAndCall.MintParams",name:"params",type:"tuple"}],name:"mint",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"previousBlockhash",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"positionManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"pull",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_info",type:"address"}],name:"setStableSwap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stableSwapFactory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"stableSwapInfo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"wrapETH",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_poolDeployer",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"bool",name:"whitelistRequested",type:"bool"},{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"FeeAmountExtraInfoUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"lmPoolDeployer",type:"address"}],name:"SetLmPoolDeployer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"verified",type:"bool"}],name:"WhiteListAdded",type:"event"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacingExtraInfo",outputs:[{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPoolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"poolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],name:"setFeeAmountExtraInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPoolDeployer",type:"address"}],name:"setLmPoolDeployer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"verified",type:"bool"}],name:"setWhiteListAddress",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint32",name:"feeProtocol0Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol0New",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1New",type:"uint32"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"addr",type:"address"}],name:"SetLmPoolEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken1",type:"uint128"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPool",outputs:[{internalType:"contract IPancakeV3LmPool",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint32",name:"feeProtocol",type:"uint32"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]};const jS={name:"pancakeswap_v3",label:"PancakeSwap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgMjEuOTUxNyA4NC4yMzg1QzI5LjgzNTkgNzYuNzEzMiAzOC41MzYzIDcxLjg5MzYgNDQuNTk0NSA2OS4xMjEzQzQzLjIyNDUgNjQuOTU5NCA0MS41MTUzIDU5LjUxMDggMzkuOTg2MSA1My44ODMyQzM3LjkzOTkgNDYuMzUyNyAzNS45MzI1IDM3LjUxNzQgMzUuOTMyNSAzMS4wNDI5QzM1LjkzMjUgMjMuMzc5NSAzNy42MjA0IDE1LjY4MzMgNDIuMTcxNCA5LjcwMzA2QzQ2Ljk3OTcgMy4zODQ3NiA1NC4yMTgyIDAgNjIuOTI2NCAwQzY5LjczMjIgMCA3NS41MTAzIDIuNDk5MDMgODAuMDMzOSA2LjgxMDExQzg0LjM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uMDczNCAxODkuMzYyIDk4LjY5MzEgMTg5LjM2MkMxNTUuMzEzIDE4OS4zNjIgMTg2LjAxOCAxNjIuNTAzIDE4Ni4wMTggMTI2Ljg3MUMxODYuMDE4IDEyNi44MjYgMTg2LjAxOCAxMjYuNzgxIDE4Ni4wMTggMTI2LjczN0MxODUuOTQ2IDE1NS41MiAxNDAuMjMxIDE3Ny43NTUgOTguNjkzMSAxNzcuNzU1WiIgZmlsbD0iI0ZFREM5MCIvPgo8cGF0aCBkPSJNNzUuNjEzNSAxMTcuODk2Qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"pancakeswap_v3",slippage:!0,fees:[100,500,2500,1e4],blockchains:["bsc"],bsc:{router:{address:"0x1b81D678ffb9C0263b24A97847620C99d213eB14",api:SS.ROUTER},smartRouter:{address:"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4",api:SS.SMART_ROUTER},factory:{address:"0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865",api:SS.FACTORY},pair:{api:SS.POOL},quoter:{address:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",api:SS.QUOTER}}};var CS=t=>new gL(Object.assign(jS,{scope:t,findPath:t=>SS.findPath({...t,exchange:jS}),pathExists:t=>SS.pathExists({...t,exchange:jS}),getAmounts:t=>SS.getAmounts({...t,exchange:jS}),getPrep:t=>SS.getPrep({...t,exchange:jS}),getTransaction:t=>SS.getTransaction({...t,exchange:jS})}));const DS={name:"quickswap",label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIj48cmVjdCB3aWR0aD0iNzUwIiBoZWlnaHQ9Ijc1MCIgZmlsbD0ibm9uZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj48cGF0aCBkPSJNMzU0Ljc0LDI0LjM3YTM1MS4yNywzNTEuMjcsMCwwLDEsMzYzLjc0LDI3NywzNTQsMzU0LDAsMCwxLDEuMjMsMTQxLjI2QTM1MS43NiwzNTEuNzYsMCwwLDEsNTEwLjEyLDY5OS4zYy03My43NywzMS0xNTguMjUsMzUuMzUtMjM0LjkxLDEyLjU0QTM1MiwzNTIsMCwwLDEsNDYuNTEsNDk5LjU2Yy0yOC03My40NS0zMC4xNi0xNTYuMzgtNi4yNC0yMzEuMjVBMzUwLjg4LDM1MC44OCwwLDAsMSw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yMTQsMjE0LDAsMCwwLDYxLjYxLTM0LjY3YzE4LjA5LTE0LjY4LDMzLjY2LTMxLjUzLDQ0LjA2LTUyLjYxYTEwMS4zNiwxMDEuMzYsMCwwLDAsMTAuMjItMzZjMS0xMS4zMS0uODgtMjItMy45NS0zMi42NC4zNC0yLjYxLDIuNzItMy44LDQuMTEtNS42Myw1LjM4LTcuMDcsOS4zNS0xNC42OSwxMS0yMy40NmEyNy40MywyNy40MywwLDAsMSwxLjIxLTMuNDMsMTExLDExMSwwLDAsMSw4LDIxLjE2YzIuNjMsMTAuMzEsNC4xMSwyMC44LDMuMzMsMzEuNGExMjMuMzEsMTIzLjMxLDAsMCwxLTE2LjA2LDUyLjMyYy05LjE2LDE2LjE1LTIxLDMwLTM0LjYsNDIuMzdhMTk5Ljg5LDE5OS44OSwwLDAsMS0zOS4zNywyNy41NCwyMTkuNSwyMTkuNSwwLDAsMS01NC4yNiwyMC43MSwyMDkuMjcsMjA5LjI3LDAsMCwxLTM2LjA1LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",protocol:"uniswap_v2",slippage:!0,blockchains:["polygon"],polygon:{router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:IL.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:IL.FACTORY},pair:{api:IL.PAIR}}};var OS=t=>new gL(Object.assign(DS,{scope:t,findPath:t=>IL.findPath({...t,exchange:DS}),pathExists:t=>IL.pathExists({...t,exchange:DS}),getAmounts:t=>IL.getAmounts({...t,exchange:DS}),getPrep:t=>IL.getPrep({...t,exchange:DS}),getTransaction:t=>IL.getTransaction({...t,exchange:DS})}));const zS={name:"spookyswap",label:"SpookySwap",logo:"data:image/svg+xml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xOC45Yy0yLjYsNy4yLTkuMSwyNS40LTkuMSwyNS40CgkJUzIxOC44LDI4OCwzMjIuNSwyODhjNjIuNiwwLDEyNC42LDUuMiwxODYuNSwxNS43YzAsMC05LjEtMjIuMi0xNS0zMS4zQzQ5MC43LDI2Ny4yLDQ4Ny41LDI2MS4zLDQ4My41LDI1Ni4xTDQ4My41LDI1Ni4xeiIvPgoJPHBhdGggZmlsbD0iI0ZGRTYwMCIgZD0iTTEzMy4zLDEzMS41YzYuNS0wLjcsMTUuNywxOS42LDE1LjcsMTkuNnMyMC45LTUuOSwyNC44LDBjMy4zLDUuOS0xNSwxOS42LTE1LDE5LjZzMTEuMSwxOS42LDcuMiwyMy41CgkJYy0zLjMsMy45LTIyLjgtOC41LTIyLjgtOC41cy0xNSwxNy0xOS42LDE0LjNjLTUuMi0yLjYsMC43LTI0LjgsMC43LTI0LjhzLTIxLjUtOS4xLTE5LjYtMTQuM2MxLjMtNS4yLDIzLjUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",protocol:"uniswap_v2",slippage:!0,blockchains:["fantom"],fantom:{router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:IL.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:IL.FACTORY},pair:{api:IL.PAIR}}};var PS=t=>new gL(Object.assign(zS,{scope:t,findPath:t=>IL.findPath({...t,exchange:zS}),pathExists:t=>IL.pathExists({...t,exchange:zS}),getAmounts:t=>IL.getAmounts({...t,exchange:zS}),getPrep:t=>IL.getPrep({...t,exchange:zS}),getTransaction:t=>IL.getTransaction({...t,exchange:zS})}));function _S(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const BS=({blockchain:t,path:e})=>{if(!e)return;let n=e.map(((n,r)=>n===Hf[t].currency.address&&e[r+1]!=Hf[t].wrapped.address&&e[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:n));return n[0]==Hf[t].currency.address&&n[1]==Hf[t].wrapped.address?n.splice(0,1):n[n.length-1]==Hf[t].currency.address&&n[n.length-2]==Hf[t].wrapped.address&&n.splice(n.length-1,1),n},RS=async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,block:o})=>{let a;if(n=BS({blockchain:e,path:n}),a=r?await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountIn:r}}).catch((()=>{})):await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountOut:i}}).catch((()=>{})),a&&!a.virtualAmountsWithoutSlippage.some((t=>"0"===t.toString())))return a};let US=async({exchange:t,blockchain:e,path:n,pools:r,amountIn:i})=>{let o=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,params:{route:BS({blockchain:e,path:n}),amountIn:i}}).catch((()=>{}));if(o)return o.virtualAmountsWithoutSlippage[o.virtualAmountsWithoutSlippage.length-1]},QS=async({exchange:t,blockchain:e,path:n,pools:r,amountOut:i,block:o})=>{let a=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:BS({blockchain:e,path:n}),amountOut:i}}).catch((()=>{}));if(a)return a.virtualAmountsWithoutSlippage[0]};var YS={findPath:async({exchange:t,blockchain:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[e].currency.address)&&[n,r].includes(Hf[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await RS({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[e].wrapped.address||r==Hf[e].wrapped.address||(c=[],o||s?(c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length&&(u=[n,Hf[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return _S([u,"optionalAccess",t=>t.length])&&u[0]==Hf[e].currency.address?u.splice(1,0,Hf[e].wrapped.address):_S([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[e].currency.address&&u.splice(u.length-1,0,Hf[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:BS({blockchain:e,path:u})}},pathExists:async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>!!await RS({exchange:t,blockchain:e,path:n,amountIn:r||o,amountOut:i||a}),getAmounts:async({exchange:t,blockchain:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getTransaction:async({exchange:t,blockchain:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d})=>{const f={blockchain:e,from:d,to:t[e].router.address,api:t[e].router.api},p=Math.round(Date.now()/1e3)+86400,y=[n.map((t=>t.binSteps[0])),n.map((t=>t.versions[0])),BS({blockchain:e,path:r})];return r[0]===Hf[e].currency.address?l?(f.method="swapNATIVEForExactTokens",f.params={amountOut:a,path:y,to:d,deadline:p},f.value=o):(f.method="swapExactNATIVEForTokens",f.params={amountOutMin:s||a,path:y,to:d,deadline:p},f.value=i):r[r.length-1]===Hf[e].currency.address?l?(f.method="swapTokensForExactNATIVE",f.params={amountNATIVEOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForNATIVE",f.params={amountIn:i,amountOutMinNATIVE:s||a,path:y,to:d,deadline:p}):l?(f.method="swapTokensForExactTokens",f.params={amountOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForTokens",f.params={amountIn:i,amountOutMin:s||a,path:y,to:d,deadline:p}),f},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},ROUTER:[{inputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"},{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"},{internalType:"contract ILBLegacyFactory",name:"legacyFactory",type:"address"},{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"},{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[{internalType:"uint256",name:"amountSlippage",type:"uint256"}],name:"LBRouter__AmountSlippageBPTooBig",type:"error"},{inputs:[{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],name:"LBRouter__AmountSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__BinReserveOverflows",type:"error"},{inputs:[],name:"LBRouter__BrokenSwapSafetyCheck",type:"error"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"currentTimestamp",type:"uint256"}],name:"LBRouter__DeadlineExceeded",type:"error"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBRouter__FailedToSendNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"idDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"}],name:"LBRouter__IdDesiredOverflows",type:"error"},{inputs:[{internalType:"int256",name:"id",type:"int256"}],name:"LBRouter__IdOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"uint256",name:"activeId",type:"uint256"}],name:"LBRouter__IdSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"LBRouter__InsufficientAmountOut",type:"error"},{inputs:[{internalType:"address",name:"wrongToken",type:"address"}],name:"LBRouter__InvalidTokenPath",type:"error"},{inputs:[{internalType:"uint256",name:"version",type:"uint256"}],name:"LBRouter__InvalidVersion",type:"error"},{inputs:[],name:"LBRouter__LengthsMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"LBRouter__MaxAmountInExceeded",type:"error"},{inputs:[],name:"LBRouter__NotFactoryOwner",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBRouter__PairNotCreated",type:"error"},{inputs:[],name:"LBRouter__SenderIsNotWNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__SwapOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"excess",type:"uint256"}],name:"LBRouter__TooMuchTokensIn",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"reserve",type:"uint256"}],name:"LBRouter__WrongAmounts",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"msgValue",type:"uint256"}],name:"LBRouter__WrongNativeLiquidityParameters",type:"error"},{inputs:[],name:"LBRouter__WrongTokenOrder",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"lbFactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactory",outputs:[{internalType:"contract ILBLegacyFactory",name:"legacyLBfactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouter",outputs:[{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getV1Factory",outputs:[{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWNATIVE",outputs:[{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountNATIVEMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountNATIVE",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVE",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVESupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNATIVEForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountNATIVEOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactNATIVE",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"sweep",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBToken",name:"lbToken",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"sweepLBToken",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"feeRecipient",type:"address"},{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"LBFactory__AddressZero",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepHasNoPreset",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepTooLow",type:"error"},{inputs:[{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"uint256",name:"maxFees",type:"uint256"}],name:"LBFactory__FlashLoanFeeAboveMax",type:"error"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"LBFactory__IdenticalAddresses",type:"error"},{inputs:[],name:"LBFactory__ImplementationNotSet",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"_binStep",type:"uint256"}],name:"LBFactory__LBPairAlreadyExists",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairDoesNotExist",type:"error"},{inputs:[],name:"LBFactory__LBPairIgnoredIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairNotCreated",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__LBPairSafetyCheckFailed",type:"error"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__PresetIsLockedForUsers",type:"error"},{inputs:[],name:"LBFactory__PresetOpenStateIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetAlreadyWhitelisted",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetNotWhitelisted",type:"error"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"LBFactory__SameFeeRecipient",type:"error"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"LBFactory__SameFlashLoanFee",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__SameImplementation",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"PendingOwnable__AddressZero",type:"error"},{inputs:[],name:"PendingOwnable__NoPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__PendingOwnerAlreadySet",type:"error"},{inputs:[],name:"SafeCast__Exceeds16Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldRecipient",type:"address"},{indexed:!1,internalType:"address",name:"newRecipient",type:"address"}],name:"FeeRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldFlashLoanFee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newFlashLoanFee",type:"uint256"}],name:"FlashLoanFeeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"tokenX",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenY",type:"address"},{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"uint256",name:"pid",type:"uint256"}],name:"LBPairCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"bool",name:"ignored",type:"bool"}],name:"LBPairIgnoredStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldLBPairImplementation",type:"address"},{indexed:!1,internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBPairImplementationSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"PendingOwnerSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!0,internalType:"bool",name:"isOpen",type:"bool"}],name:"PresetOpenStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"}],name:"PresetRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"uint256",name:"baseFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"filterPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"decayPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"reductionFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"variableFeeControl",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolShare",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"}],name:"PresetSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetRemoved",type:"event"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"addQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"becomeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllBinSteps",outputs:[{internalType:"uint256[]",name:"binStepWithPreset",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"}],name:"getAllLBPairs",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation[]",name:"lbPairsAvailable",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeRecipient",outputs:[{internalType:"address",name:"feeRecipient",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFlashLoanFee",outputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getLBPairAtIndex",outputs:[{internalType:"contract ILBPair",name:"lbPair",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLBPairImplementation",outputs:[{internalType:"address",name:"lbPairImplementation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenA",type:"address"},{internalType:"contract IERC20",name:"tokenB",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getLBPairInformation",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation",name:"lbPairInformation",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxFlashLoanFee",outputs:[{internalType:"uint256",name:"maxFee",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getMinBinStep",outputs:[{internalType:"uint256",name:"minBinStep",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getNumberOfLBPairs",outputs:[{internalType:"uint256",name:"lbPairNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumberOfQuoteAssets",outputs:[{internalType:"uint256",name:"numberOfQuoteAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOpenBinSteps",outputs:[{internalType:"uint256[]",name:"openBinStep",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getPreset",outputs:[{internalType:"uint256",name:"baseFactor",type:"uint256"},{internalType:"uint256",name:"filterPeriod",type:"uint256"},{internalType:"uint256",name:"decayPeriod",type:"uint256"},{internalType:"uint256",name:"reductionFactor",type:"uint256"},{internalType:"uint256",name:"variableFeeControl",type:"uint256"},{internalType:"uint256",name:"protocolShare",type:"uint256"},{internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"},{internalType:"bool",name:"isOpen",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getQuoteAssetAtIndex",outputs:[{internalType:"contract IERC20",name:"asset",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isQuoteAsset",outputs:[{internalType:"bool",name:"isQuote",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"}],name:"removePreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"removeQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"revokePendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"setFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setFeesParametersOnPair",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"setFlashLoanFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"ignored",type:"bool"}],name:"setLBPairIgnored",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newLBPairImplementation",type:"address"}],name:"setLBPairImplementation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner_",type:"address"}],name:"setPendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPresetOpenState",outputs:[],stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[{internalType:"contract ILBFactory",name:"factory_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"BinHelper__CompositionFactorFlawed",type:"error"},{inputs:[],name:"BinHelper__LiquidityOverflow",type:"error"},{inputs:[],name:"FeeHelper__FeeTooLarge",type:"error"},{inputs:[],name:"LBPair__AddressZero",type:"error"},{inputs:[],name:"LBPair__AlreadyInitialized",type:"error"},{inputs:[],name:"LBPair__EmptyMarketConfigs",type:"error"},{inputs:[],name:"LBPair__FlashLoanCallbackFailed",type:"error"},{inputs:[],name:"LBPair__FlashLoanInsufficientAmount",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountIn",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountOut",type:"error"},{inputs:[],name:"LBPair__InvalidInput",type:"error"},{inputs:[],name:"LBPair__InvalidStaticFeeParameters",type:"error"},{inputs:[],name:"LBPair__MaxTotalFeeExceeded",type:"error"},{inputs:[],name:"LBPair__OnlyFactory",type:"error"},{inputs:[],name:"LBPair__OnlyProtocolFeeRecipient",type:"error"},{inputs:[],name:"LBPair__OutOfLiquidity",type:"error"},{inputs:[],name:"LBPair__TokenNotSupported",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmountsOut",type:"error"},{inputs:[],name:"LBPair__ZeroBorrowAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroShares",type:"error"},{inputs:[],name:"LBToken__AddressThisOrZero",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__BurnExceedsBalance",type:"error"},{inputs:[],name:"LBToken__InvalidLength",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"LBToken__SelfApproval",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"LBToken__SpenderNotApproved",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__TransferExceedsBalance",type:"error"},{inputs:[],name:"LiquidityConfigurations__InvalidConfig",type:"error"},{inputs:[],name:"OracleHelper__InvalidOracleId",type:"error"},{inputs:[],name:"OracleHelper__LookUpTimestampTooOld",type:"error"},{inputs:[],name:"OracleHelper__NewLengthTooSmall",type:"error"},{inputs:[],name:"PackedUint128Math__AddOverflow",type:"error"},{inputs:[],name:"PackedUint128Math__MultiplierTooLarge",type:"error"},{inputs:[],name:"PackedUint128Math__SubUnderflow",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"ReentrancyGuard__ReentrantCall",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds40Bits",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[],name:"Uint128x128Math__LogUnderflow",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"feeRecipient",type:"address"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CollectedProtocolFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CompositionFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"DepositedToBins",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{indexed:!1,internalType:"uint24",name:"activeId",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amounts",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"idReference",type:"uint24"},{indexed:!1,internalType:"uint24",name:"volatilityReference",type:"uint24"}],name:"ForcedDecay",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"oracleLength",type:"uint16"}],name:"OracleLengthIncreased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"baseFactor",type:"uint16"},{indexed:!1,internalType:"uint16",name:"filterPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"decayPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"reductionFactor",type:"uint16"},{indexed:!1,internalType:"uint24",name:"variableFeeControl",type:"uint24"},{indexed:!1,internalType:"uint16",name:"protocolShare",type:"uint16"},{indexed:!1,internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"StaticFeeParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amountsIn",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"amountsOut",type:"bytes32"},{indexed:!1,internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"WithdrawnFromBins",type:"event"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"approveForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"batchBalances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"batchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amountsToBurn",type:"uint256[]"}],name:"burn",outputs:[{internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"collectProtocolFees",outputs:[{internalType:"bytes32",name:"collectedProtocolFees",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{internalType:"bytes32",name:"amounts",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getActiveId",outputs:[{internalType:"uint24",name:"activeId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getBin",outputs:[{internalType:"uint128",name:"binReserveX",type:"uint128"},{internalType:"uint128",name:"binReserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBinStep",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"id",type:"uint24"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getNextNonEmptyBin",outputs:[{internalType:"uint24",name:"nextId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOracleParameters",outputs:[{internalType:"uint8",name:"sampleLifetime",type:"uint8"},{internalType:"uint16",name:"size",type:"uint16"},{internalType:"uint16",name:"activeSize",type:"uint16"},{internalType:"uint40",name:"lastUpdated",type:"uint40"},{internalType:"uint40",name:"firstTimestamp",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint40",name:"lookupTimestamp",type:"uint40"}],name:"getOracleSampleAt",outputs:[{internalType:"uint64",name:"cumulativeId",type:"uint64"},{internalType:"uint64",name:"cumulativeVolatility",type:"uint64"},{internalType:"uint64",name:"cumulativeBinCrossed",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"price",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getProtocolFees",outputs:[{internalType:"uint128",name:"protocolFeeX",type:"uint128"},{internalType:"uint128",name:"protocolFeeY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReserves",outputs:[{internalType:"uint128",name:"reserveX",type:"uint128"},{internalType:"uint128",name:"reserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStaticFeeParameters",outputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenX",outputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getTokenY",outputs:[{internalType:"contract IERC20",name:"tokenY",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVariableFeeParameters",outputs:[{internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"volatilityReference",type:"uint24"},{internalType:"uint24",name:"idReference",type:"uint24"},{internalType:"uint40",name:"timeOfLastUpdate",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"newLength",type:"uint16"}],name:"increaseOracleLength",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"activeId",type:"uint24"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bytes32[]",name:"liquidityConfigs",type:"bytes32[]"},{internalType:"address",name:"refundTo",type:"address"}],name:"mint",outputs:[{internalType:"bytes32",name:"amountsReceived",type:"bytes32"},{internalType:"bytes32",name:"amountsLeft",type:"bytes32"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setStaticFeeParameters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"address",name:"to",type:"address"}],name:"swap",outputs:[{internalType:"bytes32",name:"amountsOut",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"factoryV1",type:"address"},{internalType:"address",name:"legacyFactoryV2",type:"address"},{internalType:"address",name:"factoryV2",type:"address"},{internalType:"address",name:"legacyRouterV2",type:"address"},{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"JoeLibrary__AddressZero",type:"error"},{inputs:[],name:"JoeLibrary__IdenticalAddresses",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[],name:"LBQuoter_InvalidLength",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountIn",type:"uint128"}],name:"findBestPathFromAmountIn",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountOut",type:"uint128"}],name:"findBestPathFromAmountOut",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV1",outputs:[{internalType:"address",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV2",outputs:[{internalType:"address",name:"factoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactoryV2",outputs:[{internalType:"address",name:"legacyFactoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouterV2",outputs:[{internalType:"address",name:"legacyRouterV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRouterV2",outputs:[{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"view",type:"function"}]};const WS={name:"trader_joe_v2_1",label:"Trader Joe v2.1",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABvCAYAAAA0YEQFAAABAGlDQ1BpY2MAABiVY2BgPMEABCwGDAy5eSVFQe5OChGRUQrsDxgYgRAMEpOLCxhwA6Cqb9cgai/r4lGHC3CmpBYnA+kPQKxSBLQcaKQIkC2SDmFrgNhJELYNiF1eUlACZAeA2EUhQc5AdgqQrZGOxE5CYicXFIHU9wDZNrk5pckIdzPwpOaFBgNpDiCWYShmCGJwZ3AC+R+iJH8RA4PFVwYG5gkIsaSZDAzbWxkYJG4hxFQWMDDwtzAwbDuPEEOESUFiUSJYiAWImdLSGBg+LWdg4I1kYBC+wMDAFQ0LCBxuUwC7zZ0hHwjTGXIYUoEingx5DMkMekCWEYMBgyGDGQCm1j8/yRb+6wAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAABPXpUWHRSYXcgcHJvZmlsZSB0eXBlIGljYwA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fs1ABdpIkIvfPvbfZxKbSPGHZbVbQTZAivLiFBkJo+Vw6QdUo4TPfbA9eClU/AyGSjPjYupX3hqa+0nXdf9D0vV19cAvEyLnRj6kUceSS3TQTFs8hqxwRom3iZMNzLzBlZ6kB2voBydUo6rteOSk/LIy+bgpqIHcVE71v1nDz/88AfvvYKdR1fSXgPwKlpUCBDuULGYb6bTA47COiu8iR21WbFew1qvIKX7tdY5N51yUpksa9edViZ8pzcwcEW10C7XXgNwaVvkldq/X50ENHp6Us1qNQMgT46TMlapdCbtmGZ1dOOuXWeW5ILX+o5/TFprnBMfLC2RP/T/B96QkmdPWpSQAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA3LTA3VDA5OjE5OjA4KzAwOjAwC8IICQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNy0wN1QwOToxOTowOCswMDowMHqfsLUAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjMtMDctMDdUMDk6MTk6MDgrMDA6MDAtipFqAAAAHnRFWHRpY2M6Y29weXJpZ2h0AEdvb2dsZSBJbmMuIDIwMTasCzM4AAAAFHRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQrqQcwcAAAAASUVORK5CYII=",protocol:"trader_joe_v2_1",slippage:!0,blockchains:["avalanche"],avalanche:{router:{address:"0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30",api:YS.ROUTER},factory:{address:"0x8e42f2F4101563bF679975178e880FD87d3eFd4e",api:YS.FACTORY},pair:{api:YS.PAIR},quoter:{address:"0x64b57F4249aA99a812212cee7DAEFEDC40B203cD",api:YS.QUOTER}}};var FS=t=>new gL(Object.assign(WS,{scope:t,findPath:t=>YS.findPath({...t,exchange:WS}),pathExists:t=>YS.pathExists({...t,exchange:WS}),getAmounts:t=>YS.getAmounts({...t,exchange:WS}),getPrep:t=>YS.getPrep({...t,exchange:WS}),getTransaction:t=>YS.getTransaction({...t,exchange:WS})}));const VS={name:"uniswap_v2",label:"Uniswap v2",logo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TIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["ethereum"],ethereum:{router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:IL.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:IL.FACTORY},pair:{api:IL.PAIR}}};var HS=t=>new gL(Object.assign(VS,{scope:t,findPath:t=>IL.findPath({...t,exchange:VS}),pathExists:t=>IL.pathExists({...t,exchange:VS}),getAmounts:t=>IL.getAmounts({...t,exchange:VS}),getPrep:t=>IL.getPrep({...t,exchange:VS}),getTransaction:t=>IL.getTransaction({...t,exchange:VS})}));function GS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const qS="0x0000000000000000000000000000000000000001",ZS="0x0000000000000000000000000000000000000002",JS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},XS=async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn,KS=async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut,$S=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=JS({blockchain:t,exchange:e,path:n})).length>2)throw"Uniswap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;if(r){n=await KS({exchange:e,pool:t,inputAmount:r});const i=await KS({exchange:e,pool:t,inputAmount:Fp.from(r).mul(Fp.from(10)).toString()}),o=i.div(Fp.from(10)).sub(n).abs();if(!!o.gt(n.div(Fp.from(100))))return}else{n=await XS({exchange:e,pool:t,outputAmount:i});const r=await XS({exchange:e,pool:t,outputAmount:Fp.from(i).mul(Fp.from(10)).toString()}),o=r.div(Fp.from(10)).sub(n).abs();if(!!o.gt(n.div(Fp.from(100))))return}return{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let tj=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,ej=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var nj={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await $S({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await $S({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await $S({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await $S({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await $S({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await $S({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await $S({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await $S({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await $S({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return GS([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):GS([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:JS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await $S({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await ej({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await tj({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await ej({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await tj({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].permit.address]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].permit.address,Hf[e].maxInt]}}}{const o=await PN({blockchain:e,address:t[e].permit.address,method:"allowance",api:t[e].permit.api,params:[i,n,t[e].router.address]});if(o.amount.lt(r)||o.expiration-1800{let y,m=[],g=[],v="0";if(f){const t=Tp(f.signature).length;let e;65!==t&&64!==t||(e=function(t){return Dp(Lp([(t=Rp(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}(Rp(f.signature))),m.push("0a"),g.push(_m.encode(["((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)","bytes"],[f,e]))}r[0]===Hf[t].currency.address&&(m.push("0b"),g.push(_m.encode(["address","uint256"],[ZS,(i||o).toString()])),v=(i||o).toString()),1===n.length?y=oN(["address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1]]):2===n.length&&(y=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]])),h||u?(m.push("00"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(i||o).toString(),(a||s).toString(),y,r[0]!==Hf[t].currency.address&&!p]))):(m.push("01"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(a||s).toString(),(i||o).toString(),y,r[0]!==Hf[t].currency.address&&!p]))),r[r.length-1]===Hf[t].currency.address&&(m.push("0c"),g.push(_m.encode(["address","uint256"],[qS,(a||s).toString()])));return{blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api,method:"execute",params:{commands:`0x${m.join("")}`,inputs:g},value:v}},ROUTER:[{inputs:[{components:[{internalType:"address",name:"permit2",type:"address"},{internalType:"address",name:"weth9",type:"address"},{internalType:"address",name:"seaportV1_5",type:"address"},{internalType:"address",name:"seaportV1_4",type:"address"},{internalType:"address",name:"openseaConduit",type:"address"},{internalType:"address",name:"nftxZap",type:"address"},{internalType:"address",name:"x2y2",type:"address"},{internalType:"address",name:"foundation",type:"address"},{internalType:"address",name:"sudoswap",type:"address"},{internalType:"address",name:"elementMarket",type:"address"},{internalType:"address",name:"nft20Zap",type:"address"},{internalType:"address",name:"cryptopunks",type:"address"},{internalType:"address",name:"looksRareV2",type:"address"},{internalType:"address",name:"routerRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareToken",type:"address"},{internalType:"address",name:"v2Factory",type:"address"},{internalType:"address",name:"v3Factory",type:"address"},{internalType:"bytes32",name:"pairInitCodeHash",type:"bytes32"},{internalType:"bytes32",name:"poolInitCodeHash",type:"bytes32"}],internalType:"struct RouterParameters",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BalanceTooLow",type:"error"},{inputs:[],name:"BuyPunkFailed",type:"error"},{inputs:[],name:"ContractLocked",type:"error"},{inputs:[],name:"ETHNotAccepted",type:"error"},{inputs:[{internalType:"uint256",name:"commandIndex",type:"uint256"},{internalType:"bytes",name:"message",type:"bytes"}],name:"ExecutionFailed",type:"error"},{inputs:[],name:"FromAddressIsNotOwner",type:"error"},{inputs:[],name:"InsufficientETH",type:"error"},{inputs:[],name:"InsufficientToken",type:"error"},{inputs:[],name:"InvalidBips",type:"error"},{inputs:[{internalType:"uint256",name:"commandType",type:"uint256"}],name:"InvalidCommandType",type:"error"},{inputs:[],name:"InvalidOwnerERC1155",type:"error"},{inputs:[],name:"InvalidOwnerERC721",type:"error"},{inputs:[],name:"InvalidPath",type:"error"},{inputs:[],name:"InvalidReserves",type:"error"},{inputs:[],name:"InvalidSpender",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[],name:"SliceOutOfBounds",type:"error"},{inputs:[],name:"TransactionDeadlinePassed",type:"error"},{inputs:[],name:"UnableToClaim",type:"error"},{inputs:[],name:"UnsafeCast",type:"error"},{inputs:[],name:"V2InvalidPath",type:"error"},{inputs:[],name:"V2TooLittleReceived",type:"error"},{inputs:[],name:"V2TooMuchRequested",type:"error"},{inputs:[],name:"V3InvalidAmountOut",type:"error"},{inputs:[],name:"V3InvalidCaller",type:"error"},{inputs:[],name:"V3InvalidSwap",type:"error"},{inputs:[],name:"V3TooLittleReceived",type:"error"},{inputs:[],name:"V3TooMuchRequested",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardsSent",type:"event"},{inputs:[{internalType:"bytes",name:"looksRareClaim",type:"bytes"}],name:"collectRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"parameters",outputs:[{internalType:"address",name:"factory",type:"address"},{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"view",type:"function"}],PERMIT2:[{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"}],name:"AllowanceExpired",type:"error"},{inputs:[],name:"ExcessiveInvalidation",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"InsufficientAllowance",type:"error"},{inputs:[{internalType:"uint256",name:"maxAmount",type:"uint256"}],name:"InvalidAmount",type:"error"},{inputs:[],name:"InvalidContractSignature",type:"error"},{inputs:[],name:"InvalidNonce",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSignatureLength",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"signatureDeadline",type:"uint256"}],name:"SignatureExpired",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"spender",type:"address"}],name:"Lockdown",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint48",name:"newNonce",type:"uint48"},{indexed:!1,internalType:"uint48",name:"oldNonce",type:"uint48"}],name:"NonceInvalidation",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"},{indexed:!1,internalType:"uint48",name:"nonce",type:"uint48"}],name:"Permit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"word",type:"uint256"},{indexed:!1,internalType:"uint256",name:"mask",type:"uint256"}],name:"UnorderedNonceInvalidation",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint48",name:"newNonce",type:"uint48"}],name:"invalidateNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wordPos",type:"uint256"},{internalType:"uint256",name:"mask",type:"uint256"}],name:"invalidateUnorderedNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],internalType:"struct IAllowanceTransfer.TokenSpenderPair[]",name:"approvals",type:"tuple[]"}],name:"lockdown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"nonceBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails[]",name:"details",type:"tuple[]"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitBatch",name:"permitBatch",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],internalType:"struct IAllowanceTransfer.AllowanceTransferDetails[]",name:"transferDetails",type:"tuple[]"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]};const rj={name:"uniswap_v3",label:"Uniswap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIGRhdGEtdGVzdGlkPSJ1bmlzd2FwLWxvZ28iIGNsYXNzPSJyZ3c2ZXo0NHAgcmd3NmV6NGVqIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZX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1IDM2LjQ1MDIgMjcuNTE5OSAzNi43MDc5TDI3LjUyIDM2LjcwNzlMMjcuNTIgMzYuNzA4TDI3LjUyIDM2LjcwOEMyNy42NzcxIDM3Ljg4MjMgMjcuODU4NSAzOS4yMzcyIDI5LjIwNDMgMzkuNDczM0MyOS4yODk4IDM5LjQ5IDI5LjM3NjEgMzkuNTAyMyAyOS40NjI5IDM5LjUxMDJMMjkuNzMxMiAzOS41MTY2QzI5LjkxNTcgMzkuNTAzNCAzMC4wOTkgMzkuNDc3IDMwLjI3OTcgMzkuNDM3NkMzMC42NTQxIDM5LjM0OTIgMzEuMDE5IDM5LjIyNDEgMzEuMzY5MSAzOS4wNjQyTDMxLjMxODcgMzkuMTA0NlpNMjEuMDgwMSAzNi45NjE5QzIxLjExMjMgMzYuOTk4OSAyMS4xNDQ5IDM3LjAzNTUgMjEuMTc3OSAzNy4wNzE4QzIxLjE2NDQgMzcuMDU2NyAyMS4xNTEgMzcuMDQxNSAyMS4xMzc1IDM3LjAyNjRMMjEuMTM3NSAzNy4wMjY0TDIxLjEzNzUgMzcuMDI2NEwyMS4xMzc1IDM3LjAyNjRDMjEuMTE4NCAzNy4wMDQ5IDIxLjA5OTMgMzYuOTgzNCAyMS4wODAxIDM2Ljk2MTlaIiBmaWxsPSJjdXJyZW50Q29sb3IiPjwvcGF0aD48L3N2Zz4K",protocol:"uniswap_v3",slippage:!0,fees:[100,500,3e3,1e4],blockchains:["ethereum","bsc","polygon","optimism","arbitrum"],ethereum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},bsc:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},polygon:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},optimism:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},arbitrum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},base:{router:{address:"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC",api:nj.ROUTER},factory:{address:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}}};var ij=t=>new gL(Object.assign(rj,{scope:t,findPath:t=>nj.findPath({...t,exchange:rj}),pathExists:t=>nj.pathExists({...t,exchange:rj}),getAmounts:t=>nj.getAmounts({...t,exchange:rj}),getPrep:t=>nj.getPrep({...t,exchange:rj}),getTransaction:t=>nj.getTransaction({...t,exchange:rj})}));var oj={findPath:async({blockchain:t,tokenIn:e,tokenOut:n})=>{if(![e,n].includes(Hf[t].currency.address)||![e,n].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let r=[e,n];return{path:r,exchangePath:r}},pathExists:async({blockchain:t,path:e})=>!(!e||2!==e.length)&&(e.includes(Hf[t].currency.address)&&e.includes(Hf[t].wrapped.address)),getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address&&n[1]===Hf[e].wrapped.address?(d.method="deposit",d.value=r.toString(),d):n[0]===Hf[e].wrapped.address&&n[1]===Hf[e].currency.address?(d.method="withdraw",d.value=0,d.params={wad:r},d):void 0},WETH:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]};const aj={name:"wavax",label:"Wrapped Avax",logo:Hf.avalanche.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["avalanche"],avalanche:{router:{address:Hf.avalanche.wrapped.address,api:oj.WETH}}};var sj=t=>new gL(Object.assign(aj,{scope:t,findPath:t=>oj.findPath({...t,exchange:aj}),pathExists:t=>oj.pathExists({...t,exchange:aj}),getAmounts:t=>oj.getAmounts({...t,exchange:aj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:aj})}));const uj={name:"wbnb",label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOTIgMTkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOTIgMTkyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0YwQjkwQjt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01NCw0MS4xbDQyLTI0LjJsNDIsMjQuMmwtMTUuNCw4LjlMOTYsMzQuOUw2OS40LDUwTDU0LDQxLjF6IE0xMzgsNzEuN2wtMTUuNC04LjlMOTYsNzhMNjkuNCw2Mi43bC0xNS40LDl2MTgKCUw4MC42LDEwNXYzMC41bDE1LjQsOWwxNS40LTlWMTA1TDEzOCw4OS43VjcxLjd6IE0xMzgsMTIwLjN2LTE4bC0xNS40LDguOXYxOEMxMjIuNiwxMjkuMSwxMzgsMTIwLjMsMTM4LDEyMC4zeiBNMTQ4LjksMTI2LjQKCWwtMjYuNiwxNS4zdjE4bDQyLTI0LjJWODdsLTE1LjQsOUMxNDguOSw5NiwxNDguOSwxMjYuNCwxNDguOSwxMjYuNHogTTEzMy41LDU2LjRsMTUuNCw5djE4bDE1LjQtOXYtMThsLTE1LjQtOUwxMzMuNSw1Ni40CglMMTMzLjUsNTYuNHogTTgwLjYsMTQ4LjN2MThsMTUuNCw5bDE1LjQtOXYtMThMOTYsMTU3LjFMODAuNiwxNDguM3ogTTU0LDEyMC4zbDE1LjQsOXYtMTguMUw1NCwxMDIuM0w1NCwxMjAuM0w1NCwxMjAuM3oKCSBNODAuNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",slippage:!1,blockchains:["bsc"],bsc:{router:{address:Hf.bsc.wrapped.address,api:oj.WETH}}};var cj=t=>new gL(Object.assign(uj,{scope:t,findPath:t=>oj.findPath({...t,exchange:uj}),pathExists:t=>oj.pathExists({...t,exchange:uj}),getAmounts:t=>oj.getAmounts({...t,exchange:uj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:uj})}));const lj={name:"weth",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPS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TcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["ethereum"],ethereum:{router:{address:Hf.ethereum.wrapped.address,api:oj.WETH}}};var hj=t=>new gL(Object.assign(lj,{scope:t,findPath:t=>oj.findPath({...t,exchange:lj}),pathExists:t=>oj.pathExists({...t,exchange:lj}),getAmounts:t=>oj.getAmounts({...t,exchange:lj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:lj})}));const dj={name:"weth_arbitrum",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["arbitrum"],arbitrum:{router:{address:Hf.arbitrum.wrapped.address,api:oj.WETH}}};var fj=t=>new gL(Object.assign(dj,{scope:t,findPath:t=>oj.findPath({...t,exchange:dj}),pathExists:t=>oj.pathExists({...t,exchange:dj}),getAmounts:t=>oj.getAmounts({...t,exchange:dj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:dj})}));const pj={name:"weth_optimism",label:"Wrapped Ethereum",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kJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["optimism"],optimism:{router:{address:Hf.optimism.wrapped.address,api:oj.WETH}}};var yj=t=>new gL(Object.assign(pj,{scope:t,findPath:t=>oj.findPath({...t,exchange:pj}),pathExists:t=>oj.pathExists({...t,exchange:pj}),getAmounts:t=>oj.getAmounts({...t,exchange:pj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:pj})}));const mj={name:"weth_base",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zP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3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["base"],base:{router:{address:Hf.base.wrapped.address,api:oj.WETH}}};var gj=t=>new gL(Object.assign(mj,{scope:t,findPath:t=>oj.findPath({...t,exchange:mj}),pathExists:t=>oj.pathExists({...t,exchange:mj}),getAmounts:t=>oj.getAmounts({...t,exchange:mj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:mj})}));const vj={name:"wftm",label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTkyIDE5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iY2lyY2xlIj4KCTxnIGlkPSJGYW50b20tY2lyY2xlIj4KCQk8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsUnVsZT0iZXZlbm9kZCIgY2xpcFJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMxOTY5RkYiIGNsYXNzPSJzdDAiIGN4PSI5NiIgY3k9Ijk2IiByPSI4MC40Ii8+CgkJPHBhdGggaWQ9IlNoYXBlIiBmaWxsPSIjRkZGRkZGIiBkPSJNOTEuMSw0MS4yYzIuNy0xLjQsNi44LTEuNCw5LjUsMGwyNy42LDE0LjZjMS42LDAuOSwyLjUsMi4xLDIuNywzLjVoMHY3My4zCgkJCWMwLDEuNC0wLjksMi45LTIuNywzLjhsLTI3LjYsMTQuNmMtMi43LDEuNC02LjgsMS40LTkuNSwwbC0yNy42LTE0LjZjLTEuOC0w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jdjMCwwLTAuMSwwLTAuMSwwbDAsMGwwLDBsMC4xLDBsMjcuNiwxNC42YzEuNCwwLjgsNCwwLjgsNS41LDBsMjcuNi0xNC42YzAsMCwwLjEsMCwwLjEsMGwwLDBsMCwwCgkJCWwtMC4xLDBMOTguNyw0NS4xeiBNMTMwLjcsNDYuNWwxLjcsMS4xbDAuMywwLjJjMC41LDAuMywwLjksMC42LDEuMywwLjhjNC4yLDIuOCw1LjcsNS45LDUuNywxMi4zbDAsMC4yaC00LjNjMC0yLjgtMC4zLTQuNy0xLTYKCQkJYy0wLjUtMS4xLTEuMy0xLjktMi44LTIuOWwtMC4xLTAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["fantom"],fantom:{router:{address:Hf.fantom.wrapped.address,api:oj.WETH}}};var wj=t=>new gL(Object.assign(vj,{scope:t,findPath:t=>oj.findPath({...t,exchange:vj}),pathExists:t=>oj.pathExists({...t,exchange:vj}),getAmounts:t=>oj.getAmounts({...t,exchange:vj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:vj})}));const bj={name:"wmatic",label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJI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yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",protocol:"weth",slippage:!1,blockchains:["polygon"],polygon:{router:{address:Hf.polygon.wrapped.address,api:oj.WETH}}};var Mj=t=>new gL(Object.assign(bj,{scope:t,findPath:t=>oj.findPath({...t,exchange:bj}),pathExists:t=>oj.pathExists({...t,exchange:bj}),getAmounts:t=>oj.getAmounts({...t,exchange:bj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:bj})}));const Aj={name:"wxdai",label:"Wrapped XDAI",logo:Hf.gnosis.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["gnosis"],gnosis:{router:{address:Hf.gnosis.wrapped.address,api:oj.WETH}}};var Nj=t=>new gL(Object.assign(Aj,{scope:t,findPath:t=>oj.findPath({...t,exchange:Aj}),pathExists:t=>oj.pathExists({...t,exchange:Aj}),getAmounts:t=>oj.getAmounts({...t,exchange:Aj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:Aj})}));const Ij=[AS(),ij(),CS(),HS(),IS(),FS(),OS(),PS(),xL(),hj(),yj(),gj(),fj(),cj(),Mj(),wj(),sj(),Nj()];Ij.forEach((t=>{Ij[t.name]=t})),Ij.ethereum=[ij("ethereum"),HS("ethereum"),hj("ethereum")],Ij.ethereum.forEach((t=>{Ij.ethereum[t.name]=t})),Ij.bsc=[CS("bsc"),ij("bsc"),IS("bsc"),cj("bsc")],Ij.bsc.forEach((t=>{Ij.bsc[t.name]=t})),Ij.polygon=[ij("polygon"),OS("polygon"),Mj("polygon")],Ij.polygon.forEach((t=>{Ij.polygon[t.name]=t})),Ij.solana=[AS("solana")],Ij.solana.forEach((t=>{Ij.solana[t.name]=t})),Ij.optimism=[ij("optimism"),yj("optimism")],Ij.optimism.forEach((t=>{Ij.optimism[t.name]=t})),Ij.base=[ij("base"),gj("base")],Ij.base.forEach((t=>{Ij.base[t.name]=t})),Ij.arbitrum=[ij("arbitrum"),fj("arbitrum")],Ij.arbitrum.forEach((t=>{Ij.arbitrum[t.name]=t})),Ij.fantom=[PS("fantom"),wj("fantom")],Ij.fantom.forEach((t=>{Ij.fantom[t.name]=t})),Ij.avalanche=[FS("avalanche"),sj("avalanche")],Ij.avalanche.forEach((t=>{Ij.avalanche[t.name]=t})),Ij.gnosis=[xL("gnosis"),Nj("gnosis")],Ij.gnosis.forEach((t=>{Ij.gnosis[t.name]=t}));Ij.route=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>Promise.all(Ij[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})))).then((t=>t.filter(Boolean).sort(((t,e)=>(r||o?BigInt(t.amountOut)BigInt(e.amountIn))?1:(r||o?BigInt(t.amountOut)>BigInt(e.amountOut):BigInt(t.amountIn)xj||(xj="object"==typeof r?r:window,xj);const Tj=()=>(void 0===kj()._Web3ClientConfiguration&&(kj()._Web3ClientConfiguration={}),kj()._Web3ClientConfiguration);function Lj(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class Sj extends ZA{constructor(t,e,n,r){super(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[]}detectNetwork(){return Promise.resolve(Hf.findByName(this._network).id)}requestChunk(t,e,n){try{const r=t.map((t=>t.request));return $M(e,JSON.stringify(r)).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(Lj([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else Lj([r,"optionalAccess",t=>t.result])?t.resolve(r.result):t.reject()}))})).catch((e=>{if(n<3&&e&&"SERVER_ERROR"==e.code){const e=this._endpoints.indexOf(this._endpoint)+1;this._failover(),this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this.requestChunk(t,this._endpoint,n+1)}else t.forEach((t=>{t.reject(e)}))}))}catch(e){t.forEach((t=>{t.reject()}))}}send(t,e){const n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t,this._endpoint,1))))}),Tj().batchInterval||10)),i}}const jj=()=>(null==kj()._Web3ClientProviders&&(kj()._Web3ClientProviders={}),kj()._Web3ClientProviders),Cj=(t,e)=>{void 0===jj()[t]&&(jj()[t]=[]);const n=jj()[t].indexOf(e);n>-1&&jj()[t].splice(n,1),jj()[t].unshift(e)},Dj=async(t,e,n=!0)=>{let r;jj()[t]=e.map(((r,i)=>new Sj(r,t,e,(()=>{1===jj()[t].length?Dj(t,e,n):jj()[t].splice(i,1)}))));let i=kj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=jj()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},referrer:"",referrerPolicy:"no-referrer",body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=jj()[t][o]}Cj(t,r)};var Oj=async t=>{let e=jj();if(e&&e[t])return e[t][0];let n=kj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await Dj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},zj=async t=>{let e=jj();if(e&&e[t])return e[t];let n=kj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await Dj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};class Pj extends ql{constructor(t,e,n,r){super(t),this._provider=new ql(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[],this._rpcRequest=this._rpcRequestReplacement.bind(this)}handleError(t,e,n){if(e<3&&t&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((e=>t.toString().match(e)))){const t=this._endpoints.indexOf(this._endpoint)+1;this._endpoint=t>=this._endpoints.length?this._endpoints[0]:this._endpoints[t],this._provider=new ql(this._endpoint),this.requestChunk(n,e+1)}else n.forEach((e=>{e.reject(t)}))}batchRequest(t,e){return new Promise(((e,n)=>{0===t.length&&e([]);const r=t.map((t=>this._rpcClient.request(t.methodName,t.args)));fetch(this._endpoint,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).then((t=>{t.ok?t.json().then((t=>{e(t)})).catch(n):n(`${t.status} ${t.text}`)})).catch(n)}))}requestChunk(t,e){const n=t.map((t=>t.request));try{return this.batchRequest(n,e).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else r?t.resolve(r):t.reject()}))})).catch((n=>this.handleError(n,e,t)))}catch(n){return this.handleError(n,e,t)}}_rpcRequestReplacement(t,e){const n={methodName:t,args:e};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t,1))))}),Tj().batchInterval||10)),i}}const _j=()=>(null==kj()._Web3ClientProviders&&(kj()._Web3ClientProviders={}),kj()._Web3ClientProviders),Bj=(t,e)=>{void 0===_j()[t]&&(_j()[t]=[]);const n=_j()[t].indexOf(e);n>-1&&_j()[t].splice(n,1),_j()[t].unshift(e)},Rj=async(t,e,n=!0)=>{let r;_j()[t]=e.map(((r,i)=>new Pj(r,t,e,(()=>{1===_j()[t].length?Rj(t,e,n):_j()[t].splice(i,1)}))));let i=kj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=_j()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},referrer:"",referrerPolicy:"no-referrer",body:JSON.stringify({method:"getIdentity",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=_j()[t][o]}Bj(t,r)};var Uj=async t=>{let e=_j();if(e&&e[t])return e[t][0];let n=kj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await Rj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},Qj=async t=>{let e=_j();if(e&&e[t])return e[t];let n=kj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await Rj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};let Yj=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];Yj.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],Yj.solana=["solana"];let Wj=()=>(null==kj()._Web3ClientCacheStore&&(kj()._Web3ClientCacheStore={}),kj()._Web3ClientCacheStore),Fj=()=>(null==kj()._Web3ClientPromiseStore&&(kj()._Web3ClientPromiseStore={}),kj()._Web3ClientPromiseStore),Vj=function({key:t}){Fj()[t]=void 0},Hj=function({call:t,key:e,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:t}){return Fj()[t]}({key:e=JSON.stringify(e)});if(a)return a.then(r).catch(i);(function({key:t,promise:e}){return Fj()[t]=e,e})({key:e,promise:new Promise(((a,s)=>0===n?t().then((t=>{r(t),a(t)})).catch((t=>{i(t),s(t)})):(o=function({key:t,expires:e}){let n=Wj()[t];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.expiresAt])>Date.now())return n.value}({key:e,expires:n}),o?(r(o),a(o),o):void t().then((t=>{t&&function({key:t,value:e,expires:n}){Wj()[t]={expiresAt:Date.now()+n,value:e}}({key:e,value:t,expires:n}),r(t),a(t)})).catch((t=>{i(t),s(t)})))))}).then((()=>{Vj({key:e})})).catch((()=>{Vj({key:e})}))}))};const Gj=async t=>{if(Yj.evm.includes(t))return await Oj(t);if(Yj.solana.includes(t))return await Uj(t);throw"Unknown blockchain: "+t};const qj=({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=new PM(t,e,i),s=(({contract:t,method:e,params:n})=>t.interface.fragments.find((t=>t.name==e)).inputs.map(((t,e)=>Array.isArray(n)?n[e]:n[t.name])))({contract:a,method:n,params:r}),u=a.interface.fragments.find((t=>t.name===n));return void 0===a[n]&&(n=`${n}(${u.inputs.map((t=>t.type)).join(",")})`),u&&"nonpayable"===u.stateMutability?a.callStatic[n](...s,{blockTag:o}):a[n](...s,{blockTag:o})},Zj=({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a})=>n?qj({address:e,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:t,provider:e})=>e.getBalance(t))({address:e,provider:a}):"transactionCount"===r?(({address:t,provider:e})=>e.getTransactionCount(t))({address:e,provider:a}):void 0;const Jj=async({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a,providers:s})=>{try{if(null==r||"getAccountInfo"===r)return null==n&&(n=of),await(async({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=await i.getAccountInfo(new Xs(t));if(a&&a.data)return e.decode(a.data)})({address:e,api:n,method:r,params:i,provider:a,block:o});if("getProgramAccounts"===r)return await a.getProgramAccounts(new Xs(e),i).then((t=>n?t.map((t=>(t.data=n.decode(t.account.data),t))):t));if("getTokenAccountBalance"===r)return await a.getTokenAccountBalance(new Xs(e));if("latestBlockNumber"===r)return await a.getSlot(i||void 0);if("balance"===r)return await(({address:t,provider:e})=>e.getBalance(new Xs(t)))({address:e,provider:a})}catch(u){if(s&&u&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((t=>u.toString().match(t)))){let u=s[s.indexOf(a)+1]||s[0];return Jj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:u,providers:s})}throw u}};const Xj=async function(t,e){const{blockchain:n,address:r,method:i}=(t=>{if("object"==typeof t)return t;let e=t.match(/(?\w+):\/\/(?[\w\d]+)(\/(?[\w\d]+)*)?/);return null==e.groups.part2?e.groups.part1.match(/\d/)?{blockchain:e.groups.blockchain,address:e.groups.part1}:{blockchain:e.groups.blockchain,method:e.groups.part1}:{blockchain:e.groups.blockchain,address:e.groups.part1,method:e.groups.part2}})(t),{api:o,params:a,cache:s,block:u,timeout:c,strategy:l,cacheKey:h}=("object"==typeof t?t:e)||{};return await Hj({expires:s||0,key:h||[n,r,i,a,u],call:async()=>{if(Yj.evm.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{if(s=s||Tj().strategy||"failover",a=a||Tj().timeout||void 0,"fastest"===s){const s=await zj(t);let u=[];const c=s.map((a=>new Promise((s=>{u.push(Zj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(s))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return u=Promise.all(u.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,u])}{const s=await Oj(t),u=Zj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([u,a])):u}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});if(Yj.solana.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{s=s||Tj().strategy||"failover",a=a||Tj().timeout||void 0;const u=await Qj(t);if("fastest"===s){let s=[];const c=u.map((a=>new Promise((u=>{s.push(Jj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(u))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return s=Promise.all(s.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,s])}{const s=await Uj(t),c=Jj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s,providers:u});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([c,a])):c}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});throw"Unknown blockchain: "+n}})},Kj=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=e.fromToken.address===Hf.solana.currency.address?new rf(e.fromAmount):new rf("0"),r=await Gj("solana"),i=new rf(await r.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),o=e.fromAddress,a=n.add(i);return[Wu.createAccount({fromPubkey:new Xs(o),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:a}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:o})]},$j=async({wSolEscrowAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=await Gj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),i=await dC();return[Wu.createAccount({fromPubkey:new Xs(e.fromAddress),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:i.toString()})]},tC=({paymentRoute:t})=>{let e=[...t.exchangeRoutes[0].path];return e.indexOf(Hf.solana.currency.address)>-1&&e.splice(e.indexOf(Hf.solana.currency.address),1),e.indexOf(t.fromToken.address)>-1&&e.splice(e.indexOf(t.fromToken.address),1),e.indexOf(t.toToken.address)>-1&&e.splice(e.indexOf(t.toToken.address),1),2===e.length&&e[0]===Hf.solana.wrapped.address?e[1]:e[0]},eC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:tC({paymentRoute:t}),owner:t.fromAddress}),nC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||mC(t.exchangeRoutes[0].path).length<=2)return;return await(async({paymentRoute:t})=>await Xj({blockchain:"solana",address:await eC({paymentRoute:t}),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t})?void 0:Ak.solana.createAssociatedTokenAccountInstruction({token:tC({paymentRoute:t}),owner:t.fromAddress,payer:t.fromAddress})},rC=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(t)return Ak.solana.closeAccountInstruction({account:t.publicKey.toString(),owner:e.fromAddress})},iC=async({from:t})=>{let e=[nf.from("payments"),new Xs(t).toBuffer()],[n]=await Xs.findProgramAddress(e,new Xs(Ej.solana.address));return n},oC=async({from:t})=>{let e=(await iC({from:t})).toString();return await Xj({blockchain:"solana",address:e,api:pf([vf("anchorDiscriminator"),vf("nonce")]),cache:1e3})},aC=async({from:t})=>{if(await oC({from:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Ej.solana.api.createPaymentsAccount.layout.span);return Ej.solana.api.createPaymentsAccount.layout.encode({anchorDiscriminator:Ej.solana.api.createPaymentsAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Ej.solana.address),data:n})},sC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.fromToken.address,owner:t.fromAddress}),uC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.toAddress}),cC=async({paymentRoute:t})=>{if(t.toToken.address===Hf.solana.currency.address){const e=await Xj({blockchain:"solana",method:"balance",address:t.toAddress}),n=await Gj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.toAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.toAddress),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.toAddress}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.toAddress,payer:t.fromAddress})}},lC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.fee.receiver}),hC=async({paymentRoute:t})=>{if(t.fee){if(t.toToken.address===Hf.solana.currency.address){const e=await Xj({blockchain:"solana",method:"balance",address:t.fee.receiver}),n=await Gj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.feeAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.fee.receiver),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.fee.receiver}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.fee.receiver,payer:t.fromAddress})}}},dC=async()=>{let t=[nf.from("escrow_sol")],[e,n]=await Xs.findProgramAddress(t,new Xs(Ej.solana.address));return e},fC=async({paymentRoute:t})=>{let e=[nf.from("escrow"),new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address).toBuffer()],[n,r]=await Xs.findProgramAddress(e,new Xs(Ej.solana.address));return n},pC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address===Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Xj({blockchain:"solana",address:(await fC({paymentRoute:t})).toString(),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address),isSigner:!1,isWritable:!0},{pubkey:await fC({paymentRoute:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Ej.solana.api.createEscrowTokenAccount.layout.span);return Ej.solana.api.createEscrowTokenAccount.layout.encode({anchorDiscriminator:Ej.solana.api.createEscrowTokenAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Ej.solana.address),data:n})},yC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address!=Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Xj({blockchain:"solana",address:(await dC()).toString(),api:pf([vf("amount"),hf("owner")]),cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await dC(),isSigner:!1,isWritable:!0}],n=nf.alloc(Ej.solana.api.createEscrowSolAccount.layout.span);return Ej.solana.api.createEscrowSolAccount.layout.encode({anchorDiscriminator:Ej.solana.api.createEscrowSolAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Ej.solana.address),data:n})},mC=t=>t.filter((t=>t!==Hf.solana.currency.address)),gC=async({paymentRoute:t,wSolSenderAccountKeypair:e,wSolEscrowAccountKeypair:n,nonce:r,deadline:i})=>{switch((({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return"routeSol";if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address&&0===t.exchangeRoutes.length)return"routeToken";if(t.exchangeRoutes.length>0&&2===mC(t.exchangeRoutes[0].path).length)return t.toToken.address===Hf.solana.currency.address?"routeOrcaSwapSolOut":"routeOrcaSwap";if(t.exchangeRoutes.length>0&&mC(t.exchangeRoutes[0].path).length>2)return t.toToken.address===Hf.solana.currency.address?"routeOrcaTwoHopSwapSolOut":"routeOrcaTwoHopSwap";throw"Payment method does not exist!"})({paymentRoute:t})){case"routeSol":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=new Xs(t.toAddress),i=t.fee?new Xs(t.fee.receiver):r,o=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0}],a=nf.alloc(Ej.solana.api.routeSol.layout.span);return Ej.solana.api.routeSol.layout.encode({anchorDiscriminator:Ej.solana.api.routeSol.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},a),new gu({keys:o,programId:new Xs(Ej.solana.address),data:a})})({paymentRoute:t,nonce:r,deadline:i});case"routeToken":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=await sC({paymentRoute:t}),i=await uC({paymentRoute:t}),o=t.fee?await lC({paymentRoute:t}):i,a=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(r),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0}],s=nf.alloc(Ej.solana.api.routeToken.layout.span);return Ej.solana.api.routeToken.layout.encode({anchorDiscriminator:Ej.solana.api.routeToken.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},s),new gu({keys:a,programId:new Xs(Ej.solana.address),data:s})})({paymentRoute:t,nonce:r,deadline:i});case"routeOrcaSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=n?n.publicKey:await sC({paymentRoute:t}),o=await uC({paymentRoute:t}),a=t.fee?await lC({paymentRoute:t}):o,s=await fC({paymentRoute:t}),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),c=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(u.data),l=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},u.keys[2],u.keys[4],u.keys[6],u.keys[7],u.keys[8],u.keys[9],u.keys[10],{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0},{pubkey:new Xs(a),isSigner:!1,isWritable:!0}],h=nf.alloc(Ej.solana.api.routeOrcaSwap.layout.span);return Ej.solana.api.routeOrcaSwap.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaSwap.anchorDiscriminator,nonce:e,amountIn:c.amount,sqrtPriceLimit:c.sqrtPriceLimit,amountSpecifiedIsInput:c.amountSpecifiedIsInput,aToB:c.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},h),new gu({keys:l,programId:new Xs(Ej.solana.address),data:h})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=await sC({paymentRoute:t}),o=n.publicKey,a=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(a.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},a.keys[2],a.keys[4],a.keys[6],a.keys[7],a.keys[8],a.keys[9],a.keys[10],{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:await dC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Ej.solana.api.routeOrcaSwapSolOut.layout.span);return Ej.solana.api.routeOrcaSwapSolOut.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,sqrtPriceLimit:s.sqrtPriceLimit,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToB:s.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Ej.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i});case"routeOrcaTwoHopSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=new Xs(await uC({paymentRoute:t})),o=t.fee?new Xs(await lC({paymentRoute:t})):i,a=await fC({paymentRoute:t}),s=new Xs(await eC({paymentRoute:t})),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),c=n?n.publicKey:new Xs(await sC({paymentRoute:t})),l=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(u.data),h=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},u.keys[2],u.keys[3],{pubkey:c,isSigner:!1,isWritable:!0},u.keys[5],u.keys[7],{pubkey:s,isSigner:!1,isWritable:!0},u.keys[9],u.keys[11],u.keys[12],u.keys[13],u.keys[14],u.keys[15],u.keys[16],u.keys[17],u.keys[18],u.keys[19],{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0}],d=nf.alloc(Ej.solana.api.routeOrcaTwoHopSwap.layout.span);return Ej.solana.api.routeOrcaTwoHopSwap.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaTwoHopSwap.anchorDiscriminator,nonce:e,amountIn:l.amount,amountSpecifiedIsInput:l.amountSpecifiedIsInput,aToBOne:l.aToBOne,aToBTwo:l.aToBTwo,sqrtPriceLimitOne:l.sqrtPriceLimitOne,sqrtPriceLimitTwo:l.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},d),new gu({keys:h,programId:new Xs(Ej.solana.address),data:d})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaTwoHopSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=new Xs(await eC({paymentRoute:t})),o=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),a=new Xs(await sC({paymentRoute:t})),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(o.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},o.keys[2],o.keys[3],o.keys[5],o.keys[7],{pubkey:i,isSigner:!1,isWritable:!0},o.keys[9],o.keys[11],o.keys[12],o.keys[13],o.keys[14],o.keys[15],o.keys[16],o.keys[17],o.keys[18],o.keys[19],{pubkey:n.publicKey,isSigner:!1,isWritable:!0},{pubkey:await dC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Ej.solana.api.routeOrcaTwoHopSwapSolOut.layout.span);return Ej.solana.api.routeOrcaTwoHopSwapSolOut.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaTwoHopSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToBOne:s.aToBOne,aToBTwo:s.aToBTwo,sqrtPriceLimitOne:s.sqrtPriceLimitOne,sqrtPriceLimitTwo:s.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Ej.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i})}},vC=async({paymentRoute:t})=>{const e=await oC({from:t.fromAddress}),n=Math.ceil((new Date).getTime()/1e3)+1800,r=(t=>t?t.nonce:new rf("0"))(e),i=await(async({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t}),o=await(async({paymentRoute:t})=>{if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t});let a=(await Promise.all([aC({from:t.fromAddress}),Kj({paymentRoute:t,wSolSenderAccountKeypair:i}),nC({paymentRoute:t}),cC({paymentRoute:t}),hC({paymentRoute:t}),yC({paymentRoute:t}),$j({paymentRoute:t,wSolEscrowAccountKeypair:o}),pC({paymentRoute:t}),gC({paymentRoute:t,wSolSenderAccountKeypair:i,wSolEscrowAccountKeypair:o,nonce:r,deadline:n}),rC({paymentRoute:t,wSolSenderAccountKeypair:i})])).filter(Boolean).flat();const s={blockchain:t.blockchain,instructions:a,signers:[i,o].filter(Boolean),alts:[Ej.solana.alt]};return s.deadline=n,s.nonce=r.toString(),s},wC=[{inputs:[{internalType:"address",name:"_PERMIT2",type:"address"},{internalType:"address",name:"_FORWARDER",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ExchangeCallFailed",type:"error"},{inputs:[],name:"ExchangeCallMissing",type:"error"},{inputs:[],name:"ExchangeNotApproved",type:"error"},{inputs:[],name:"ForwardingPaymentFailed",type:"error"},{inputs:[],name:"InsufficientBalanceInAfterPayment",type:"error"},{inputs:[],name:"InsufficientBalanceOutAfterPayment",type:"error"},{inputs:[],name:"NativeFeePaymentFailed",type:"error"},{inputs:[],name:"NativePaymentFailed",type:"error"},{inputs:[],name:"PaymentDeadlineReached",type:"error"},{inputs:[],name:"PaymentToZeroAddressNotAllowed",type:"error"},{inputs:[],name:"WrongAmountPaidIn",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Disabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Enabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"InternalTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"FORWARDER",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"exchange",type:"address"},{internalType:"bool",name:"enabled",type:"bool"}],name:"enable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"exchanges",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IPermit2.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IPermit2.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var bC={ethereum:{address:"0x6466F27B169C908Ba8174d80aEfa7173CbC3D0c7",api:wC},bsc:{address:"0x7ea09401db4692a8AEF4111b75bD32AE758f552A",api:wC},polygon:{address:"0x50CFAB577623B1359602E11514a9482B061A941e",api:wC},fantom:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:wC},avalanche:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:wC},gnosis:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:wC},arbitrum:{address:"0xA1cfbeeF344A52e18f748fd6a126f9426A40fbc7",api:wC},optimism:{address:"0x8698E529E9867eEbcC68b4792daC627cd8870736",api:wC},base:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11",api:wC}},MC={...bC,...Ej},AC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{},NC="object"==typeof AC&&AC&&AC.Object===Object&&AC,IC="object"==typeof self&&self&&self.Object===Object&&self,EC=(NC||IC||Function("return this")()).Symbol;EC&&EC.toStringTag,EC&&EC.toStringTag;const xC=t=>{switch(t){case"solana":return 125e-6;case"gnosis":return.009;case"base":return.0095;case"optimism":return.0096;case"polygon":return.011;case"fantom":return.05;case"avalanche":return.1;case"arbitrum":return.11;case"bsc":return.2;case"ethereum":return 10;default:return 100}},kC={arbitrum:{[Hf.arbitrum.wrapped.address]:"0x7E655088214d0657251A51aDccE9109CFd23B5B5"},avalanche:{[Hf.avalanche.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},base:{[Hf.base.wrapped.address]:"0xD1711710843B125a6a01FfDF9b95fDc3064BeF7A"},bsc:{[Hf.bsc.wrapped.address]:"0xeEb80d14abfB058AA78DE38813fe705c3e3b243E"},ethereum:{[Hf.ethereum.wrapped.address]:"0x298f4980525594b3b982779cf74ba76819708D43"},fantom:{[Hf.fantom.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},gnosis:{[Hf.gnosis.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},optimism:{[Hf.optimism.wrapped.address]:"0x69594057e2C0224deb1180c7a5Df9ec9d5B611B5"},polygon:{[Hf.polygon.wrapped.address]:"0xaE59C9d3E055BdFAa583E169aA5Ebe395689476a"},solana:{}},TC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?t.toAddress:t.toToken.address:bC[t.blockchain].address,LC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:Ak[t.blockchain].DEFAULT:bC[t.blockchain].api,SC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:"transfer":"pay",jC=async({paymentRoute:t})=>{if(t.directTransfer&&!t.fee)return t.toToken.address==Hf[t.blockchain].currency.address?void 0:[t.toAddress,t.toAmount];{const e=Math.ceil(new Date/1e3)+3600,n=t.exchangeRoutes[0],r=(({exchangeRoute:t,blockchain:e})=>void 0===t?0:"uniswap_v3"===t.exchange.name||t.exchange[e].router.address===Hf[e].wrapped.address?2:1)({exchangeRoute:n,blockchain:t.blockchain}),i=n?await n.getTransaction({account:bC[t.blockchain].address,inputTokenPushed:2===r}):void 0,o=i?(({exchangeTransaction:t})=>{const e=new PM(t.to,t.api),n=t.method,r=t.params;let i,o,a;return o=e.interface.fragments.find((t=>!(t.name!=n||t.inputs&&r&&"object"==typeof r&&t.inputs.length!=Object.keys(r).length))),1===o.inputs.length&&"tuple"===o.inputs[0].type?(i=n,a=[r[o.inputs[0].name]]):(i=`${n}(${o.inputs.map((t=>t.type)).join(",")})`,a=o.inputs.map((t=>{if("tuple"===t.type){let e={};return t.components.forEach(((n,i)=>{e[n.name]=r[t.name][i]})),i=n,e}return r[t.name]}))),e.interface.encodeFunctionData(i,a)})({exchangeTransaction:i}):Hf[t.blockchain].zero;let a=Hf[t.blockchain].zero;return n&&(a="bsc"===t.blockchain&&"pancakeswap_v3"===n.exchange.name&&t.toToken.address===Hf[t.blockchain].currency.address?n.exchange[t.blockchain].smartRouter.address:kC[i.blockchain][n.exchange[t.blockchain].router.address]||n.exchange[t.blockchain].router.address),{payment:{amountIn:t.fromAmount,paymentAmount:t.toAmount,feeAmount:t.feeAmount||0,tokenInAddress:t.fromToken.address,exchangeAddress:a,tokenOutAddress:t.toToken.address,paymentReceiverAddress:t.toAddress,feeReceiverAddress:t.fee?t.fee.receiver:Hf[t.blockchain].zero,exchangeType:r,receiverType:0,exchangeCallData:o,receiverCallData:Hf[t.blockchain].zero,deadline:e}}}},CC=({paymentRoute:t})=>t.fromToken.address==Hf[t.blockchain].currency.address?t.directTransfer?t.toAmount.toString():t.fromAmount.toString():Fp.from("0").toString();let DC=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];DC.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],DC.solana=["solana"];const OC=({paymentRoute:t,fee:e})=>{if(DC.evm.includes(t.blockchain))return(async({paymentRoute:t})=>({blockchain:t.blockchain,to:TC({paymentRoute:t}),api:LC({paymentRoute:t}),method:SC({paymentRoute:t}),params:await jC({paymentRoute:t}),value:CC({paymentRoute:t})}))({paymentRoute:t,fee:e});if(DC.solana.includes(t.blockchain))return vC({paymentRoute:t,fee:e});throw"Blockchain not supported!"};function zC(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class PC{constructor({blockchain:t,fromAddress:e,fromToken:n,fromAmount:r,fromDecimals:i,fromBalance:o,toToken:a,toAmount:s,toDecimals:u,toAddress:c,fee:l,feeAmount:h,exchangeRoutes:d,approvalRequired:f,approvalTransaction:p,directTransfer:y}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=zC([r||s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=i,this.fromBalance=o,this.toToken=a,this.toAmount=zC([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=u,this.toAddress=c,this.fee=l,this.feeAmount=h,this.exchangeRoutes=d||[],this.approvalRequired=f,this.approvalTransaction=p,this.directTransfer=y,this.getTransaction=async()=>await OC({paymentRoute:this})}}function _C({assets:t,blacklist:e,accept:n,from:r}){return Promise.resolve(RC({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new Ak(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new Ak({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new PC({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new Ak({blockchain:r,address:e.toToken}),u=await s.decimals();return new PC({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>FC({routes:t}))).then(UC).then(QC).then(YC).then((t=>qC({routes:t}))).then(WC).then(JC).then(ZC).then((t=>t.map((t=>new PC(t)))))}function BC({accept:t,from:e,whitelist:n,blacklist:r,drip:i}){if(t.some((t=>t&&t.fee&&"string"==typeof t.fee.amount&&t.fee.amount.match(/\.\d\d+\%/))))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(o,a)=>{let s=[],u=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{u.push(t),s.push({blockchain:t,address:e})}));else t.forEach((t=>{u.push(t.blockchain),s.push({blockchain:t.blockchain,address:t.token||t.toToken})}));[...new Set(u)].forEach((t=>{s.find((e=>e.blockchain===t&&e.address===Hf[t].currency.address))||s.push({blockchain:t,address:Hf[t].currency.address})})),s.sort(((t,e)=>xC(t.blockchain)[t.blockchain,t.address.toLowerCase()].join(""))),f=()=>Math.ceil(new Date),p=f();setTimeout((()=>{l.forEach((t=>y(BC,!1)))}),3e3);const y=(t,e=!0)=>{try{const n={blockchain:t.blockchain,address:t.fromToken.address},r=[n.blockchain,n.address.toLowerCase()].join(""),o=f()-p>3e3;if(h.indexOf(r)>-1)return;if(d.indexOf(r)===c){if(h.push(r),i(t),c+=1,!e)return;l.forEach((e=>y(t,!1)))}else c>=d.length||o?(-1===d.indexOf(r)||c>=d.length||o)&&(h.push(r),i(t)):l.find((t=>t.blockchain===n.blockchain&&t.address.toLowerCase()===n.address.toLowerCase()))||(l.push(n),l.sort(((t,e)=>((t,e,n)=>{if(!t||0===t.length)return 0;let r=t.indexOf([e.blockchain,e.address.toLowerCase()].join("")),i=t.indexOf([n.blockchain,n.address.toLowerCase()].join(""));return-1!==r&&-1===i?-1:-1!==i&&-1===r?1:r{_C({assets:[n],blacklist:r,accept:t,from:e}).then((t=>{zC([t,"optionalAccess",t=>t.length])&&y(t[0])}))}:void 0});let g=await _C({assets:m,blacklist:r,accept:t,from:e})||[];g.assets=m,o(g)}))}let RC=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),UC=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?Ij.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?Ij.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),QC=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),YC=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?Fp.from(t.fromBalance).gte(Fp.from(t.toAmount)):t.fromAmount&&t.toAmount?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountIn)):void 0)),WC=t=>Promise.all(t.map((t=>"solana"===t.blockchain?Promise.resolve(Hf.solana.maxInt):t.fromToken.allowance(t.fromAddress,MC[t.blockchain].address).catch((()=>{}))))).then((e=>(t.map(((n,r)=>{void 0===e[r]||n.directTransfer||n.fromToken.address.toLowerCase()==Hf[n.blockchain].currency.address.toLowerCase()||"solana"===n.blockchain?t[r].approvalRequired=!1:(t[r].approvalRequired=Fp.from(n.fromAmount).gte(Fp.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:Ak[n.blockchain].DEFAULT,method:"approve",params:[MC[n.blockchain].address,Hf[n.blockchain].maxInt]}))})),t))),FC=({routes:t})=>t.map((t=>(DC.evm.includes(t.blockchain)?t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==t.fee:"solana"===t.blockchain&&(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()),t))),VC=({paymentRoute:t,exchangeRoute:e})=>{let n,r,i;return e?(e&&e.exchange.wrapper,n=e.amountIn.toString(),r=HC({amount:e.amountOutMin.toString(),paymentRoute:t})):(n=t.fromAmount,r=HC({amount:t.fromAmount,paymentRoute:t})),t.fee&&(i=GC({paymentRoute:t})),{fromAmount:n,toAmount:r,feeAmount:i}},HC=({amount:t,paymentRoute:e})=>{if(e.fee){let n=GC({paymentRoute:e});return Fp.from(t).sub(n).toString()}return t},GC=({paymentRoute:t})=>{if("string"==typeof t.fee.amount&&t.fee.amount.match("%"))return Fp.from(t.toAmount).mul(10*parseFloat(t.fee.amount)).div(1e3).toString();if("string"==typeof t.fee.amount)return t.fee.amount;if("number"==typeof t.fee.amount)return cN(t.fee.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},qC=({routes:t})=>t.map((t=>{if(DC.evm.includes(t.blockchain))if(t.directTransfer&&!t.fee)t.fromAmount=t.toAmount;else{let{fromAmount:e,toAmount:n,feeAmount:r}=VC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}else if(DC.solana.includes(t.blockchain)){let{fromAmount:e,toAmount:n,feeAmount:r}=VC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}return t})),ZC=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!Fp.from(t.fromAmount).lt(Fp.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r{let e=-1;return t.sort(((t,n)=>xC(t.fromToken.blockchain)>>1,i=t[r];if(!(0>>1;ro(u,n))co(l,u)?(t[r]=l,t[c]=n,r=c):(t[r]=u,t[s]=n,r=s);else{if(!(co(l,n)))break t;t[r]=l,t[c]=n,r=c}}}return e}function o(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],h=1,d=null,f=3,p=!1,y=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function b(t){for(var e=r(l);null!==e;){if(null===e.callback)i(l);else{if(!(e.startTime<=t))break;i(l),e.sortIndex=e.expirationTime,n(c,e)}e=r(l)}}function M(t){if(m=!1,b(t),!y)if(null!==r(c))y=!0,D(A);else{var e=r(l);null!==e&&O(M,e.startTime-t)}}function A(t,n){y=!1,m&&(m=!1,v(x),x=-1),p=!0;var o=f;try{for(b(n),d=r(c);null!==d&&(!(d.expirationTime>n)||t&&!L());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&i(c),b(n)}else i(c);d=r(c)}if(null!==d)var u=!0;else{var h=r(l);null!==h&&O(M,h.startTime-n),u=!1}return u}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var N,I=!1,E=null,x=-1,k=5,T=-1;function L(){return!(e.unstable_now()-Tt||125a?(t.sortIndex=o,n(l,t),null===r(c)&&t===r(l)&&(m?(v(x),x=-1):m=!0,O(M,o-a))):(t.sortIndex=s,n(c,t),y||p||(y=!0,D(A))),t},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(t){var e=f;return function(){var n=f;f=e;try{return t.apply(this,arguments)}finally{f=n}}}}));
+ */var KC=function(t){return Zx.createElement("svg",{className:["ChevronLeft","Icon",t.className].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},Zx.createElement("path",{strokeWidth:"1",fillRule:"evenodd",d:"M10.4,1.6c0.2,0.2,0.2,0.5,0,0.7L4.7,8l5.6,5.6c0.2,0.2,0.2,0.5,0,0.7s-0.5,0.2-0.7,0l-6-6l0,0,c-0.2-0.2-0.2-0.5,0-0.7l6-6l0,0C9.8,1.5,10.2,1.5,10.4,1.6L10.4,1.6z"}))},$C=function(){return Zx.createElement("svg",{className:"CloseIcon Icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Zx.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Zx.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))},tD=Zf((function(t,e){function n(t,e){var n=t.length;t.push(e);t:for(;0>>1,i=t[r];if(!(0>>1;ro(u,n))co(l,u)?(t[r]=l,t[c]=n,r=c):(t[r]=u,t[s]=n,r=s);else{if(!(co(l,n)))break t;t[r]=l,t[c]=n,r=c}}}return e}function o(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],h=1,d=null,f=3,p=!1,y=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function b(t){for(var e=r(l);null!==e;){if(null===e.callback)i(l);else{if(!(e.startTime<=t))break;i(l),e.sortIndex=e.expirationTime,n(c,e)}e=r(l)}}function M(t){if(m=!1,b(t),!y)if(null!==r(c))y=!0,D(A);else{var e=r(l);null!==e&&O(M,e.startTime-t)}}function A(t,n){y=!1,m&&(m=!1,v(x),x=-1),p=!0;var o=f;try{for(b(n),d=r(c);null!==d&&(!(d.expirationTime>n)||t&&!L());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&i(c),b(n)}else i(c);d=r(c)}if(null!==d)var u=!0;else{var h=r(l);null!==h&&O(M,h.startTime-n),u=!1}return u}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var N,I=!1,E=null,x=-1,k=5,T=-1;function L(){return!(e.unstable_now()-Tt||125a?(t.sortIndex=o,n(l,t),null===r(c)&&t===r(l)&&(m?(v(x),x=-1):m=!0,O(M,o-a))):(t.sortIndex=s,n(c,t),y||p||(y=!0,D(A))),t},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(t){var e=f;return function(){var n=f;f=e;try{return t.apply(this,arguments)}finally{f=n}}}}));
/**
* @license React
* scheduler.development.js
@@ -105,7 +105,7 @@ Zf((function(t,e){}));var Zx=Zf((function(t){t.exports=qx})),Jx=Zx.createContext
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-Zf((function(t,e){}));var $C=Zf((function(t){t.exports=KC}));
+Zf((function(t,e){}));var eD=Zf((function(t){t.exports=tD}));
/**
* @license React
* react-dom.production.min.js
@@ -114,7 +114,7 @@ Zf((function(t,e){}));var $C=Zf((function(t){t.exports=KC}));
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */function tD(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;ne}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!aD.call(cD,t)||!aD.call(uD,t)&&(sD.test(t)?cD[t]=!0:(uD[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,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(t){var e=t.replace(dD,fD);hD[e]=new lD(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(dD,fD);hD[e]=new lD(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(dD,fD);hD[e]=new lD(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){hD[t]=new lD(t,1,!1,t.toLowerCase(),null,!1,!1)})),hD.xlinkHref=new lD("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){hD[t]=new lD(t,1,!1,t.toLowerCase(),null,!0,!0)}));var yD=Zx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mD=Symbol.for("react.element"),gD=Symbol.for("react.portal"),vD=Symbol.for("react.fragment"),wD=Symbol.for("react.strict_mode"),bD=Symbol.for("react.profiler"),MD=Symbol.for("react.provider"),AD=Symbol.for("react.context"),ND=Symbol.for("react.forward_ref"),ID=Symbol.for("react.suspense"),ED=Symbol.for("react.suspense_list"),xD=Symbol.for("react.memo"),kD=Symbol.for("react.lazy"),TD=Symbol.for("react.offscreen"),LD=Symbol.iterator;function SD(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=LD&&t[LD]||t["@@iterator"])?t:null}var jD,CD=Object.assign;function DD(t){if(void 0===jD)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);jD=e&&e[1]||""}return"\n"+jD+t}var OD=!1;function zD(t,e){if(!t||OD)return"";OD=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var r=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){r=t}t.call(e.prototype)}else{try{throw Error()}catch(t){r=t}t()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var u="\n"+i[a].replace(" at new "," at ");return t.displayName&&u.includes("")&&(u=u.replace("",t.displayName)),u}}while(1<=a&&0<=s);break}}}finally{OD=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?DD(t):""}function PD(t){switch(t.tag){case 5:return DD(t.type);case 16:return DD("Lazy");case 13:return DD("Suspense");case 19:return DD("SuspenseList");case 0:case 2:case 15:return t=zD(t.type,!1);case 11:return t=zD(t.type.render,!1);case 1:return t=zD(t.type,!0);default:return""}}function _D(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case vD:return"Fragment";case gD:return"Portal";case bD:return"Profiler";case wD:return"StrictMode";case ID:return"Suspense";case ED:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case AD:return(t.displayName||"Context")+".Consumer";case MD:return(t._context.displayName||"Context")+".Provider";case ND:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case xD:return null!==(e=t.displayName||null)?e:_D(t.type)||"Memo";case kD:e=t._payload,t=t._init;try{return _D(t(e))}catch(t){}}return null}function BD(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _D(e);case 8:return e===wD?"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 e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}function RD(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function UD(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function QD(t){t._valueTracker||(t._valueTracker=function(t){var e=UD(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function YD(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=UD(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function WD(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function FD(t,e){var n=e.checked;return CD({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function VD(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=RD(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function HD(t,e){null!=(e=e.checked)&&pD(t,"checked",e,!1)}function GD(t,e){HD(t,e);var n=RD(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?ZD(t,e.type,n):e.hasOwnProperty("defaultValue")&&ZD(t,e.type,RD(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function qD(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function ZD(t,e,n){"number"===e&&WD(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var JD=Array.isArray;function XD(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=iO.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return oO(t,e)}))}:oO);function sO(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var uO={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},cO=["Webkit","ms","Moz","O"];function lO(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||uO.hasOwnProperty(t)&&uO[t]?(""+e).trim():e+"px"}function hO(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=lO(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(uO).forEach((function(t){cO.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),uO[e]=uO[t]}))}));var dO=CD({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 fO(t,e){if(e){if(dO[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(tD(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(tD(60));if("object"!=typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(tD(61))}if(null!=e.style&&"object"!=typeof e.style)throw Error(tD(62))}}function pO(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){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 yO=null;function mO(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var gO=null,vO=null,wO=null;function bO(t){if(t=lB(t)){if("function"!=typeof gO)throw Error(tD(280));var e=t.stateNode;e&&(e=dB(e),gO(t.stateNode,t.type,e))}}function MO(t){vO?wO?wO.push(t):wO=[t]:vO=t}function AO(){if(vO){var t=vO,e=wO;if(wO=vO=null,bO(t),e)for(t=0;t>>=0)?32:31-(nz(t)/rz|0)|0},nz=Math.log,rz=Math.LN2;var iz=64,oz=4194304;function az(t){switch(t&-t){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&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function sz(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=az(s):0!==(o&=a)&&(r=az(o))}else 0!==(a=n&~i)?r=az(a):0!==o&&(r=az(o));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(o=e&-e)||16===i&&0!=(4194240&o)))return e;if(0!=(4&r)&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function dz(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-ez(e)]=n}function fz(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-ez(n),i=1<=xP),LP=String.fromCharCode(32),SP=!1;function jP(t,e){switch(t){case"keyup":return-1!==IP.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CP(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var DP=!1;var OP={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 zP(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!OP[t.type]:"textarea"===e}function PP(t,e,n,r){MO(r),0<(e=__(e,"onChange")).length&&(n=new iP("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var _P=null,BP=null;function RP(t){L_(t,0)}function UP(t){if(YD(hB(t)))return t}function QP(t,e){if("change"===t)return e}var YP=!1;if(oD){var WP;if(oD){var FP="oninput"in document;if(!FP){var VP=document.createElement("div");VP.setAttribute("oninput","return;"),FP="function"==typeof VP.oninput}WP=FP}else WP=!1;YP=WP&&(!document.documentMode||9=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=t_(r)}}function n_(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?n_(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function r_(){for(var t=window,e=WD();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(!n)break;e=WD((t=e.contentWindow).document)}return e}function i_(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function o_(t){var e=r_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&n_(n.ownerDocument.documentElement,n)){if(null!==r&&i_(n))if(e=r.start,void 0===(t=r.end)&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if((t=(e=n.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=e_(n,o);var a=e_(n,r);i&&a&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&((e=e.createRange()).setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n=document.documentMode,s_=null,u_=null,c_=null,l_=!1;function h_(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;l_||null==s_||s_!==WD(r)||("selectionStart"in(r=s_)&&i_(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},c_&&$P(c_,r)||(c_=r,0<(r=__(u_,"onSelect")).length&&(e=new iP("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=s_)))}function d_(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var f_={animationend:d_("Animation","AnimationEnd"),animationiteration:d_("Animation","AnimationIteration"),animationstart:d_("Animation","AnimationStart"),transitionend:d_("Transition","TransitionEnd")},p_={},y_={};function m_(t){if(p_[t])return p_[t];if(!f_[t])return t;var e,n=f_[t];for(e in n)if(n.hasOwnProperty(e)&&e in y_)return p_[t]=n[e];return t}oD&&(y_=document.createElement("div").style,"AnimationEvent"in window||(delete f_.animationend.animation,delete f_.animationiteration.animation,delete f_.animationstart.animation),"TransitionEvent"in window||delete f_.transitionend.transition);var g_=m_("animationend"),v_=m_("animationiteration"),w_=m_("animationstart"),b_=m_("transitionend"),M_=new Map,A_="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 N_(t,e){M_.set(t,e),rD(e,[t])}for(var I_=0;I_pB||(t.current=fB[pB],fB[pB]=null,pB--)}function gB(t,e){pB++,fB[pB]=t.current,t.current=e}var vB={},wB=yB(vB),bB=yB(!1),MB=vB;function AB(t,e){var n=t.type.contextTypes;if(!n)return vB;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function NB(t){return null!=(t=t.childContextTypes)}function IB(){mB(bB),mB(wB)}function EB(t,e,n){if(wB.current!==vB)throw Error(tD(168));gB(wB,e),gB(bB,n)}function xB(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(tD(108,BD(t)||"Unknown",i));return CD({},n,r)}function kB(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||vB,MB=wB.current,gB(wB,t),gB(bB,bB.current),!0}function TB(t,e,n){var r=t.stateNode;if(!r)throw Error(tD(169));n?(t=xB(t,e,MB),r.__reactInternalMemoizedMergedChildContext=t,mB(bB),mB(wB),gB(wB,t)):mB(bB),gB(bB,n)}var LB=null,SB=!1,jB=!1;function CB(t){null===LB?LB=[t]:LB.push(t)}function DB(){if(!jB&&null!==LB){jB=!0;var t=0,e=pz;try{var n=LB;for(pz=1;t>=a,i-=a,yR=1<<32-ez(e)+i|n<y?(m=p,p=null):m=p.sibling;var g=d(i,p,s[y],u);if(null===g){null===p&&(p=m);break}t&&p&&null===g.alternate&&e(i,p),a=o(g,a,y),null===l?c=g:l.sibling=g,l=g,p=m}if(y===s.length)return n(i,p),NR&&gR(i,y),c;if(null===p){for(;yy?(m=p,p=null):m=p.sibling;var v=d(i,p,g.value,u);if(null===v){null===p&&(p=m);break}t&&p&&null===v.alternate&&e(i,p),a=o(v,a,y),null===l?c=v:l.sibling=v,l=v,p=m}if(g.done)return n(i,p),NR&&gR(i,y),c;if(null===p){for(;!g.done;y++,g=s.next())null!==(g=h(i,g.value,u))&&(a=o(g,a,y),null===l?c=g:l.sibling=g,l=g);return NR&&gR(i,y),c}for(p=r(i,p);!g.done;y++,g=s.next())null!==(g=f(p,i,y,g.value,u))&&(t&&null!==g.alternate&&p.delete(null===g.key?y:g.key),a=o(g,a,y),null===l?c=g:l.sibling=g,l=g);return t&&p.forEach((function(t){return e(i,t)})),NR&&gR(i,y),c}return function t(r,o,s,u){if("object"==typeof s&&null!==s&&s.type===vD&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case mD:t:{for(var c=s.key,l=o;null!==l;){if(l.key===c){if((c=s.type)===vD){if(7===l.tag){n(r,l.sibling),(o=i(l,s.props.children)).return=r,r=o;break t}}else if(l.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===kD&&zR(c)===l.type){n(r,l.sibling),(o=i(l,s.props)).ref=DR(r,l,s),o.return=r,r=o;break t}n(r,l);break}e(r,l),l=l.sibling}s.type===vD?((o=IW(s.props.children,r.mode,u,s.key)).return=r,r=o):((u=NW(s.type,s.key,s.props,null,r.mode,u)).ref=DR(r,o,s),u.return=r,r=u)}return a(r);case gD:t:{for(l=s.key;null!==o;){if(o.key===l){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break t}n(r,o);break}e(r,o),o=o.sibling}(o=kW(s,r.mode,u)).return=r,r=o}return a(r);case kD:return t(r,o,(l=s._init)(s._payload),u)}if(JD(s))return p(r,o,s,u);if(SD(s))return y(r,o,s,u);OR(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=xW(s,r.mode,u)).return=r,r=o),a(r)):n(r,o)}}var _R=PR(!0),BR=PR(!1),RR={},UR=yB(RR),QR=yB(RR),YR=yB(RR);function WR(t){if(t===RR)throw Error(tD(174));return t}function FR(t,e){switch(gB(YR,e),gB(QR,t),gB(UR,RR),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:rO(null,"");break;default:e=rO(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}mB(UR),gB(UR,e)}function VR(){mB(UR),mB(QR),mB(YR)}function HR(t){WR(YR.current);var e=WR(UR.current),n=rO(e,t.type);e!==n&&(gB(QR,t),gB(UR,n))}function GR(t){QR.current===t&&(mB(UR),mB(QR))}var qR=yB(0);function ZR(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var JR=[];function XR(){for(var t=0;tn?n:4,t(!0);var r=$R.transition;$R.transition={};try{t(!1),e()}finally{pz=n,$R.transition=r}}function RU(){return fU().memoizedState}function UU(t,e,n){var r=YY(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},YU(t)?WU(e,n):(FU(t,e,n),null!==(t=WY(t,r,n=QY()))&&VU(t,e,r))}function QU(t,e,n){var r=YY(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(YU(t))WU(e,i);else{FU(t,e,i);var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,KP(s,a))return}catch(t){}null!==(t=WY(t,r,n=QY()))&&VU(t,e,r)}}function YU(t){var e=t.alternate;return t===eU||null!==e&&e===eU}function WU(t,e){oU=iU=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function FU(t,e,n){VY(t)?(null===(t=e.interleaved)?(n.next=n,null===VB?VB=[e]:VB.push(e)):(n.next=t.next,t.next=n),e.interleaved=n):(null===(t=e.pending)?n.next=n:(n.next=t.next,t.next=n),e.pending=n)}function VU(t,e,n){if(0!=(4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,fz(t,n)}}var HU={readContext:FB,useCallback:uU,useContext:uU,useEffect:uU,useImperativeHandle:uU,useInsertionEffect:uU,useLayoutEffect:uU,useMemo:uU,useReducer:uU,useRef:uU,useState:uU,useDebugValue:uU,useDeferredValue:uU,useTransition:uU,useMutableSource:uU,useSyncExternalStore:uU,useId:uU,unstable_isNewReconciler:!1},GU={readContext:FB,useCallback:function(t,e){return dU().memoizedState=[t,void 0===e?null:e],t},useContext:FB,useEffect:TU,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,xU(4194308,4,CU.bind(null,e,t),n)},useLayoutEffect:function(t,e){return xU(4194308,4,t,e)},useInsertionEffect:function(t,e){return xU(4,2,t,e)},useMemo:function(t,e){var n=dU();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=dU();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=UU.bind(null,eU,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},dU().memoizedState=t},useState:NU,useDebugValue:OU,useDeferredValue:function(t){return dU().memoizedState=t},useTransition:function(){var t=NU(!1),e=t[0];return t=BU.bind(null,t[1]),dU().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=eU,i=dU();if(NR){if(void 0===n)throw Error(tD(407));n=n()}else{if(n=e(),null===mY)throw Error(tD(349));0!=(30&tU)||wU(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,TU(MU.bind(null,r,o,t),[t]),r.flags|=2048,IU(9,bU.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=dU(),e=mY.identifierPrefix;if(NR){var n=mR;e=":"+e+"R"+(n=(yR&~(1<<32-ez(yR)-1)).toString(32)+n),0<(n=aU++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=sU++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},qU={readContext:FB,useCallback:zU,useContext:FB,useEffect:LU,useImperativeHandle:DU,useInsertionEffect:SU,useLayoutEffect:jU,useMemo:PU,useReducer:yU,useRef:EU,useState:function(){return yU(pU)},useDebugValue:OU,useDeferredValue:function(t){return _U(fU(),nU.memoizedState,t)},useTransition:function(){return[yU(pU)[0],fU().memoizedState]},useMutableSource:gU,useSyncExternalStore:vU,useId:RU,unstable_isNewReconciler:!1},ZU={readContext:FB,useCallback:zU,useContext:FB,useEffect:LU,useImperativeHandle:DU,useInsertionEffect:SU,useLayoutEffect:jU,useMemo:PU,useReducer:mU,useRef:EU,useState:function(){return mU(pU)},useDebugValue:OU,useDeferredValue:function(t){var e=fU();return null===nU?e.memoizedState=t:_U(e,nU.memoizedState,t)},useTransition:function(){return[mU(pU)[0],fU().memoizedState]},useMutableSource:gU,useSyncExternalStore:vU,useId:RU,unstable_isNewReconciler:!1};function JU(t,e){try{var n="",r=e;do{n+=PD(r),r=r.return}while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i}}function XU(t,e){try{console.error(e.value)}catch(t){setTimeout((function(){throw t}))}}var KU,$U,tQ,eQ="function"==typeof WeakMap?WeakMap:Map;function nQ(t,e,n){(n=ZB(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){jY||(jY=!0,CY=r),XU(0,e)},n}function rQ(t,e,n){(n=ZB(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){XU(0,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){XU(0,e),"function"!=typeof r&&(null===DY?DY=new Set([this]):DY.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function iQ(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new eQ;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=pW.bind(null,t,e,n),e.then(t,t))}function oQ(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function aQ(t,e,n,r,i){return 0==(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=ZB(-1,1)).tag=2,JB(n,e))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}function sQ(t,e){if(!NR)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function uQ(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function cQ(t,e,n){var r=e.pendingProps;switch(bR(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return uQ(e),null;case 1:return NB(e.type)&&IB(),uQ(e),null;case 3:return r=e.stateNode,VR(),mB(bB),mB(wB),XR(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(SR(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==IR&&(ZY(IR),IR=null))),uQ(e),null;case 5:GR(e);var i=WR(YR.current);if(n=e.type,null!==t&&null!=e.stateNode)$U(t,e,n,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(tD(166));return uQ(e),null}if(t=WR(UR.current),SR(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[rB]=e,r[iB]=o,t=0!=(1&e.mode),n){case"dialog":S_("cancel",r),S_("close",r);break;case"iframe":case"object":case"embed":S_("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),"select"===n&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[rB]=e,t[iB]=r,KU(t,e),e.stateNode=t;t:{switch(a=pO(n,r),n){case"dialog":S_("cancel",t),S_("close",t),i=r;break;case"iframe":case"object":case"embed":S_("load",t),i=r;break;case"video":case"audio":for(i=0;iLY&&(e.flags|=128,r=!0,sQ(o,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=ZR(a))){if(e.flags|=128,r=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),sQ(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!NR)return uQ(e),null}else 2*HO()-o.renderingStartTime>LY&&1073741824!==n&&(e.flags|=128,r=!0,sQ(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(null!==(n=o.last)?n.sibling=a:e.child=a,o.last=a)}return null!==o.tail?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=HO(),e.sibling=null,n=qR.current,gB(qR,r?1&n|2:1&n),e):(uQ(e),null);case 22:case 23:return tW(),r=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==r&&(e.flags|=8192),r&&0!=(1&e.mode)?0!=(1073741824&wY)&&(uQ(e),6&e.subtreeFlags&&(e.flags|=8192)):uQ(e),null;case 24:case 25:return null}throw Error(tD(156,e.tag))}KU=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$U=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,WR(UR.current);var o,a=null;switch(n){case"input":i=FD(t,i),r=FD(t,r),a=[];break;case"select":i=CD({},i,{value:void 0}),r=CD({},r,{value:void 0}),a=[];break;case"textarea":i=KD(t,i),r=KD(t,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(t.onclick=F_)}for(c in fO(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(nD.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==s&&(null!=u||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(nD.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&S_("scroll",t),a||s===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(e.updateQueue=c)&&(e.flags|=4)}},tQ=function(t,e,n,r){n!==r&&(e.flags|=4)};var lQ=yD.ReactCurrentOwner,hQ=!1;function dQ(t,e,n,r){e.child=null===t?BR(e,null,n,r):_R(e,t.child,n,r)}function fQ(t,e,n,r,i){n=n.render;var o=e.ref;return WB(e,i),r=lU(t,e,n,r,o,i),n=hU(),null===t||hQ?(NR&&n&&wR(e),e.flags|=1,dQ(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,OQ(t,e,i))}function pQ(t,e,n,r,i){if(null===t){var o=n.type;return"function"!=typeof o||MW(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=NW(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,yQ(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:$P)(a,r)&&t.ref===e.ref)return OQ(t,e,i)}return e.flags|=1,(t=AW(o,r)).ref=e.ref,t.return=e,e.child=t}function yQ(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if($P(o,r)&&t.ref===e.ref){if(hQ=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,OQ(t,e,i);0!=(131072&t.flags)&&(hQ=!0)}}return vQ(t,e,n,r,i)}function mQ(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode)if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},gB(bY,wY),wY|=n;else{if(0==(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,gB(bY,wY),wY|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,gB(bY,wY),wY|=r}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,gB(bY,wY),wY|=r;return dQ(t,e,i,n),e.child}function gQ(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function vQ(t,e,n,r,i){var o=NB(n)?MB:wB.current;return o=AB(e,o),WB(e,i),n=lU(t,e,n,r,o,i),r=hU(),null===t||hQ?(NR&&r&&wR(e),e.flags|=1,dQ(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,OQ(t,e,i))}function wQ(t,e,n,r,i){if(NB(n)){var o=!0;kB(e)}else o=!1;if(WB(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),oR(e,n,r),sR(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=FB(c):c=AB(e,c=NB(n)?MB:wB.current);var l=n.getDerivedStateFromProps,h="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;h||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&aR(e,a,r,c),HB=!1;var d=e.memoizedState;a.state=d,$B(e,r,a,i),u=e.memoizedState,s!==r||d!==u||bB.current||HB?("function"==typeof l&&(nR(e,n,l,r),u=e.memoizedState),(s=HB||iR(e,n,s,r,d,u,c))?(h||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.flags|=4194308)):("function"==typeof a.componentDidMount&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"==typeof a.componentDidMount&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,qB(t,e),s=e.memoizedProps,c=e.type===e.elementType?s:zB(e.type,s),a.props=c,h=e.pendingProps,d=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=FB(u):u=AB(e,u=NB(n)?MB:wB.current);var f=n.getDerivedStateFromProps;(l="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==h||d!==u)&&aR(e,a,r,u),HB=!1,d=e.memoizedState,a.state=d,$B(e,r,a,i);var p=e.memoizedState;s!==h||d!==p||bB.current||HB?("function"==typeof f&&(nR(e,n,f,r),p=e.memoizedState),(c=HB||iR(e,n,c,r,d,p,u)||!1)?(l||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(e.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return bQ(t,e,n,r,o,i)}function bQ(t,e,n,r,i,o){gQ(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&TB(e,n,!1),OQ(t,e,o);r=e.stateNode,lQ.current=e;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=_R(e,t.child,null,o),e.child=_R(e,null,s,o)):dQ(t,e,s,o),e.memoizedState=r.state,i&&TB(e,n,!0),e.child}function MQ(t){var e=t.stateNode;e.pendingContext?EB(0,e.pendingContext,e.pendingContext!==e.context):e.context&&EB(0,e.context,!1),FR(t,e.containerInfo)}function AQ(t,e,n,r,i){return jR(),CR(i),e.flags|=256,dQ(t,e,n,r),e.child}var NQ={dehydrated:null,treeContext:null,retryLane:0};function IQ(t){return{baseLanes:t,cachePool:null,transitions:null}}function EQ(t,e){return{baseLanes:t.baseLanes|e,cachePool:null,transitions:t.transitions}}function xQ(t,e,n){var r,i=e.pendingProps,o=qR.current,a=!1,s=0!=(128&e.flags);if((r=s)||(r=(null===t||null!==t.memoizedState)&&0!=(2&o)),r?(a=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(o|=1),gB(qR,1&o),null===t)return TR(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0==(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=1073741824,null):(o=i.children,t=i.fallback,a?(i=e.mode,a=e.child,o={mode:"hidden",children:o},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=o):a=EW(o,i,0,null),t=IW(t,i,n,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=IQ(n),e.memoizedState=NQ,t):kQ(e,o));if(null!==(o=t.memoizedState)){if(null!==(r=o.dehydrated)){if(s)return 256&e.flags?(e.flags&=-257,SQ(t,e,n,Error(tD(422)))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(a=i.fallback,o=e.mode,i=EW({mode:"visible",children:i.children},o,0,null),(a=IW(a,o,n,null)).flags|=2,i.return=e,a.return=e,i.sibling=a,e.child=i,0!=(1&e.mode)&&_R(e,t.child,null,n),e.child.memoizedState=IQ(n),e.memoizedState=NQ,a);if(0==(1&e.mode))e=SQ(t,e,n,null);else if("$!"===r.data)e=SQ(t,e,n,Error(tD(419)));else if(i=0!=(n&t.childLanes),hQ||i){if(null!==(i=mY)){switch(n&-n){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(i=0!=(a&(i.suspendedLanes|n))?0:a)&&i!==o.retryLane&&(o.retryLane=i,WY(t,i,-1))}iW(),e=SQ(t,e,n,Error(tD(421)))}else"$?"===r.data?(e.flags|=128,e.child=t.child,e=mW.bind(null,t),r._reactRetry=e,e=null):(n=o.treeContext,AR=tB(r.nextSibling),MR=e,NR=!0,IR=null,null!==n&&(dR[fR++]=yR,dR[fR++]=mR,dR[fR++]=pR,yR=n.id,mR=n.overflow,pR=e),(e=kQ(e,e.pendingProps.children)).flags|=4096);return e}return a?(i=LQ(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?IQ(n):EQ(o,n),a.childLanes=t.childLanes&~n,e.memoizedState=NQ,i):(n=TQ(t,e,i.children,n),e.memoizedState=null,n)}return a?(i=LQ(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?IQ(n):EQ(o,n),a.childLanes=t.childLanes&~n,e.memoizedState=NQ,i):(n=TQ(t,e,i.children,n),e.memoizedState=null,n)}function kQ(t,e){return(e=EW({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function TQ(t,e,n,r){var i=t.child;return t=i.sibling,n=AW(i,{mode:"visible",children:n}),0==(1&e.mode)&&(n.lanes=r),n.return=e,n.sibling=null,null!==t&&(null===(r=e.deletions)?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n}function LQ(t,e,n,r,i){var o=e.mode,a=(t=t.child).sibling,s={mode:"hidden",children:n};return 0==(1&o)&&e.child!==t?((n=e.child).childLanes=0,n.pendingProps=s,e.deletions=null):(n=AW(t,s)).subtreeFlags=14680064&t.subtreeFlags,null!==a?r=AW(a,r):(r=IW(r,o,i,null)).flags|=2,r.return=e,n.return=e,n.sibling=r,e.child=n,r}function SQ(t,e,n,r){return null!==r&&CR(r),_R(e,t.child,null,n),(t=kQ(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function jQ(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),YB(t.return,e,n)}function CQ(t,e,n,r,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function DQ(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(dQ(t,e,r.children,n),0!=(2&(r=qR.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&jQ(t,n,e);else if(19===t.tag)jQ(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(gB(qR,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===ZR(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),CQ(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===ZR(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}CQ(e,!0,n,null,o);break;case"together":CQ(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function OQ(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),NY|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(tD(153));if(null!==e.child){for(n=AW(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=AW(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function zQ(t,e){switch(bR(e),e.tag){case 1:return NB(e.type)&&IB(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return VR(),mB(bB),mB(wB),XR(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return GR(e),null;case 13:if(mB(qR),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(tD(340));jR()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return mB(qR),null;case 4:return VR(),null;case 10:return QB(e.type._context),null;case 22:case 23:return tW(),null;case 24:default:return null}}var PQ=!1,_Q=!1,BQ="function"==typeof WeakSet?WeakSet:Set,RQ=null;function UQ(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){fW(t,e,n)}else n.current=null}function QQ(t,e,n){try{n()}catch(n){fW(t,e,n)}}var YQ=!1;function WQ(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,void 0!==o&&QQ(e,n,o)}i=i.next}while(i!==r)}}function FQ(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function VQ(t){var e=t.ref;if(null!==e){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}"function"==typeof e?e(t):e.current=t}}function HQ(t){var e=t.alternate;null!==e&&(t.alternate=null,HQ(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&(null!==(e=t.stateNode)&&(delete e[rB],delete e[iB],delete e[aB],delete e[sB],delete e[uB])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function GQ(t){return 5===t.tag||3===t.tag||4===t.tag}function qQ(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||GQ(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function ZQ(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!=(n=n._reactRootContainer)||null!==e.onclick||(e.onclick=F_));else if(4!==r&&null!==(t=t.child))for(ZQ(t,e,n),t=t.sibling;null!==t;)ZQ(t,e,n),t=t.sibling}function JQ(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(JQ(t,e,n),t=t.sibling;null!==t;)JQ(t,e,n),t=t.sibling}var XQ=null,KQ=!1;function $Q(t,e,n){for(n=n.child;null!==n;)tY(t,e,n),n=n.sibling}function tY(t,e,n){if(tz&&"function"==typeof tz.onCommitFiberUnmount)try{tz.onCommitFiberUnmount($O,n)}catch(t){}switch(n.tag){case 5:_Q||UQ(n,e);case 6:var r=XQ,i=KQ;XQ=null,$Q(t,e,n),KQ=i,null!==(XQ=r)&&(KQ?(t=XQ,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):XQ.removeChild(n.stateNode));break;case 18:null!==XQ&&(KQ?(t=XQ,n=n.stateNode,8===t.nodeType?$_(t.parentNode,n):1===t.nodeType&&$_(t,n),_z(t)):$_(XQ,n.stateNode));break;case 4:r=XQ,i=KQ,XQ=n.stateNode.containerInfo,KQ=!0,$Q(t,e,n),XQ=r,KQ=i;break;case 0:case 11:case 14:case 15:if(!_Q&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&QQ(n,e,a),i=i.next}while(i!==r)}$Q(t,e,n);break;case 1:if(!_Q&&(UQ(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){fW(n,e,t)}$Q(t,e,n);break;case 21:$Q(t,e,n);break;case 22:1&n.mode?(_Q=(r=_Q)||null!==n.memoizedState,$Q(t,e,n),_Q=r):$Q(t,e,n);break;default:$Q(t,e,n)}}function eY(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new BQ),e.forEach((function(e){var r=gW.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function nY(t,e){var n=e.deletions;if(null!==n)for(var r=0;ri&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=HO()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hY(r/1960))-r)){t.timeoutHandle=q_(lW.bind(null,t,kY,SY),r);break}lW(t,kY,SY);break;case 5:lW(t,kY,SY);break;default:throw Error(tD(329))}}}return HY(t,HO()),t.callbackNode===n?GY.bind(null,t):null}function qY(t,e){var n=xY;return t.current.memoizedState.isDehydrated&&(eW(t,e).flags|=256),2!==(t=oW(t,e))&&(e=kY,kY=n,null!==e&&ZY(e)),t}function ZY(t){null===kY?kY=t:kY.push.apply(kY,t)}function JY(t,e){for(e&=~EY,e&=~IY,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0t?16:t,null===zY)var r=!1;else{if(t=zY,zY=null,PY=0,0!=(6&yY))throw Error(tD(331));var i=yY;for(yY|=4,RQ=t.current;null!==RQ;){var o=RQ,a=o.child;if(0!=(16&RQ.flags)){var s=o.deletions;if(null!==s){for(var u=0;uHO()-TY?eW(t,0):EY|=n),HY(t,e)}function yW(t,e){0===e&&(0==(1&t.mode)?e=1:(e=oz,0==(130023424&(oz<<=1))&&(oz=4194304)));var n=QY();null!==(t=FY(t,e))&&(dz(t,e,n),HY(t,n))}function mW(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),yW(t,n)}function gW(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(tD(314))}null!==r&&r.delete(e),yW(t,n)}function vW(t,e){return YO(t,e)}function wW(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 bW(t,e,n,r){return new wW(t,e,n,r)}function MW(t){return!(!(t=t.prototype)||!t.isReactComponent)}function AW(t,e){var n=t.alternate;return null===n?((n=bW(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function NW(t,e,n,r,i,o){var a=2;if(r=t,"function"==typeof t)MW(t)&&(a=1);else if("string"==typeof t)a=5;else t:switch(t){case vD:return IW(n.children,i,o,e);case wD:a=8,i|=8;break;case bD:return(t=bW(12,n,e,2|i)).elementType=bD,t.lanes=o,t;case ID:return(t=bW(13,n,e,i)).elementType=ID,t.lanes=o,t;case ED:return(t=bW(19,n,e,i)).elementType=ED,t.lanes=o,t;case TD:return EW(n,i,o,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case MD:a=10;break t;case AD:a=9;break t;case ND:a=11;break t;case xD:a=14;break t;case kD:a=16,r=null;break t}throw Error(tD(130,null==t?t:typeof t,""))}return(e=bW(a,n,e,i)).elementType=t,e.type=r,e.lanes=o,e}function IW(t,e,n,r){return(t=bW(7,t,r,e)).lanes=n,t}function EW(t,e,n,r){return(t=bW(22,t,r,e)).elementType=TD,t.lanes=n,t.stateNode={},t}function xW(t,e,n){return(t=bW(6,t,null,e)).lanes=n,t}function kW(t,e,n){return(e=bW(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function TW(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hz(0),this.expirationTimes=hz(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hz(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function LW(t,e,n,r,i,o,a,s,u){return t=new TW(t,e,n,s,u),1===e?(e=1,!0===o&&(e|=8)):e=0,o=bW(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},GB(o),t}function SW(t,e,n){var r=3e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!uD.call(hD,t)||!uD.call(lD,t)&&(cD.test(t)?hD[t]=!0:(lD[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,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(t){var e=t.replace(pD,yD);fD[e]=new dD(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(pD,yD);fD[e]=new dD(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(pD,yD);fD[e]=new dD(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){fD[t]=new dD(t,1,!1,t.toLowerCase(),null,!1,!1)})),fD.xlinkHref=new dD("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){fD[t]=new dD(t,1,!1,t.toLowerCase(),null,!0,!0)}));var gD=Zx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vD=Symbol.for("react.element"),wD=Symbol.for("react.portal"),bD=Symbol.for("react.fragment"),MD=Symbol.for("react.strict_mode"),AD=Symbol.for("react.profiler"),ND=Symbol.for("react.provider"),ID=Symbol.for("react.context"),ED=Symbol.for("react.forward_ref"),xD=Symbol.for("react.suspense"),kD=Symbol.for("react.suspense_list"),TD=Symbol.for("react.memo"),LD=Symbol.for("react.lazy"),SD=Symbol.for("react.offscreen"),jD=Symbol.iterator;function CD(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=jD&&t[jD]||t["@@iterator"])?t:null}var DD,OD=Object.assign;function zD(t){if(void 0===DD)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);DD=e&&e[1]||""}return"\n"+DD+t}var PD=!1;function _D(t,e){if(!t||PD)return"";PD=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var r=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){r=t}t.call(e.prototype)}else{try{throw Error()}catch(t){r=t}t()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var u="\n"+i[a].replace(" at new "," at ");return t.displayName&&u.includes("")&&(u=u.replace("",t.displayName)),u}}while(1<=a&&0<=s);break}}}finally{PD=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?zD(t):""}function BD(t){switch(t.tag){case 5:return zD(t.type);case 16:return zD("Lazy");case 13:return zD("Suspense");case 19:return zD("SuspenseList");case 0:case 2:case 15:return t=_D(t.type,!1);case 11:return t=_D(t.type.render,!1);case 1:return t=_D(t.type,!0);default:return""}}function RD(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case bD:return"Fragment";case wD:return"Portal";case AD:return"Profiler";case MD:return"StrictMode";case xD:return"Suspense";case kD:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case ID:return(t.displayName||"Context")+".Consumer";case ND:return(t._context.displayName||"Context")+".Provider";case ED:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case TD:return null!==(e=t.displayName||null)?e:RD(t.type)||"Memo";case LD:e=t._payload,t=t._init;try{return RD(t(e))}catch(t){}}return null}function UD(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return RD(e);case 8:return e===MD?"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 e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}function QD(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function YD(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function WD(t){t._valueTracker||(t._valueTracker=function(t){var e=YD(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function FD(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=YD(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function VD(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function HD(t,e){var n=e.checked;return OD({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function GD(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=QD(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function qD(t,e){null!=(e=e.checked)&&mD(t,"checked",e,!1)}function ZD(t,e){qD(t,e);var n=QD(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?XD(t,e.type,n):e.hasOwnProperty("defaultValue")&&XD(t,e.type,QD(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function JD(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function XD(t,e,n){"number"===e&&VD(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var KD=Array.isArray;function $D(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=aO.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return sO(t,e)}))}:sO);function cO(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var lO={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},hO=["Webkit","ms","Moz","O"];function dO(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||lO.hasOwnProperty(t)&&lO[t]?(""+e).trim():e+"px"}function fO(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=dO(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(lO).forEach((function(t){hO.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),lO[e]=lO[t]}))}));var pO=OD({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 yO(t,e){if(e){if(pO[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(nD(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(nD(60));if("object"!=typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(nD(61))}if(null!=e.style&&"object"!=typeof e.style)throw Error(nD(62))}}function mO(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){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 gO=null;function vO(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var wO=null,bO=null,MO=null;function AO(t){if(t=dB(t)){if("function"!=typeof wO)throw Error(nD(280));var e=t.stateNode;e&&(e=pB(e),wO(t.stateNode,t.type,e))}}function NO(t){bO?MO?MO.push(t):MO=[t]:bO=t}function IO(){if(bO){var t=bO,e=MO;if(MO=bO=null,AO(t),e)for(t=0;t>>=0)?32:31-(iz(t)/oz|0)|0},iz=Math.log,oz=Math.LN2;var az=64,sz=4194304;function uz(t){switch(t&-t){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&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function cz(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=uz(s):0!==(o&=a)&&(r=uz(o))}else 0!==(a=n&~i)?r=uz(a):0!==o&&(r=uz(o));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(o=e&-e)||16===i&&0!=(4194240&o)))return e;if(0!=(4&r)&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function pz(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-rz(e)]=n}function yz(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-rz(n),i=1<=TP),jP=String.fromCharCode(32),CP=!1;function DP(t,e){switch(t){case"keyup":return-1!==xP.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function OP(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var zP=!1;var PP={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 _P(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!PP[t.type]:"textarea"===e}function BP(t,e,n,r){NO(r),0<(e=R_(e,"onChange")).length&&(n=new aP("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var RP=null,UP=null;function QP(t){j_(t,0)}function YP(t){if(FD(fB(t)))return t}function WP(t,e){if("change"===t)return e}var FP=!1;if(sD){var VP;if(sD){var HP="oninput"in document;if(!HP){var GP=document.createElement("div");GP.setAttribute("oninput","return;"),HP="function"==typeof GP.oninput}VP=HP}else VP=!1;FP=VP&&(!document.documentMode||9=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=n_(r)}}function i_(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?i_(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function o_(){for(var t=window,e=VD();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(!n)break;e=VD((t=e.contentWindow).document)}return e}function a_(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}function s_(t){var e=o_(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&i_(n.ownerDocument.documentElement,n)){if(null!==r&&a_(n))if(e=r.start,void 0===(t=r.end)&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if((t=(e=n.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=r_(n,o);var a=r_(n,r);i&&a&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&((e=e.createRange()).setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n=document.documentMode,c_=null,l_=null,h_=null,d_=!1;function f_(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;d_||null==c_||c_!==VD(r)||("selectionStart"in(r=c_)&&a_(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},h_&&e_(h_,r)||(h_=r,0<(r=R_(l_,"onSelect")).length&&(e=new aP("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=c_)))}function p_(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var y_={animationend:p_("Animation","AnimationEnd"),animationiteration:p_("Animation","AnimationIteration"),animationstart:p_("Animation","AnimationStart"),transitionend:p_("Transition","TransitionEnd")},m_={},g_={};function v_(t){if(m_[t])return m_[t];if(!y_[t])return t;var e,n=y_[t];for(e in n)if(n.hasOwnProperty(e)&&e in g_)return m_[t]=n[e];return t}sD&&(g_=document.createElement("div").style,"AnimationEvent"in window||(delete y_.animationend.animation,delete y_.animationiteration.animation,delete y_.animationstart.animation),"TransitionEvent"in window||delete y_.transitionend.transition);var w_=v_("animationend"),b_=v_("animationiteration"),M_=v_("animationstart"),A_=v_("transitionend"),N_=new Map,I_="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 E_(t,e){N_.set(t,e),oD(e,[t])}for(var x_=0;x_mB||(t.current=yB[mB],yB[mB]=null,mB--)}function wB(t,e){mB++,yB[mB]=t.current,t.current=e}var bB={},MB=gB(bB),AB=gB(!1),NB=bB;function IB(t,e){var n=t.type.contextTypes;if(!n)return bB;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function EB(t){return null!=(t=t.childContextTypes)}function xB(){vB(AB),vB(MB)}function kB(t,e,n){if(MB.current!==bB)throw Error(nD(168));wB(MB,e),wB(AB,n)}function TB(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(nD(108,UD(t)||"Unknown",i));return OD({},n,r)}function LB(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||bB,NB=MB.current,wB(MB,t),wB(AB,AB.current),!0}function SB(t,e,n){var r=t.stateNode;if(!r)throw Error(nD(169));n?(t=TB(t,e,NB),r.__reactInternalMemoizedMergedChildContext=t,vB(AB),vB(MB),wB(MB,t)):vB(AB),wB(AB,n)}var jB=null,CB=!1,DB=!1;function OB(t){null===jB?jB=[t]:jB.push(t)}function zB(){if(!DB&&null!==jB){DB=!0;var t=0,e=mz;try{var n=jB;for(mz=1;t>=a,i-=a,gR=1<<32-rz(e)+i|n<y?(m=p,p=null):m=p.sibling;var g=d(i,p,s[y],u);if(null===g){null===p&&(p=m);break}t&&p&&null===g.alternate&&e(i,p),a=o(g,a,y),null===l?c=g:l.sibling=g,l=g,p=m}if(y===s.length)return n(i,p),ER&&wR(i,y),c;if(null===p){for(;yy?(m=p,p=null):m=p.sibling;var v=d(i,p,g.value,u);if(null===v){null===p&&(p=m);break}t&&p&&null===v.alternate&&e(i,p),a=o(v,a,y),null===l?c=v:l.sibling=v,l=v,p=m}if(g.done)return n(i,p),ER&&wR(i,y),c;if(null===p){for(;!g.done;y++,g=s.next())null!==(g=h(i,g.value,u))&&(a=o(g,a,y),null===l?c=g:l.sibling=g,l=g);return ER&&wR(i,y),c}for(p=r(i,p);!g.done;y++,g=s.next())null!==(g=f(p,i,y,g.value,u))&&(t&&null!==g.alternate&&p.delete(null===g.key?y:g.key),a=o(g,a,y),null===l?c=g:l.sibling=g,l=g);return t&&p.forEach((function(t){return e(i,t)})),ER&&wR(i,y),c}return function t(r,o,s,u){if("object"==typeof s&&null!==s&&s.type===bD&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case vD:t:{for(var c=s.key,l=o;null!==l;){if(l.key===c){if((c=s.type)===bD){if(7===l.tag){n(r,l.sibling),(o=i(l,s.props.children)).return=r,r=o;break t}}else if(l.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===LD&&_R(c)===l.type){n(r,l.sibling),(o=i(l,s.props)).ref=zR(r,l,s),o.return=r,r=o;break t}n(r,l);break}e(r,l),l=l.sibling}s.type===bD?((o=xW(s.props.children,r.mode,u,s.key)).return=r,r=o):((u=EW(s.type,s.key,s.props,null,r.mode,u)).ref=zR(r,o,s),u.return=r,r=u)}return a(r);case wD:t:{for(l=s.key;null!==o;){if(o.key===l){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break t}n(r,o);break}e(r,o),o=o.sibling}(o=LW(s,r.mode,u)).return=r,r=o}return a(r);case LD:return t(r,o,(l=s._init)(s._payload),u)}if(KD(s))return p(r,o,s,u);if(CD(s))return y(r,o,s,u);PR(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=TW(s,r.mode,u)).return=r,r=o),a(r)):n(r,o)}}var RR=BR(!0),UR=BR(!1),QR={},YR=gB(QR),WR=gB(QR),FR=gB(QR);function VR(t){if(t===QR)throw Error(nD(174));return t}function HR(t,e){switch(wB(FR,e),wB(WR,t),wB(YR,QR),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:oO(null,"");break;default:e=oO(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}vB(YR),wB(YR,e)}function GR(){vB(YR),vB(WR),vB(FR)}function qR(t){VR(FR.current);var e=VR(YR.current),n=oO(e,t.type);e!==n&&(wB(WR,t),wB(YR,n))}function ZR(t){WR.current===t&&(vB(YR),vB(WR))}var JR=gB(0);function XR(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var KR=[];function $R(){for(var t=0;tn?n:4,t(!0);var r=eU.transition;eU.transition={};try{t(!1),e()}finally{mz=n,eU.transition=r}}function QU(){return yU().memoizedState}function YU(t,e,n){var r=FY(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},FU(t)?VU(e,n):(HU(t,e,n),null!==(t=VY(t,r,n=WY()))&&GU(t,e,r))}function WU(t,e,n){var r=FY(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(FU(t))VU(e,i);else{HU(t,e,i);var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,t_(s,a))return}catch(t){}null!==(t=VY(t,r,n=WY()))&&GU(t,e,r)}}function FU(t){var e=t.alternate;return t===rU||null!==e&&e===rU}function VU(t,e){sU=aU=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function HU(t,e,n){GY(t)?(null===(t=e.interleaved)?(n.next=n,null===GB?GB=[e]:GB.push(e)):(n.next=t.next,t.next=n),e.interleaved=n):(null===(t=e.pending)?n.next=n:(n.next=t.next,t.next=n),e.pending=n)}function GU(t,e,n){if(0!=(4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,yz(t,n)}}var qU={readContext:HB,useCallback:lU,useContext:lU,useEffect:lU,useImperativeHandle:lU,useInsertionEffect:lU,useLayoutEffect:lU,useMemo:lU,useReducer:lU,useRef:lU,useState:lU,useDebugValue:lU,useDeferredValue:lU,useTransition:lU,useMutableSource:lU,useSyncExternalStore:lU,useId:lU,unstable_isNewReconciler:!1},ZU={readContext:HB,useCallback:function(t,e){return pU().memoizedState=[t,void 0===e?null:e],t},useContext:HB,useEffect:SU,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,TU(4194308,4,OU.bind(null,e,t),n)},useLayoutEffect:function(t,e){return TU(4194308,4,t,e)},useInsertionEffect:function(t,e){return TU(4,2,t,e)},useMemo:function(t,e){var n=pU();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=pU();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=YU.bind(null,rU,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},pU().memoizedState=t},useState:EU,useDebugValue:PU,useDeferredValue:function(t){return pU().memoizedState=t},useTransition:function(){var t=EU(!1),e=t[0];return t=UU.bind(null,t[1]),pU().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=rU,i=pU();if(ER){if(void 0===n)throw Error(nD(407));n=n()}else{if(n=e(),null===vY)throw Error(nD(349));0!=(30&nU)||MU(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,SU(NU.bind(null,r,o,t),[t]),r.flags|=2048,xU(9,AU.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=pU(),e=vY.identifierPrefix;if(ER){var n=vR;e=":"+e+"R"+(n=(gR&~(1<<32-rz(gR)-1)).toString(32)+n),0<(n=uU++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=cU++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},JU={readContext:HB,useCallback:_U,useContext:HB,useEffect:jU,useImperativeHandle:zU,useInsertionEffect:CU,useLayoutEffect:DU,useMemo:BU,useReducer:gU,useRef:kU,useState:function(){return gU(mU)},useDebugValue:PU,useDeferredValue:function(t){return RU(yU(),iU.memoizedState,t)},useTransition:function(){return[gU(mU)[0],yU().memoizedState]},useMutableSource:wU,useSyncExternalStore:bU,useId:QU,unstable_isNewReconciler:!1},XU={readContext:HB,useCallback:_U,useContext:HB,useEffect:jU,useImperativeHandle:zU,useInsertionEffect:CU,useLayoutEffect:DU,useMemo:BU,useReducer:vU,useRef:kU,useState:function(){return vU(mU)},useDebugValue:PU,useDeferredValue:function(t){var e=yU();return null===iU?e.memoizedState=t:RU(e,iU.memoizedState,t)},useTransition:function(){return[vU(mU)[0],yU().memoizedState]},useMutableSource:wU,useSyncExternalStore:bU,useId:QU,unstable_isNewReconciler:!1};function KU(t,e){try{var n="",r=e;do{n+=BD(r),r=r.return}while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i}}function $U(t,e){try{console.error(e.value)}catch(t){setTimeout((function(){throw t}))}}var tQ,eQ,nQ,rQ="function"==typeof WeakMap?WeakMap:Map;function iQ(t,e,n){(n=XB(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){DY||(DY=!0,OY=r),$U(0,e)},n}function oQ(t,e,n){(n=XB(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){$U(0,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){$U(0,e),"function"!=typeof r&&(null===zY?zY=new Set([this]):zY.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function aQ(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new rQ;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=mW.bind(null,t,e,n),e.then(t,t))}function sQ(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function uQ(t,e,n,r,i){return 0==(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=XB(-1,1)).tag=2,KB(n,e))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}function cQ(t,e){if(!ER)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function lQ(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function hQ(t,e,n){var r=e.pendingProps;switch(AR(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lQ(e),null;case 1:return EB(e.type)&&xB(),lQ(e),null;case 3:return r=e.stateNode,GR(),vB(AB),vB(MB),$R(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(CR(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==xR&&(XY(xR),xR=null))),lQ(e),null;case 5:ZR(e);var i=VR(FR.current);if(n=e.type,null!==t&&null!=e.stateNode)eQ(t,e,n,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(nD(166));return lQ(e),null}if(t=VR(YR.current),CR(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[oB]=e,r[aB]=o,t=0!=(1&e.mode),n){case"dialog":C_("cancel",r),C_("close",r);break;case"iframe":case"object":case"embed":C_("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),"select"===n&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[oB]=e,t[aB]=r,tQ(t,e),e.stateNode=t;t:{switch(a=mO(n,r),n){case"dialog":C_("cancel",t),C_("close",t),i=r;break;case"iframe":case"object":case"embed":C_("load",t),i=r;break;case"video":case"audio":for(i=0;ijY&&(e.flags|=128,r=!0,cQ(o,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=XR(a))){if(e.flags|=128,r=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),cQ(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!ER)return lQ(e),null}else 2*qO()-o.renderingStartTime>jY&&1073741824!==n&&(e.flags|=128,r=!0,cQ(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(null!==(n=o.last)?n.sibling=a:e.child=a,o.last=a)}return null!==o.tail?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=qO(),e.sibling=null,n=JR.current,wB(JR,r?1&n|2:1&n),e):(lQ(e),null);case 22:case 23:return nW(),r=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==r&&(e.flags|=8192),r&&0!=(1&e.mode)?0!=(1073741824&MY)&&(lQ(e),6&e.subtreeFlags&&(e.flags|=8192)):lQ(e),null;case 24:case 25:return null}throw Error(nD(156,e.tag))}tQ=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},eQ=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,VR(YR.current);var o,a=null;switch(n){case"input":i=HD(t,i),r=HD(t,r),a=[];break;case"select":i=OD({},i,{value:void 0}),r=OD({},r,{value:void 0}),a=[];break;case"textarea":i=tO(t,i),r=tO(t,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(t.onclick=H_)}for(c in yO(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(iD.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==s&&(null!=u||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&s[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(iD.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&C_("scroll",t),a||s===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(e.updateQueue=c)&&(e.flags|=4)}},nQ=function(t,e,n,r){n!==r&&(e.flags|=4)};var dQ=gD.ReactCurrentOwner,fQ=!1;function pQ(t,e,n,r){e.child=null===t?UR(e,null,n,r):RR(e,t.child,n,r)}function yQ(t,e,n,r,i){n=n.render;var o=e.ref;return VB(e,i),r=dU(t,e,n,r,o,i),n=fU(),null===t||fQ?(ER&&n&&MR(e),e.flags|=1,pQ(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,PQ(t,e,i))}function mQ(t,e,n,r,i){if(null===t){var o=n.type;return"function"!=typeof o||NW(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=EW(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,gQ(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:e_)(a,r)&&t.ref===e.ref)return PQ(t,e,i)}return e.flags|=1,(t=IW(o,r)).ref=e.ref,t.return=e,e.child=t}function gQ(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if(e_(o,r)&&t.ref===e.ref){if(fQ=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,PQ(t,e,i);0!=(131072&t.flags)&&(fQ=!0)}}return bQ(t,e,n,r,i)}function vQ(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode)if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},wB(AY,MY),MY|=n;else{if(0==(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,wB(AY,MY),MY|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,wB(AY,MY),MY|=r}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,wB(AY,MY),MY|=r;return pQ(t,e,i,n),e.child}function wQ(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function bQ(t,e,n,r,i){var o=EB(n)?NB:MB.current;return o=IB(e,o),VB(e,i),n=dU(t,e,n,r,o,i),r=fU(),null===t||fQ?(ER&&r&&MR(e),e.flags|=1,pQ(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,PQ(t,e,i))}function MQ(t,e,n,r,i){if(EB(n)){var o=!0;LB(e)}else o=!1;if(VB(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),sR(e,n,r),cR(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=HB(c):c=IB(e,c=EB(n)?NB:MB.current);var l=n.getDerivedStateFromProps,h="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;h||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&uR(e,a,r,c),qB=!1;var d=e.memoizedState;a.state=d,eR(e,r,a,i),u=e.memoizedState,s!==r||d!==u||AB.current||qB?("function"==typeof l&&(iR(e,n,l,r),u=e.memoizedState),(s=qB||aR(e,n,s,r,d,u,c))?(h||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.flags|=4194308)):("function"==typeof a.componentDidMount&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"==typeof a.componentDidMount&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,JB(t,e),s=e.memoizedProps,c=e.type===e.elementType?s:_B(e.type,s),a.props=c,h=e.pendingProps,d=a.context,"object"==typeof(u=n.contextType)&&null!==u?u=HB(u):u=IB(e,u=EB(n)?NB:MB.current);var f=n.getDerivedStateFromProps;(l="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==h||d!==u)&&uR(e,a,r,u),qB=!1,d=e.memoizedState,a.state=d,eR(e,r,a,i);var p=e.memoizedState;s!==h||d!==p||AB.current||qB?("function"==typeof f&&(iR(e,n,f,r),p=e.memoizedState),(c=qB||aR(e,n,c,r,d,p,u)||!1)?(l||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(e.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return AQ(t,e,n,r,o,i)}function AQ(t,e,n,r,i,o){wQ(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&SB(e,n,!1),PQ(t,e,o);r=e.stateNode,dQ.current=e;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=RR(e,t.child,null,o),e.child=RR(e,null,s,o)):pQ(t,e,s,o),e.memoizedState=r.state,i&&SB(e,n,!0),e.child}function NQ(t){var e=t.stateNode;e.pendingContext?kB(0,e.pendingContext,e.pendingContext!==e.context):e.context&&kB(0,e.context,!1),HR(t,e.containerInfo)}function IQ(t,e,n,r,i){return DR(),OR(i),e.flags|=256,pQ(t,e,n,r),e.child}var EQ={dehydrated:null,treeContext:null,retryLane:0};function xQ(t){return{baseLanes:t,cachePool:null,transitions:null}}function kQ(t,e){return{baseLanes:t.baseLanes|e,cachePool:null,transitions:t.transitions}}function TQ(t,e,n){var r,i=e.pendingProps,o=JR.current,a=!1,s=0!=(128&e.flags);if((r=s)||(r=(null===t||null!==t.memoizedState)&&0!=(2&o)),r?(a=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(o|=1),wB(JR,1&o),null===t)return SR(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0==(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=1073741824,null):(o=i.children,t=i.fallback,a?(i=e.mode,a=e.child,o={mode:"hidden",children:o},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=o):a=kW(o,i,0,null),t=xW(t,i,n,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=xQ(n),e.memoizedState=EQ,t):LQ(e,o));if(null!==(o=t.memoizedState)){if(null!==(r=o.dehydrated)){if(s)return 256&e.flags?(e.flags&=-257,CQ(t,e,n,Error(nD(422)))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(a=i.fallback,o=e.mode,i=kW({mode:"visible",children:i.children},o,0,null),(a=xW(a,o,n,null)).flags|=2,i.return=e,a.return=e,i.sibling=a,e.child=i,0!=(1&e.mode)&&RR(e,t.child,null,n),e.child.memoizedState=xQ(n),e.memoizedState=EQ,a);if(0==(1&e.mode))e=CQ(t,e,n,null);else if("$!"===r.data)e=CQ(t,e,n,Error(nD(419)));else if(i=0!=(n&t.childLanes),fQ||i){if(null!==(i=vY)){switch(n&-n){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(i=0!=(a&(i.suspendedLanes|n))?0:a)&&i!==o.retryLane&&(o.retryLane=i,VY(t,i,-1))}aW(),e=CQ(t,e,n,Error(nD(421)))}else"$?"===r.data?(e.flags|=128,e.child=t.child,e=vW.bind(null,t),r._reactRetry=e,e=null):(n=o.treeContext,IR=nB(r.nextSibling),NR=e,ER=!0,xR=null,null!==n&&(pR[yR++]=gR,pR[yR++]=vR,pR[yR++]=mR,gR=n.id,vR=n.overflow,mR=e),(e=LQ(e,e.pendingProps.children)).flags|=4096);return e}return a?(i=jQ(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?xQ(n):kQ(o,n),a.childLanes=t.childLanes&~n,e.memoizedState=EQ,i):(n=SQ(t,e,i.children,n),e.memoizedState=null,n)}return a?(i=jQ(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?xQ(n):kQ(o,n),a.childLanes=t.childLanes&~n,e.memoizedState=EQ,i):(n=SQ(t,e,i.children,n),e.memoizedState=null,n)}function LQ(t,e){return(e=kW({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function SQ(t,e,n,r){var i=t.child;return t=i.sibling,n=IW(i,{mode:"visible",children:n}),0==(1&e.mode)&&(n.lanes=r),n.return=e,n.sibling=null,null!==t&&(null===(r=e.deletions)?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n}function jQ(t,e,n,r,i){var o=e.mode,a=(t=t.child).sibling,s={mode:"hidden",children:n};return 0==(1&o)&&e.child!==t?((n=e.child).childLanes=0,n.pendingProps=s,e.deletions=null):(n=IW(t,s)).subtreeFlags=14680064&t.subtreeFlags,null!==a?r=IW(a,r):(r=xW(r,o,i,null)).flags|=2,r.return=e,n.return=e,n.sibling=r,e.child=n,r}function CQ(t,e,n,r){return null!==r&&OR(r),RR(e,t.child,null,n),(t=LQ(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function DQ(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),FB(t.return,e,n)}function OQ(t,e,n,r,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function zQ(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(pQ(t,e,r.children,n),0!=(2&(r=JR.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&DQ(t,n,e);else if(19===t.tag)DQ(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(wB(JR,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===XR(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),OQ(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===XR(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}OQ(e,!0,n,null,o);break;case"together":OQ(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function PQ(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),EY|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(nD(153));if(null!==e.child){for(n=IW(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=IW(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function _Q(t,e){switch(AR(e),e.tag){case 1:return EB(e.type)&&xB(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return GR(),vB(AB),vB(MB),$R(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return ZR(e),null;case 13:if(vB(JR),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(nD(340));DR()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return vB(JR),null;case 4:return GR(),null;case 10:return WB(e.type._context),null;case 22:case 23:return nW(),null;case 24:default:return null}}var BQ=!1,RQ=!1,UQ="function"==typeof WeakSet?WeakSet:Set,QQ=null;function YQ(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){yW(t,e,n)}else n.current=null}function WQ(t,e,n){try{n()}catch(n){yW(t,e,n)}}var FQ=!1;function VQ(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,void 0!==o&&WQ(e,n,o)}i=i.next}while(i!==r)}}function HQ(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function GQ(t){var e=t.ref;if(null!==e){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}"function"==typeof e?e(t):e.current=t}}function qQ(t){var e=t.alternate;null!==e&&(t.alternate=null,qQ(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&(null!==(e=t.stateNode)&&(delete e[oB],delete e[aB],delete e[uB],delete e[cB],delete e[lB])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ZQ(t){return 5===t.tag||3===t.tag||4===t.tag}function JQ(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||ZQ(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function XQ(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!=(n=n._reactRootContainer)||null!==e.onclick||(e.onclick=H_));else if(4!==r&&null!==(t=t.child))for(XQ(t,e,n),t=t.sibling;null!==t;)XQ(t,e,n),t=t.sibling}function KQ(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(KQ(t,e,n),t=t.sibling;null!==t;)KQ(t,e,n),t=t.sibling}var $Q=null,tY=!1;function eY(t,e,n){for(n=n.child;null!==n;)nY(t,e,n),n=n.sibling}function nY(t,e,n){if(nz&&"function"==typeof nz.onCommitFiberUnmount)try{nz.onCommitFiberUnmount(ez,n)}catch(t){}switch(n.tag){case 5:RQ||YQ(n,e);case 6:var r=$Q,i=tY;$Q=null,eY(t,e,n),tY=i,null!==($Q=r)&&(tY?(t=$Q,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):$Q.removeChild(n.stateNode));break;case 18:null!==$Q&&(tY?(t=$Q,n=n.stateNode,8===t.nodeType?eB(t.parentNode,n):1===t.nodeType&&eB(t,n),Rz(t)):eB($Q,n.stateNode));break;case 4:r=$Q,i=tY,$Q=n.stateNode.containerInfo,tY=!0,eY(t,e,n),$Q=r,tY=i;break;case 0:case 11:case 14:case 15:if(!RQ&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&WQ(n,e,a),i=i.next}while(i!==r)}eY(t,e,n);break;case 1:if(!RQ&&(YQ(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){yW(n,e,t)}eY(t,e,n);break;case 21:eY(t,e,n);break;case 22:1&n.mode?(RQ=(r=RQ)||null!==n.memoizedState,eY(t,e,n),RQ=r):eY(t,e,n);break;default:eY(t,e,n)}}function rY(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new UQ),e.forEach((function(e){var r=wW.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function iY(t,e){var n=e.deletions;if(null!==n)for(var r=0;ri&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=qO()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fY(r/1960))-r)){t.timeoutHandle=J_(dW.bind(null,t,LY,CY),r);break}dW(t,LY,CY);break;case 5:dW(t,LY,CY);break;default:throw Error(nD(329))}}}return qY(t,qO()),t.callbackNode===n?ZY.bind(null,t):null}function JY(t,e){var n=TY;return t.current.memoizedState.isDehydrated&&(rW(t,e).flags|=256),2!==(t=sW(t,e))&&(e=LY,LY=n,null!==e&&XY(e)),t}function XY(t){null===LY?LY=t:LY.push.apply(LY,t)}function KY(t,e){for(e&=~kY,e&=~xY,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0t?16:t,null===_Y)var r=!1;else{if(t=_Y,_Y=null,BY=0,0!=(6&gY))throw Error(nD(331));var i=gY;for(gY|=4,QQ=t.current;null!==QQ;){var o=QQ,a=o.child;if(0!=(16&QQ.flags)){var s=o.deletions;if(null!==s){for(var u=0;uqO()-SY?rW(t,0):kY|=n),qY(t,e)}function gW(t,e){0===e&&(0==(1&t.mode)?e=1:(e=sz,0==(130023424&(sz<<=1))&&(sz=4194304)));var n=WY();null!==(t=HY(t,e))&&(pz(t,e,n),qY(t,n))}function vW(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),gW(t,n)}function wW(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(nD(314))}null!==r&&r.delete(e),gW(t,n)}function bW(t,e){return FO(t,e)}function MW(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 AW(t,e,n,r){return new MW(t,e,n,r)}function NW(t){return!(!(t=t.prototype)||!t.isReactComponent)}function IW(t,e){var n=t.alternate;return null===n?((n=AW(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function EW(t,e,n,r,i,o){var a=2;if(r=t,"function"==typeof t)NW(t)&&(a=1);else if("string"==typeof t)a=5;else t:switch(t){case bD:return xW(n.children,i,o,e);case MD:a=8,i|=8;break;case AD:return(t=AW(12,n,e,2|i)).elementType=AD,t.lanes=o,t;case xD:return(t=AW(13,n,e,i)).elementType=xD,t.lanes=o,t;case kD:return(t=AW(19,n,e,i)).elementType=kD,t.lanes=o,t;case SD:return kW(n,i,o,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case ND:a=10;break t;case ID:a=9;break t;case ED:a=11;break t;case TD:a=14;break t;case LD:a=16,r=null;break t}throw Error(nD(130,null==t?t:typeof t,""))}return(e=AW(a,n,e,i)).elementType=t,e.type=r,e.lanes=o,e}function xW(t,e,n,r){return(t=AW(7,t,r,e)).lanes=n,t}function kW(t,e,n,r){return(t=AW(22,t,r,e)).elementType=SD,t.lanes=n,t.stateNode={},t}function TW(t,e,n){return(t=AW(6,t,null,e)).lanes=n,t}function LW(t,e,n){return(e=AW(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function SW(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fz(0),this.expirationTimes=fz(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fz(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jW(t,e,n,r,i,o,a,s,u){return t=new SW(t,e,n,s,u),1===e?(e=1,!0===o&&(e|=8)):e=0,o=AW(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ZB(o),t}function CW(t,e,n){var r=3{setTimeout((()=>{this.setState({open:!0})}),10)})),this.props.document.addEventListener("keydown",this.handler,!0)}componentWillUnmount(){this.props.document.removeEventListener("keydown",this.handler,!0)}render(){const t=["ReactDialog",this.state.open?"ReactDialogOpen":""],e=`\n .ReactDialog {\n bottom: 0;\n display: flex;\n height: 100%;\n height: 100vh;\n left: 0;\n min-height: 100%;\n min-height: 100vh;\n overflow: hidden;\n position: fixed;\n right: 0;\n top: 0;\n width: 100%;\n width: 100vw;\n }\n\n .ReactDialogInner {\n align-items: center;\n display: flex;\n flex: 1;\n justify-content: center;\n }\n\n .ReactDialogBackground {\n background: ${"object"==typeof(n={background:this.props.background})&&n.background?n.background:"rgba(0,0,0,0.4)"};\n bottom: 0;\n display: block;\n height: 100%;\n left: 0;\n opacity: 0;\n position: fixed;\n right: 0;\n top: 0;\n transition: opacity 0.4s ease;\n width: 100%;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogBackground {\n opacity: 1;\n }\n\n .ReactDialogAnimation {\n display: inline-block;\n position: relative;\n opacity: 0;\n top: -17vh;\n transition: opacity 0.4s ease, top 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n opacity: 1.0;\n top: -5vh;\n }\n `;var n;return Zx.createElement("div",{key:this.props.dialogKey,className:t.join(" "),__self:this,__source:{fileName:JW,lineNumber:59}},Zx.createElement("style",{__self:this,__source:{fileName:JW,lineNumber:60}},e),Zx.createElement("div",{className:"ReactDialogInner",__self:this,__source:{fileName:JW,lineNumber:61}},Zx.createElement("div",{className:"ReactDialogBackground",onClick:this.onClickBackground.bind(this),__self:this,__source:{fileName:JW,lineNumber:62}}),this.props.children))}}class KW extends Zx.Component{constructor(t){super(t),this.state={open:t.open}}componentDidUpdate(t){!1===this.props.open&&!0===t.open?setTimeout((()=>{this.setState({open:!1})}),400):!0===this.props.open&&!1===t.open&&this.setState({open:!0})}render(){let t=this.props.document||document,e=this.props.container||t.body;return this.state.open?ZW.createPortal(Zx.createElement(XW,{background:this.props.background,close:this.props.close,document:t,open:this.props.open,animate:this.props.animate,__self:this,__source:{fileName:"/Users/sebastian/Work/DePay/react-dialog/src/index.jsx",lineNumber:29}},this.props.children),e):null}}var $W=Zx.createContext(),tF=Zx.createContext();var eF=Zx.createContext();const nF="/Users/sebastian/Work/DePay/react-dialog-stack/src/index.jsx";class rF extends Zx.Component{constructor(t){if(super(t),t.setNavigator&&t.setNavigator(this),t.stacked){const e="string"==typeof t.stacked?t.stacked:"forward";this.state={stack:[],animating:!1,animation:null,direction:e,animationSpeed:200},setTimeout((()=>this.navigate(t.start,e)),10)}else this.state={stack:[t.start],animating:!1,animation:null,direction:"forward",animationSpeed:200}}set(t){this.setState({stack:t})}hide(t="forward"){"backward"===t?(this.setState({stack:[null,...this.state.stack]}),setTimeout((()=>this.navigate("back")),10)):this.navigate(null)}navigate(t,e="forward"){if(!(this.state.stack.indexOf(t)>-1))return"back"===t?this.unstack():void this.setState({stack:this.state.stack.concat(t),animating:!0,direction:e,animation:setTimeout(function(){this.setState({animating:!1})}.bind(this),this.state.animationSpeed)})}unstack(){if(this.state.stack.length<=1)return;let t=[...this.state.stack];t.pop(),this.setState({animating:!0,direction:"backward",animation:setTimeout(function(){this.setState({stack:t,animating:!1})}.bind(this),this.state.animationSpeed)})}classForState(t){if(!this.state.animating)return 1===this.state.stack.length||this.state.stack.length===t+1?"active":"inactive"}classForPosition(t){return this.state.stack.length>1?this.state.stack.length===t+1?"forward"===this.state.direction?"next":"previous":this.state.stack.length-1===t+1?"forward"===this.state.direction?"previous":"next":"stale":this.state.animating&&this.props.stacked&&0===t?"next":void 0}classForAnimation(){if(this.state.animating)return"animating"}classForDirection(){return this.state.direction}renderStack(){return this.state.stack.map(function(t,e){let n=[this.classForState(e),this.classForPosition(e),this.classForAnimation(),this.classForDirection()];return Zx.createElement("div",{key:e,className:["ReactDialogStack"].concat(n).join(" "),onClick:this.onClick.bind(this),__self:this,__source:{fileName:nF,lineNumber:153}},Zx.createElement(tF.Provider,{value:{navigate:this.navigate.bind(this),set:this.set.bind(this),hide:this.hide.bind(this)},__self:this,__source:{fileName:nF,lineNumber:158}},Zx.createElement($W.Provider,{value:this.close.bind(this),__self:this,__source:{fileName:nF,lineNumber:161}},Zx.createElement(eF.Provider,{value:this.state.stack,__self:this,__source:{fileName:nF,lineNumber:162}},Zx.createElement("div",{className:"ReactDialogAnimation",__self:this,__source:{fileName:nF,lineNumber:163}},this.props.dialogs[t])))))}.bind(this))}onClick(t){t.target&&t.target.className&&t.target.className.match&&t.target.className.match("ReactDialogStack")&&(this.state.stack.length>1?this.unstack():this.close())}close(t){this.state.stack.length>1&&!t?this.unstack():(this.props.close(),setTimeout((()=>this.setState({stack:this.state.stack.slice(0,1)})),400))}render(){return Zx.createElement(KW,{close:this.close.bind(this),open:this.props.open,document:this.props.document,container:this.props.container,animate:!this.props.stacked,background:this.props.background,__self:this,__source:{fileName:nF,lineNumber:199}},Zx.createElement("style",{__self:this,__source:{fileName:nF,lineNumber:207}},"\n\n .ReactDialogStack {\n align-items: center;\n bottom: 0;\n display: flex;\n flex: 1;\n height: 100%;\n justify-content: center;\n position: absolute;\n top: 0;\n transition: left 0.1s ease, opacity 0.2s ease;\n width: 100%;\n }\n\n .ReactDialogStackRow {\n display: table-row;\n }\n\n .ReactDialogStackCell {\n display: table-cell;\n vertical-align: middle;\n padding: 0 0.6rem;\n }\n\n .ReactDialogStack {\n left: 0;\n opacity: 1;\n }\n\n .ReactDialogStack.inactive {\n display: none;\n }\n\n .ReactDialogStack.animating.stale {\n display: none;\n }\n\n .ReactDialogStack.animating.previous.forward {\n opacity: 0;\n left: -5rem;\n }\n\n .ReactDialogStack.animating.previous.backward {\n opacity: 0;\n left: 5rem;\n }\n\n .ReactDialogStack.animating.next.forward {\n opacity: 0;\n left: 5rem;\n }\n\n .ReactDialogStack.animating.next.backward {\n opacity: 0;\n left: -5rem;\n }\n "),this.renderStack())}}var iF=function(t){var e=Zx.useContext(tF).navigate,n=Zx.useContext(Jx),r=n.close,i=n.closable;return Zx.createElement("div",{className:["Dialog",t.className].join(" ")},Zx.createElement("div",{className:["DialogHeader",t.stacked?"TextCenter":""].join(" ")},t.stacked&&Zx.createElement("div",{className:"DialogHeaderActionLeft PaddingTopS PaddingLeftS PaddingRightS"},Zx.createElement("button",{type:"button",onClick:function(){return e("back")},className:"ButtonCircular",title:"Go back"},Zx.createElement(JC,null))),i&&!1!==t.closable&&Zx.createElement("div",{className:"DialogHeaderActionRight PaddingTopS PaddingLeftS PaddingRightS"},t.alternativeHeaderAction,Zx.createElement("button",{type:"button",onClick:r,className:"ButtonCircular",title:"Close dialog"},Zx.createElement(XC,null))),t.header),Zx.createElement("div",{ref:t.bodyRef,className:["DialogBody",t.bodyClassName].join(" ")},t.body),!1!==t.footer&&Zx.createElement("div",{className:"DialogFooter"},t.footer))},oF=function(){return"undefined"!=typeof window&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/.test(navigator.userAgent))},aF=qf(Zf((function(t,e){self,t.exports=(()=>{var t={192:(t,e)=>{var n,r,i=function(){var t=function(t,e){var n=t,r=a[e],i=null,o=0,u=null,m=[],g={},w=function(t,e){i=function(t){for(var e=new Array(t),n=0;n=7&&N(t),null==u&&(u=x(n,r,m)),E(u,e)},b=function(t,e){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||o<=t+n))for(var r=-1;r<=7;r+=1)e+r<=-1||o<=e+r||(i[t+n][e+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)},M=function(){for(var t=8;t>r&1);i[Math.floor(r/3)][r%3+o-8-3]=a}for(r=0;r<18;r+=1)a=!t&&1==(e>>r&1),i[r%3+o-8-3][Math.floor(r/3)]=a},I=function(t,e){for(var n=r<<3|e,a=s.getBCHTypeInfo(n),u=0;u<15;u+=1){var c=!t&&1==(a>>u&1);u<6?i[u][8]=c:u<8?i[u+1][8]=c:i[o-15+u][8]=c}for(u=0;u<15;u+=1)c=!t&&1==(a>>u&1),u<8?i[8][o-u-1]=c:u<9?i[8][15-u-1+1]=c:i[8][15-u-1]=c;i[o-8][8]=!t},E=function(t,e){for(var n=-1,r=o-1,a=7,u=0,c=s.getMaskFunction(e),l=o-1;l>0;l-=2)for(6==l&&(l-=1);;){for(var h=0;h<2;h+=1)if(null==i[r][l-h]){var d=!1;u>>a&1)),c(r,l-h)&&(d=!d),i[r][l-h]=d,-1==(a-=1)&&(u+=1,a=7)}if((r+=n)<0||o<=r){r-=n,n=-n;break}}},x=function(t,e,n){for(var r=l.getRSBlocks(t,e),i=h(),o=0;o8*u)throw"code length overflow. ("+i.getLengthInBits()+">"+8*u+")";for(i.getLengthInBits()+4<=8*u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*u||(i.put(236,8),i.getLengthInBits()>=8*u));)i.put(17,8);return function(t,e){for(var n=0,r=0,i=0,o=new Array(e.length),a=new Array(e.length),u=0;u=0?p.getAt(y):0}}var m=0;for(d=0;dr)&&(t=r,e=n)}return e}())},g.createTableTag=function(t,e){t=t||2;var n="";n+='',n+="";for(var r=0;r";for(var i=0;i';n+=""}return(n+="")+"
"},g.createSvgTag=function(t,e,n,r){var i={};"object"==typeof arguments[0]&&(t=(i=arguments[0]).cellSize,e=i.margin,n=i.alt,r=i.title),t=t||2,e=void 0===e?4*t:e,(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,a,s,u,c=g.getModuleCount()*t+2*e,l="";for(u="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",l+='"},g.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var n=g.getModuleCount()*t+2*e,r=e,i=n-e;return v(n,n,(function(e,n){if(r<=e&&e"};var k=function(t){for(var e="",n=0;n":e+=">";break;case"&":e+="&";break;case'"':e+=""";break;default:e+=r}}return e};return g.createASCII=function(t,e){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var e,n,r,i,o,a=1*g.getModuleCount()+2*t,s=t,u=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},l={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(e=0;e=u?l[o]:c[o];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(e);t-=1,e=void 0===e?2*t:e;var n,r,i,o,a=g.getModuleCount()*t+2*e,s=e,u=a-e,c=Array(t+1).join("██"),l=Array(t+1).join(" "),h="",d="";for(n=0;n>>8),e.push(255&a)):e.push(r)}}return e}};var e,n,r,i,o,a={L:1,M:0,Q:3,H:2},s=(e=[[],[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(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(i={}).getBCHTypeInfo=function(t){for(var e=t<<10;o(e)-o(n)>=0;)e^=n<=0;)e^=r<5&&(n+=3+o-5)}for(r=0;r=256;)e-=255;return t[e]}}}();function c(t,e){if(void 0===t.length)throw t.length+"/"+e;var n=function(){for(var n=0;n>>7-e%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return e},putBit:function(n){var r=Math.floor(e/8);t.length<=r&&t.push(0),n&&(t[r]|=128>>>e%8),e+=1}};return n},d=function(t){var e=t,n={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var n=e,i=0;i+2>>8&255)+(255&i),t.put(i,13),n+=2}if(n>>8)},writeBytes:function(t,n,r){n=n||0,r=r||t.length;for(var i=0;i0&&(e+=","),e+=t[n];return e+"]"}};return e},g=function(t){var e=t,n=0,r=0,i=0,o={read:function(){for(;i<8;){if(n>=e.length){if(0==i)return-1;throw"unexpected end of file./"+i}var t=e.charAt(n);if(n+=1,"="==t)return i=0,-1;t.match(/^\s$/)||(r=r<<6|a(t.charCodeAt(0)),i+=6)}var o=r>>>i-8&255;return i-=8,o}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return o},v=function(t,e,n){for(var r=function(t,e){var n=t,r=e,i=new Array(t*e),o={setPixel:function(t,e,r){i[e*n+t]=r},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(r),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(r),t.writeByte(0);var e=a(2);t.writeByte(2);for(var i=0;e.length-i>255;)t.writeByte(255),t.writeBytes(e,i,255),i+=255;t.writeByte(e.length-i),t.writeBytes(e,i,e.length-i),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;c+e>=8;)u.writeByte(255&(t<>>=8-c,l=0,c=0;l|=t<0&&u.writeByte(l)}});d.write(e,r);var f=0,p=String.fromCharCode(i[f]);for(f+=1;f=6;)o(t>>>e-6),e-=6},i.flush=function(){if(e>0&&(o(t<<6-e),t=0,e=0),n%3!=0)for(var i=3-n%3,a=0;a>6,128|63&r):r<55296||r>=57344?e.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&t.charCodeAt(n)),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return e}(t)},void 0===(r="function"==typeof(n=function(){return i})?n.apply(e,[]):n)||(t.exports=r)},676:(t,e,n)=>{n.d(e,{default:()=>D});var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]2||o&&a||s&&u)this._basicSquare({x:e,y:n,size:r,rotation:0});else{if(2===c){var l=0;return o&&s?l=Math.PI/2:s&&a?l=Math.PI:a&&u&&(l=-Math.PI/2),void this._basicCornerRounded({x:e,y:n,size:r,rotation:l})}if(1===c)return l=0,s?l=Math.PI/2:a?l=Math.PI:u&&(l=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:r,rotation:l})}else this._basicDot({x:e,y:n,size:r,rotation:0})},t.prototype._drawExtraRounded=function(t){var e=t.x,n=t.y,r=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0,c=o+a+s+u;if(0!==c)if(c>2||o&&a||s&&u)this._basicSquare({x:e,y:n,size:r,rotation:0});else{if(2===c){var l=0;return o&&s?l=Math.PI/2:s&&a?l=Math.PI:a&&u&&(l=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:n,size:r,rotation:l})}if(1===c)return l=0,s?l=Math.PI/2:a?l=Math.PI:u&&(l=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:r,rotation:l})}else this._basicDot({x:e,y:n,size:r,rotation:0})},t.prototype._drawClassy=function(t){var e=t.x,n=t.y,r=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0;0!==o+a+s+u?o||s?a||u?this._basicSquare({x:e,y:n,size:r,rotation:0}):this._basicCornerRounded({x:e,y:n,size:r,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:r,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var e=t.x,n=t.y,r=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0;0!==o+a+s+u?o||s?a||u?this._basicSquare({x:e,y:n,size:r,rotation:0}):this._basicCornerExtraRounded({x:e,y:n,size:r,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:r,rotation:Math.PI/2})},t}();var d=function(){return(d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r||i&&i=(e-o.hideXDots)/2&&t<(e+o.hideXDots)/2&&n>=(e-o.hideYDots)/2&&n<(e+o.hideYDots)/2||(null===(r=w[t])||void 0===r?void 0:r[n])||(null===(i=w[t-e+7])||void 0===i?void 0:i[n])||(null===(a=w[t])||void 0===a?void 0:a[n-e+7])||(null===(s=b[t])||void 0===s?void 0:s[n])||(null===(u=b[t-e+7])||void 0===u?void 0:u[n])||(null===(c=b[t])||void 0===c?void 0:c[n-e+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:o.width,height:o.height,count:e,dotSize:i})]:[3,4];case 3:f.sent(),f.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,e,n,r=this._element,i=this._options;if(r){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,a=null===(e=i.backgroundOptions)||void 0===e?void 0:e.color;if((o||a)&&this._createColor({options:o,color:a,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 s=Math.min(i.width,i.height),u=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),u.setAttribute("x",String((i.width-s)/2)),u.setAttribute("y",String((i.height-s)/2)),u.setAttribute("width",String(s)),u.setAttribute("height",String(s)),u.setAttribute("rx",String(s/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var e,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 a=Math.min(i.width,i.height)-2*i.margin,s=i.shape===m?a/Math.sqrt(2):a,u=Math.floor(s/o),c=Math.floor((i.width-o*u)/2),l=Math.floor((i.height-o*u)/2),d=new h({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===(e=i.dotsOptions)||void 0===e?void 0:e.gradient,color:i.dotsOptions.color,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"dot-color"});for(var f=function(e){for(var i=function(i){return t&&!t(e,i)?"continue":(null===(n=p._qr)||void 0===n?void 0:n.isDark(e,i))?(d.draw(c+e*u,l+i*u,u,(function(n,a){return!(e+n<0||i+a<0||e+n>=o||i+a>=o)&&!(t&&!t(e+n,i+a))&&!!r._qr&&r._qr.isDark(e+n,i+a)})),void(d._element&&p._dotsClipPath&&p._dotsClipPath.appendChild(d._element))):"continue"},a=0;a=g-1&&y<=v-g&&N>=g-1&&N<=v-g||Math.sqrt((y-A)*(y-A)+(N-A)*(N-A))>A?M[y][N]=0:M[y][N]=this._qr.isDark(N-2*g<0?N:N>=o?N-2*g:N-g,y-2*g<0?y:y>=o?y-2*g:y-g)?1:0}var I=function(t){for(var e=function(e){if(!M[t][e])return"continue";d.draw(w+t*u,b+e*u,u,(function(n,r){var i;return!!(null===(i=M[t+n])||void 0===i?void 0:i[e+r])})),d._element&&E._dotsClipPath&&E._dotsClipPath.appendChild(d._element)},n=0;na?s:a,l=document.createElementNS("http://www.w3.org/2000/svg","rect");if(l.setAttribute("x",String(i)),l.setAttribute("y",String(o)),l.setAttribute("height",String(a)),l.setAttribute("width",String(s)),l.setAttribute("clip-path","url('#clip-path-"+u+"')"),e){var h;if("radial"===e.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",u),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(i+s/2)),h.setAttribute("fy",String(o+a/2)),h.setAttribute("cx",String(i+s/2)),h.setAttribute("cy",String(o+a/2)),h.setAttribute("r",String(c/2));else{var d=((e.rotation||0)+r)%(2*Math.PI),f=(d+2*Math.PI)%(2*Math.PI),p=i+s/2,y=o+a/2,m=i+s/2,g=o+a/2;f>=0&&f<=.25*Math.PI||f>1.75*Math.PI&&f<=2*Math.PI?(p-=s/2,y-=a/2*Math.tan(d),m+=s/2,g+=a/2*Math.tan(d)):f>.25*Math.PI&&f<=.75*Math.PI?(y-=a/2,p-=s/2/Math.tan(d),g+=a/2,m+=s/2/Math.tan(d)):f>.75*Math.PI&&f<=1.25*Math.PI?(p+=s/2,y+=a/2*Math.tan(d),m-=s/2,g-=a/2*Math.tan(d)):f>1.25*Math.PI&&f<=1.75*Math.PI&&(y+=a/2,p+=s/2/Math.tan(d),g-=a/2,m-=s/2/Math.tan(d)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",u),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(p))),h.setAttribute("y1",String(Math.round(y))),h.setAttribute("x2",String(Math.round(m))),h.setAttribute("y2",String(Math.round(g)))}e.colorStops.forEach((function(t){var e=t.offset,n=t.color,r=document.createElementNS("http://www.w3.org/2000/svg","stop");r.setAttribute("offset",100*e+"%"),r.setAttribute("stop-color",n),h.appendChild(r)})),l.setAttribute("fill","url('#"+u+"')"),this._defs.appendChild(h)}else n&&l.setAttribute("fill",n);this._element.appendChild(l)},t}(),A="canvas";for(var N={},I=0;I<=40;I++)N[I]=I;const E={type:A,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:N[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 x=function(){return(x=Object.assign||function(t){for(var e,n=1,r=arguments.length;nMath.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=x({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=k(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=x({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=k(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=x({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=k(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=x({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=k(e.backgroundOptions.gradient))),e}var L=n(192),S=n.n(L),j=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},C=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\r\n'+r],{type:"image/svg+xml"})]):[2,new Promise((function(n){return e.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return j(this,void 0,void 0,(function(){var e,n,r,i,o;return C(this,(function(a){switch(a.label){case 0:if(!this._qr)throw"QR code is empty";return e="png",n="qr","string"==typeof t?(e=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(e=t.extension)),[4,this._getElement(e)];case 1:return(r=a.sent())?("svg"===e.toLowerCase()?(i=new XMLSerializer,o='\r\n'+(o=i.serializeToString(r)),s("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o),n+".svg")):s(r.toDataURL("image/"+e),n+"."+e),[2]):[2]}}))}))},t}()}},e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(676)})().default}))),sF=Zf((function(t,e){(function(){var n,r="Expected a function",i="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,s=32,u=64,c=128,l=256,h=1/0,d=9007199254740991,f=NaN,p=4294967295,y=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",s],["partialRight",u],["rearg",l]],m="[object Arguments]",g="[object Array]",v="[object Boolean]",w="[object Date]",b="[object Error]",M="[object Function]",A="[object GeneratorFunction]",N="[object Map]",I="[object Number]",E="[object Object]",x="[object Promise]",k="[object RegExp]",T="[object Set]",L="[object String]",S="[object Symbol]",j="[object WeakMap]",C="[object ArrayBuffer]",D="[object DataView]",O="[object Float32Array]",z="[object Float64Array]",P="[object Int8Array]",_="[object Int16Array]",B="[object Int32Array]",R="[object Uint8Array]",U="[object Uint8ClampedArray]",Q="[object Uint16Array]",Y="[object Uint32Array]",W=/\b__p \+= '';/g,F=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,q=RegExp(H.source),Z=RegExp(G.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(nt.source),it=/^\s+/,ot=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ht=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,Mt=/['\n\r\u2028\u2029\\]/g,At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Nt="\\u2700-\\u27bf",It="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",xt="\\ufe0e\\ufe0f",kt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="['’]",Lt="[\\ud800-\\udfff]",St="["+kt+"]",jt="["+At+"]",Ct="\\d+",Dt="[\\u2700-\\u27bf]",Ot="["+It+"]",zt="[^\\ud800-\\udfff"+kt+Ct+Nt+It+Et+"]",Pt="\\ud83c[\\udffb-\\udfff]",_t="[^\\ud800-\\udfff]",Bt="(?:\\ud83c[\\udde6-\\uddff]){2}",Rt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+Et+"]",Qt="(?:"+Ot+"|"+zt+")",Yt="(?:"+Ut+"|"+zt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Ft="(?:['’](?:D|LL|M|RE|S|T|VE))?",Vt="(?:"+jt+"|"+Pt+")"+"?",Ht="[\\ufe0e\\ufe0f]?",Gt=Ht+Vt+("(?:\\u200d(?:"+[_t,Bt,Rt].join("|")+")"+Ht+Vt+")*"),qt="(?:"+[Dt,Bt,Rt].join("|")+")"+Gt,Zt="(?:"+[_t+jt+"?",jt,Bt,Rt,Lt].join("|")+")",Jt=RegExp(Tt,"g"),Xt=RegExp(jt,"g"),Kt=RegExp(Pt+"(?="+Pt+")|"+Zt+Gt,"g"),$t=RegExp([Ut+"?"+Ot+"+"+Wt+"(?="+[St,Ut,"$"].join("|")+")",Yt+"+"+Ft+"(?="+[St,Ut+Qt,"$"].join("|")+")",Ut+"?"+Qt+"+"+Wt,Ut+"+"+Ft,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ct,qt].join("|"),"g"),te=RegExp("[\\u200d\\ud800-\\udfff"+At+xt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,ie={};ie[O]=ie[z]=ie[P]=ie[_]=ie[B]=ie[R]=ie[U]=ie[Q]=ie[Y]=!0,ie[m]=ie[g]=ie[C]=ie[v]=ie[D]=ie[w]=ie[b]=ie[M]=ie[N]=ie[I]=ie[E]=ie[k]=ie[T]=ie[L]=ie[j]=!1;var oe={};oe[m]=oe[g]=oe[C]=oe[D]=oe[v]=oe[w]=oe[O]=oe[z]=oe[P]=oe[_]=oe[B]=oe[N]=oe[I]=oe[E]=oe[k]=oe[T]=oe[L]=oe[S]=oe[R]=oe[U]=oe[Q]=oe[Y]=!0,oe[b]=oe[M]=oe[j]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},se=parseFloat,ue=parseInt,ce="object"==typeof Gf&&Gf&&Gf.Object===Object&&Gf,le="object"==typeof self&&self&&self.Object===Object&&self,he=ce||le||Function("return this")(),de=e&&!e.nodeType&&e,fe=de&&t&&!t.nodeType&&t,pe=fe&&fe.exports===de,ye=pe&&ce.process,me=function(){try{var t=fe&&fe.require&&fe.require("util").types;return t||ye&&ye.binding&&ye.binding("util")}catch(t){}}(),ge=me&&me.isArrayBuffer,ve=me&&me.isDate,we=me&&me.isMap,be=me&&me.isRegExp,Me=me&&me.isSet,Ae=me&&me.isTypedArray;function Ne(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ie(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Se(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function $e(t,e){for(var n=t.length;n--&&Re(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var en=Fe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),nn=Fe({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(t){return"\\"+ae[t]}function on(t){return te.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function un(t,e){for(var n=-1,r=t.length,i=0,a=[];++n",""":'"',"'":"'"});var yn=function t(e){var ot,At=(e=null==e?he:yn.defaults(he.Object(),e,yn.pick(he,ne))).Array,Nt=e.Date,It=e.Error,Et=e.Function,xt=e.Math,kt=e.Object,Tt=e.RegExp,Lt=e.String,St=e.TypeError,jt=At.prototype,Ct=Et.prototype,Dt=kt.prototype,Ot=e["__core-js_shared__"],zt=Ct.toString,Pt=Dt.hasOwnProperty,_t=0,Bt=(ot=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||""))?"Symbol(src)_1."+ot:"",Rt=Dt.toString,Ut=zt.call(kt),Qt=he._,Yt=Tt("^"+zt.call(Pt).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=pe?e.Buffer:n,Ft=e.Symbol,Vt=e.Uint8Array,Ht=Wt?Wt.allocUnsafe:n,Gt=sn(kt.getPrototypeOf,kt),qt=kt.create,Zt=Dt.propertyIsEnumerable,Kt=jt.splice,te=Ft?Ft.isConcatSpreadable:n,ae=Ft?Ft.iterator:n,ce=Ft?Ft.toStringTag:n,le=function(){try{var t=po(kt,"defineProperty");return t({},"",{}),t}catch(t){}}(),de=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,fe=Nt&&Nt.now!==he.Date.now&&Nt.now,ye=e.setTimeout!==he.setTimeout&&e.setTimeout,me=xt.ceil,Pe=xt.floor,Fe=kt.getOwnPropertySymbols,mn=Wt?Wt.isBuffer:n,gn=e.isFinite,vn=jt.join,wn=sn(kt.keys,kt),bn=xt.max,Mn=xt.min,An=Nt.now,Nn=e.parseInt,In=xt.random,En=jt.reverse,xn=po(e,"DataView"),kn=po(e,"Map"),Tn=po(e,"Promise"),Ln=po(e,"Set"),Sn=po(e,"WeakMap"),jn=po(kt,"create"),Cn=Sn&&new Sn,Dn={},On=Qo(xn),zn=Qo(kn),Pn=Qo(Tn),_n=Qo(Ln),Bn=Qo(Sn),Rn=Ft?Ft.prototype:n,Un=Rn?Rn.valueOf:n,Qn=Rn?Rn.toString:n;function Yn(t){if(is(t)&&!Ga(t)&&!(t instanceof Hn)){if(t instanceof Vn)return t;if(Pt.call(t,"__wrapped__"))return Yo(t)}return new Vn(t)}var Wn=function(){function t(){}return function(e){if(!rs(e))return{};if(qt)return qt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Fn(){}function Vn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Hn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function lr(t,e,r,i,o,a){var s,u=1&e,c=2&e,l=4&e;if(r&&(s=o?r(t,i,o,a):r(t)),s!==n)return s;if(!rs(t))return t;var h=Ga(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Pt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return ji(t,s)}else{var d=go(t),f=d==M||d==A;if(Xa(t))return Ei(t,u);if(d==E||d==m||f&&!o){if(s=c||f?{}:wo(t),!u)return c?function(t,e){return Ci(t,mo(t),e)}(t,function(t,e){return t&&Ci(e,zs(e),t)}(s,t)):function(t,e){return Ci(t,yo(t),e)}(t,ar(s,t))}else{if(!oe[d])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case C:return xi(t);case v:case w:return new r(+t);case D:return function(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case z:case P:case _:case B:case R:case U:case Q:case Y:return ki(t,n);case N:return new r;case I:case L:return new r(t);case k:return function(t){var e=new t.constructor(t.source,ft.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new r;case S:return i=t,Un?kt(Un.call(i)):{}}var i}(t,d,u)}}a||(a=new Xn);var p=a.get(t);if(p)return p;a.set(t,s),cs(t)?t.forEach((function(n){s.add(lr(n,e,r,n,t,a))})):os(t)&&t.forEach((function(n,i){s.set(i,lr(n,e,r,i,t,a))}));var y=h?n:(l?c?ao:oo:c?zs:Os)(t);return Ee(y||t,(function(n,i){y&&(n=t[i=n]),rr(s,i,lr(n,e,r,i,t,a))})),s}function hr(t,e,r){var i=r.length;if(null==t)return!i;for(t=kt(t);i--;){var o=r[i],a=e[o],s=t[o];if(s===n&&!(o in t)||!a(s))return!1}return!0}function dr(t,e,i){if("function"!=typeof t)throw new St(r);return Oo((function(){t.apply(n,i)}),e)}function fr(t,e,n,r){var i=-1,o=Le,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=je(e,Ze(n))),r?(o=Se,a=!1):e.length>=200&&(o=Xe,a=!1,e=new Jn(e));t:for(;++i-1},qn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(kn||qn),string:new Gn}},Zn.prototype.delete=function(t){var e=ho(this,t).delete(t);return this.size-=e?1:0,e},Zn.prototype.get=function(t){return ho(this,t).get(t)},Zn.prototype.has=function(t){return ho(this,t).has(t)},Zn.prototype.set=function(t,e){var n=ho(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,i),this},Jn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new qn,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Zn(r)}return n.set(t,e),this.size=n.size,this};var pr=zi(Ar),yr=zi(Nr,!0);function mr(t,e){var n=!0;return pr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,r){for(var i=-1,o=t.length;++i0&&n(s)?e>1?wr(s,e-1,n,r,i):Ce(i,s):r||(i[i.length]=s)}return i}var br=Pi(),Mr=Pi(!0);function Ar(t,e){return t&&br(t,e,Os)}function Nr(t,e){return t&&Mr(t,e,Os)}function Ir(t,e){return Te(e,(function(e){return ts(t[e])}))}function Er(t,e){for(var r=0,i=(e=Mi(e,t)).length;null!=t&&re}function Lr(t,e){return null!=t&&Pt.call(t,e)}function Sr(t,e){return null!=t&&e in kt(t)}function jr(t,e,r){for(var i=r?Se:Le,o=t[0].length,a=t.length,s=a,u=At(a),c=1/0,l=[];s--;){var h=t[s];s&&e&&(h=je(h,Ze(e))),c=Mn(h.length,c),u[s]=!r&&(e||o>=120&&h.length>=120)?new Jn(s&&h):n}h=t[0];var d=-1,f=u[0];t:for(;++d=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Gr(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&Kt.call(s,u,1),Kt.call(t,u,1);return t}function Zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Mo(i)?Kt.call(t,i,1):fi(t,i)}}return t}function Jr(t,e){return t+Pe(In()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>d)return n;do{e%2&&(n+=t),(e=Pe(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return zo(Lo(t,e,au),t+"")}function $r(t){return $n(Ws(t))}function ti(t,e){var n=Ws(t);return Bo(n,cr(e,0,n.length))}function ei(t,e,r,i){if(!rs(t))return t;for(var o=-1,a=(e=Mi(e,t)).length,s=a-1,u=t;null!=u&&++oi?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=At(i);++r>>1,a=t[o];null!==a&&!hs(a)&&(n?a<=e:a=200){var c=e?null:Xi(t);if(c)return cn(c);a=!1,i=Xe,u=new Jn}else u=e?[]:s;t:for(;++r=i?t:oi(t,e,r)}var Ii=de||function(t){return he.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function xi(t){var e=new t.constructor(t.byteLength);return new Vt(e).set(new Vt(t)),e}function ki(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ti(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,a=hs(t),s=e!==n,u=null===e,c=e==e,l=hs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!r&&c||!o)return 1;if(!i&&!a&&!l&&t1?r[o-1]:n,s=o>2?r[2]:n;for(a=t.length>3&&"function"==typeof a?(o--,a):n,s&&Ao(r[0],r[1],s)&&(a=o<3?n:a,o=1),e=kt(e);++i-1?o[a?e[s]:s]:n}}function Qi(t){return io((function(e){var i=e.length,o=i,a=Vn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new St(r);if(a&&!u&&"wrapper"==uo(s))var u=new Vn([],!0)}for(o=u?o:i;++o1&&v.reverse(),d&&lu))return!1;var l=a.get(t),h=a.get(e);if(l&&h)return l==e&&h==t;var d=-1,f=!0,p=2&r?new Jn:n;for(a.set(t,e),a.set(e,t);++d-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ee(y,(function(n){var r="_."+n[0];e&n[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(ut):[]}(r),n)))}function _o(t){var e=0,r=0;return function(){var i=An(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Bo(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,ua(t,r)}));function ya(t){var e=Yn(t);return e.__chain__=!0,e}function ma(t,e){return e(t)}var ga=io((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(e){return ur(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Hn&&Mo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:ma,args:[o],thisArg:n}),new Vn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(o)}));var va=Di((function(t,e,n){Pt.call(t,n)?++t[n]:sr(t,n,1)}));var wa=Ui(Ho),ba=Ui(Go);function Ma(t,e){return(Ga(t)?Ee:pr)(t,lo(e,3))}function Aa(t,e){return(Ga(t)?xe:yr)(t,lo(e,3))}var Na=Di((function(t,e,n){Pt.call(t,n)?t[n].push(e):sr(t,n,[e])}));var Ia=Kr((function(t,e,n){var r=-1,i="function"==typeof e,o=Za(t)?At(t.length):[];return pr(t,(function(t){o[++r]=i?Ne(e,t,n):Cr(t,e,n)})),o})),Ea=Di((function(t,e,n){sr(t,n,e)}));function xa(t,e){return(Ga(t)?je:Qr)(t,lo(e,3))}var ka=Di((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Ta=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Ao(t,e[0],e[1])?e=[]:n>2&&Ao(e[0],e[1],e[2])&&(e=[e[0]]),Hr(t,wr(e,1),[])})),La=fe||function(){return he.Date.now()};function Sa(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,$i(t,c,n,n,n,n,e)}function ja(t,e){var i;if("function"!=typeof e)throw new St(r);return t=gs(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var Ca=Kr((function(t,e,n){var r=1;if(n.length){var i=un(n,co(Ca));r|=s}return $i(t,r,e,n,i)})),Da=Kr((function(t,e,n){var r=3;if(n.length){var i=un(n,co(Da));r|=s}return $i(e,r,t,n,i)}));function Oa(t,e,i){var o,a,s,u,c,l,h=0,d=!1,f=!1,p=!0;if("function"!=typeof t)throw new St(r);function y(e){var r=o,i=a;return o=a=n,h=e,u=t.apply(i,r)}function m(t){return h=t,c=Oo(v,e),d?y(t):u}function g(t){var r=t-l;return l===n||r>=e||r<0||f&&t-h>=s}function v(){var t=La();if(g(t))return w(t);c=Oo(v,function(t){var n=e-(t-l);return f?Mn(n,s-(t-h)):n}(t))}function w(t){return c=n,p&&o?y(t):(o=a=n,u)}function b(){var t=La(),r=g(t);if(o=arguments,a=this,l=t,r){if(c===n)return m(l);if(f)return Ii(c),c=Oo(v,e),y(l)}return c===n&&(c=Oo(v,e)),u}return e=ws(e)||0,rs(i)&&(d=!!i.leading,s=(f="maxWait"in i)?bn(ws(i.maxWait)||0,e):s,p="trailing"in i?!!i.trailing:p),b.cancel=function(){c!==n&&Ii(c),h=0,o=l=a=c=n},b.flush=function(){return c===n?u:w(La())},b}var za=Kr((function(t,e){return dr(t,1,e)})),Pa=Kr((function(t,e,n){return dr(t,ws(e)||0,n)}));function _a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new St(r);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(_a.Cache||Zn),n}function Ba(t){if("function"!=typeof t)throw new St(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}_a.Cache=Zn;var Ra=Ai((function(t,e){var n=(e=1==e.length&&Ga(e[0])?je(e[0],Ze(lo())):je(wr(e,1),Ze(lo()))).length;return Kr((function(r){for(var i=-1,o=Mn(r.length,n);++i=e})),Ha=Dr(function(){return arguments}())?Dr:function(t){return is(t)&&Pt.call(t,"callee")&&!Zt.call(t,"callee")},Ga=At.isArray,qa=ge?Ze(ge):function(t){return is(t)&&kr(t)==C};function Za(t){return null!=t&&ns(t.length)&&!ts(t)}function Ja(t){return is(t)&&Za(t)}var Xa=mn||wu,Ka=ve?Ze(ve):function(t){return is(t)&&kr(t)==w};function $a(t){if(!is(t))return!1;var e=kr(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var e=kr(t);return e==M||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function es(t){return"number"==typeof t&&t==gs(t)}function ns(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function rs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function is(t){return null!=t&&"object"==typeof t}var os=we?Ze(we):function(t){return is(t)&&go(t)==N};function as(t){return"number"==typeof t||is(t)&&kr(t)==I}function ss(t){if(!is(t)||kr(t)!=E)return!1;var e=Gt(t);if(null===e)return!0;var n=Pt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&zt.call(n)==Ut}var us=be?Ze(be):function(t){return is(t)&&kr(t)==k};var cs=Me?Ze(Me):function(t){return is(t)&&go(t)==T};function ls(t){return"string"==typeof t||!Ga(t)&&is(t)&&kr(t)==L}function hs(t){return"symbol"==typeof t||is(t)&&kr(t)==S}var ds=Ae?Ze(Ae):function(t){return is(t)&&ns(t.length)&&!!ie[kr(t)]};var fs=qi(Ur),ps=qi((function(t,e){return t<=e}));function ys(t){if(!t)return[];if(Za(t))return ls(t)?dn(t):ji(t);if(ae&&t[ae])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ae]());var e=go(t);return(e==N?an:e==T?cn:Ws)(t)}function ms(t){return t?(t=ws(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=ms(t),n=e%1;return e==e?n?e-n:e:0}function vs(t){return t?cr(gs(t),0,p):0}function ws(t){if("number"==typeof t)return t;if(hs(t))return f;if(rs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=rs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qe(t);var n=yt.test(t);return n||gt.test(t)?ue(t.slice(2),n?2:8):pt.test(t)?f:+t}function bs(t){return Ci(t,zs(t))}function Ms(t){return null==t?"":hi(t)}var As=Oi((function(t,e){if(xo(e)||Za(e))Ci(e,Os(e),t);else for(var n in e)Pt.call(e,n)&&rr(t,n,e[n])})),Ns=Oi((function(t,e){Ci(e,zs(e),t)})),Is=Oi((function(t,e,n,r){Ci(e,zs(e),t,r)})),Es=Oi((function(t,e,n,r){Ci(e,Os(e),t,r)})),xs=io(ur);var ks=Kr((function(t,e){t=kt(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&Ao(e[0],e[1],o)&&(i=1);++r1),e})),Ci(t,ao(t),n),r&&(n=lr(n,7,no));for(var i=e.length;i--;)fi(n,e[i]);return n}));var Rs=io((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return Ss(t,n)}))}(t,e)}));function Us(t,e){if(null==t)return{};var n=je(ao(t),(function(t){return[t]}));return e=lo(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var Qs=Ki(Os),Ys=Ki(zs);function Ws(t){return null==t?[]:Je(t,Os(t))}var Fs=Bi((function(t,e,n){return e=e.toLowerCase(),t+(n?Vs(e):e)}));function Vs(t){return $s(Ms(t).toLowerCase())}function Hs(t){return(t=Ms(t))&&t.replace(wt,en).replace(Xt,"")}var Gs=Bi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),qs=Bi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Zs=_i("toLowerCase");var Js=Bi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Xs=Bi((function(t,e,n){return t+(n?" ":"")+$s(e)}));var Ks=Bi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),$s=_i("toUpperCase");function tu(t,e,r){return t=Ms(t),(e=r?n:e)===n?function(t){return ee.test(t)}(t)?function(t){return t.match($t)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(e)||[]}var eu=Kr((function(t,e){try{return Ne(t,n,e)}catch(t){return $a(t)?t:new It(t)}})),nu=io((function(t,e){return Ee(e,(function(e){e=Uo(e),sr(t,e,Ca(t[e],t))})),t}));function ru(t){return function(){return t}}var iu=Qi(),ou=Qi(!0);function au(t){return t}function su(t){return _r("function"==typeof t?t:lr(t,1))}var uu=Kr((function(t,e){return function(n){return Cr(n,t,e)}})),cu=Kr((function(t,e){return function(n){return Cr(t,n,e)}}));function lu(t,e,n){var r=Os(e),i=Ir(e,r);null!=n||rs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ir(e,Os(e)));var o=!(rs(n)&&"chain"in n&&!n.chain),a=ts(t);return Ee(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=ji(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ce([this.value()],arguments))})})),t}function hu(){}var du=Vi(je),fu=Vi(ke),pu=Vi(ze);function yu(t){return No(t)?We(Uo(t)):function(t){return function(e){return Er(e,t)}}(t)}var mu=Gi(),gu=Gi(!0);function vu(){return[]}function wu(){return!1}var bu=Fi((function(t,e){return t+e}),0),Mu=Ji("ceil"),Au=Fi((function(t,e){return t/e}),1),Nu=Ji("floor");var Iu,Eu=Fi((function(t,e){return t*e}),1),xu=Ji("round"),ku=Fi((function(t,e){return t-e}),0);return Yn.after=function(t,e){if("function"!=typeof e)throw new St(r);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=Sa,Yn.assign=As,Yn.assignIn=Ns,Yn.assignInWith=Is,Yn.assignWith=Es,Yn.at=xs,Yn.before=ja,Yn.bind=Ca,Yn.bindAll=nu,Yn.bindKey=Da,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},Yn.chain=ya,Yn.chunk=function(t,e,r){e=(r?Ao(t,e,r):e===n)?1:bn(gs(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=At(me(i/e));oo?0:o+r),(i=i===n||i>o?o:gs(i))<0&&(i+=o),i=r>i?0:vs(i);r>>0)?(t=Ms(t))&&("string"==typeof e||null!=e&&!us(e))&&!(e=hi(e))&&on(t)?Ni(dn(t),0,r):t.split(e,r):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new St(r);return e=null==e?0:bn(gs(e),0),Kr((function(n){var r=n[e],i=Ni(n,0,e);return r&&Ce(i,r),Ne(t,this,i)}))},Yn.tail=function(t){var e=null==t?0:t.length;return e?oi(t,1,e):[]},Yn.take=function(t,e,r){return t&&t.length?oi(t,0,(e=r||e===n?1:gs(e))<0?0:e):[]},Yn.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?oi(t,(e=i-(e=r||e===n?1:gs(e)))<0?0:e,i):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?yi(t,lo(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?yi(t,lo(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new St(r);return rs(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),Oa(t,e,{leading:i,maxWait:e,trailing:o})},Yn.thru=ma,Yn.toArray=ys,Yn.toPairs=Qs,Yn.toPairsIn=Ys,Yn.toPath=function(t){return Ga(t)?je(t,Uo):hs(t)?[t]:ji(Ro(Ms(t)))},Yn.toPlainObject=bs,Yn.transform=function(t,e,n){var r=Ga(t),i=r||Xa(t)||ds(t);if(e=lo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:rs(t)&&ts(o)?Wn(Gt(t)):{}}return(i?Ee:Ar)(t,(function(t,r,i){return e(n,t,r,i)})),n},Yn.unary=function(t){return Sa(t,1)},Yn.union=ia,Yn.unionBy=oa,Yn.unionWith=aa,Yn.uniq=function(t){return t&&t.length?di(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?di(t,lo(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?di(t,n,e):[]},Yn.unset=function(t,e){return null==t||fi(t,e)},Yn.unzip=sa,Yn.unzipWith=ua,Yn.update=function(t,e,n){return null==t?t:pi(t,e,bi(n))},Yn.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:pi(t,e,bi(r),i)},Yn.values=Ws,Yn.valuesIn=function(t){return null==t?[]:Je(t,zs(t))},Yn.without=ca,Yn.words=tu,Yn.wrap=function(t,e){return Ua(bi(e),t)},Yn.xor=la,Yn.xorBy=ha,Yn.xorWith=da,Yn.zip=fa,Yn.zipObject=function(t,e){return vi(t||[],e||[],rr)},Yn.zipObjectDeep=function(t,e){return vi(t||[],e||[],ei)},Yn.zipWith=pa,Yn.entries=Qs,Yn.entriesIn=Ys,Yn.extend=Ns,Yn.extendWith=Is,lu(Yn,Yn),Yn.add=bu,Yn.attempt=eu,Yn.camelCase=Fs,Yn.capitalize=Vs,Yn.ceil=Mu,Yn.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=ws(r))==r?r:0),e!==n&&(e=(e=ws(e))==e?e:0),cr(ws(t),e,r)},Yn.clone=function(t){return lr(t,4)},Yn.cloneDeep=function(t){return lr(t,5)},Yn.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:n)},Yn.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:n)},Yn.conformsTo=function(t,e){return null==e||hr(t,e,Os(e))},Yn.deburr=Hs,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=Au,Yn.endsWith=function(t,e,r){t=Ms(t),e=hi(e);var i=t.length,o=r=r===n?i:cr(gs(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},Yn.eq=Wa,Yn.escape=function(t){return(t=Ms(t))&&Z.test(t)?t.replace(G,nn):t},Yn.escapeRegExp=function(t){return(t=Ms(t))&&rt.test(t)?t.replace(nt,"\\$&"):t},Yn.every=function(t,e,r){var i=Ga(t)?ke:mr;return r&&Ao(t,e,r)&&(e=n),i(t,lo(e,3))},Yn.find=wa,Yn.findIndex=Ho,Yn.findKey=function(t,e){return _e(t,lo(e,3),Ar)},Yn.findLast=ba,Yn.findLastIndex=Go,Yn.findLastKey=function(t,e){return _e(t,lo(e,3),Nr)},Yn.floor=Nu,Yn.forEach=Ma,Yn.forEachRight=Aa,Yn.forIn=function(t,e){return null==t?t:br(t,lo(e,3),zs)},Yn.forInRight=function(t,e){return null==t?t:Mr(t,lo(e,3),zs)},Yn.forOwn=function(t,e){return t&&Ar(t,lo(e,3))},Yn.forOwnRight=function(t,e){return t&&Nr(t,lo(e,3))},Yn.get=Ls,Yn.gt=Fa,Yn.gte=Va,Yn.has=function(t,e){return null!=t&&vo(t,e,Lr)},Yn.hasIn=Ss,Yn.head=Zo,Yn.identity=au,Yn.includes=function(t,e,n,r){t=Za(t)?t:Ws(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=bn(i+n,0)),ls(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Re(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),Re(t,e,i)},Yn.inRange=function(t,e,r){return e=ms(e),r===n?(r=e,e=0):r=ms(r),function(t,e,n){return t>=Mn(e,n)&&t=-9007199254740991&&t<=d},Yn.isSet=cs,Yn.isString=ls,Yn.isSymbol=hs,Yn.isTypedArray=ds,Yn.isUndefined=function(t){return t===n},Yn.isWeakMap=function(t){return is(t)&&go(t)==j},Yn.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==kr(t)},Yn.join=function(t,e){return null==t?"":vn.call(t,e)},Yn.kebabCase=Gs,Yn.last=$o,Yn.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=gs(r))<0?bn(i+o,0):Mn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Be(t,Qe,o,!0)},Yn.lowerCase=qs,Yn.lowerFirst=Zs,Yn.lt=fs,Yn.lte=ps,Yn.max=function(t){return t&&t.length?gr(t,au,Tr):n},Yn.maxBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Tr):n},Yn.mean=function(t){return Ye(t,au)},Yn.meanBy=function(t,e){return Ye(t,lo(e,2))},Yn.min=function(t){return t&&t.length?gr(t,au,Ur):n},Yn.minBy=function(t,e){return t&&t.length?gr(t,lo(e,2),Ur):n},Yn.stubArray=vu,Yn.stubFalse=wu,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=Eu,Yn.nth=function(t,e){return t&&t.length?Vr(t,gs(e)):n},Yn.noConflict=function(){return he._===this&&(he._=Qt),this},Yn.noop=hu,Yn.now=La,Yn.pad=function(t,e,n){t=Ms(t);var r=(e=gs(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Hi(Pe(i),n)+t+Hi(me(i),n)},Yn.padEnd=function(t,e,n){t=Ms(t);var r=(e=gs(e))?hn(t):0;return e&&re){var i=t;t=e,e=i}if(r||t%1||e%1){var o=In();return Mn(t+o*(e-t+se("1e-"+((o+"").length-1))),e)}return Jr(t,e)},Yn.reduce=function(t,e,n){var r=Ga(t)?De:Ve,i=arguments.length<3;return r(t,lo(e,4),n,i,pr)},Yn.reduceRight=function(t,e,n){var r=Ga(t)?Oe:Ve,i=arguments.length<3;return r(t,lo(e,4),n,i,yr)},Yn.repeat=function(t,e,r){return e=(r?Ao(t,e,r):e===n)?1:gs(e),Xr(Ms(t),e)},Yn.replace=function(){var t=arguments,e=Ms(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,r){var i=-1,o=(e=Mi(e,t)).length;for(o||(o=1,t=n);++id)return[];var n=p,r=Mn(t,p);e=lo(e),t-=p;for(var i=Ge(r,e);++n=a)return t;var u=r-hn(i);if(u<1)return i;var c=s?Ni(s,0,u).join(""):t.slice(0,u);if(o===n)return c+i;if(s&&(u+=c.length-u),us(o)){if(t.slice(u).search(o)){var l,h=c;for(o.global||(o=Tt(o.source,Ms(ft.exec(o))+"g")),o.lastIndex=0;l=o.exec(h);)var d=l.index;c=c.slice(0,d===n?u:d)}}else if(t.indexOf(hi(o),u)!=u){var f=c.lastIndexOf(o);f>-1&&(c=c.slice(0,f))}return c+i},Yn.unescape=function(t){return(t=Ms(t))&&q.test(t)?t.replace(H,pn):t},Yn.uniqueId=function(t){var e=++_t;return Ms(t)+e},Yn.upperCase=Ks,Yn.upperFirst=$s,Yn.each=Ma,Yn.eachRight=Aa,Yn.first=Zo,lu(Yn,(Iu={},Ar(Yn,(function(t,e){Pt.call(Yn.prototype,e)||(Iu[e]=t)})),Iu),{chain:!1}),Yn.VERSION="4.17.21",Ee(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Yn[t].placeholder=Yn})),Ee(["drop","take"],(function(t,e){Hn.prototype[t]=function(r){r=r===n?1:bn(gs(r),0);var i=this.__filtered__&&!e?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=Mn(r,i.__takeCount__):i.__views__.push({size:Mn(r,p),type:t+(i.__dir__<0?"Right":"")}),i},Hn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ee(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Hn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:lo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ee(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Hn.prototype[t]=function(){return this[n](1).value()[0]}})),Ee(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Hn.prototype[t]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(au)},Hn.prototype.find=function(t){return this.filter(t).head()},Hn.prototype.findLast=function(t){return this.reverse().find(t)},Hn.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Hn(this):this.map((function(n){return Cr(n,t,e)}))})),Hn.prototype.reject=function(t){return this.filter(Ba(lo(t)))},Hn.prototype.slice=function(t,e){t=gs(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Hn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=gs(e))<0?r.dropRight(-e):r.take(e-t)),r)},Hn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Hn.prototype.toArray=function(){return this.take(p)},Ar(Hn.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Yn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(Yn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof Hn,c=s[0],l=u||Ga(e),h=function(t){var e=o.apply(Yn,Ce([t],s));return i&&d?e[0]:e};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,f=!!this.__actions__.length,p=a&&!d,y=u&&!f;if(!a&&l){e=y?e:new Hn(this);var m=t.apply(e,s);return m.__actions__.push({func:ma,args:[h],thisArg:n}),new Vn(m,d)}return p&&y?t.apply(this,s):(m=this.thru(h),p?i?m.value()[0]:m.value():m)})})),Ee(["pop","push","shift","sort","splice","unshift"],(function(t){var e=jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n]((function(n){return e.apply(Ga(n)?n:[],t)}))}})),Ar(Hn.prototype,(function(t,e){var n=Yn[e];if(n){var r=n.name+"";Pt.call(Dn,r)||(Dn[r]=[]),Dn[r].push({name:e,func:n})}})),Dn[Yi(n,2).name]=[{name:"wrapper",func:n}],Hn.prototype.clone=function(){var t=new Hn(this.__wrapped__);return t.__actions__=ji(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ji(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ji(this.__views__),t},Hn.prototype.reverse=function(){if(this.__filtered__){var t=new Hn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Hn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,r=this;r instanceof Fn;){var i=Yo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Hn){var e=t;return this.__actions__.length&&(e=new Hn(this)),(e=e.reverse()).__actions__.push({func:ma,args:[ra],thisArg:n}),new Vn(e,this.__chain__)}return this.thru(ra)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return mi(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,ae&&(Yn.prototype[ae]=function(){return this}),Yn}();fe?((fe.exports=yn)._=yn,de._=yn):he._=yn}).call(Gf)})),uF="_DePayConnectDialogPreviouslyConnectedWallet",cF=function(t){localStorage[uF]=t},lF=function(t){var e,n,r=Zx.useRef(),i=yx(Zx.useState(),2),o=i[0],a=i[1],s=yx(Zx.useState(),2),u=s[0],c=s[1],l=yx(Zx.useState(),2),h=l[0],d=l[1],f=yx(Zx.useState(),2),p=f[0],y=f[1],m=yx(Zx.useState(),2),g=m[0],v=m[1],w=yx(Zx.useState(),2),b=w[0],M=w[1],A=yx(Zx.useState(),2);A[0],A[1];var N=yx(Zx.useState(!1),2),I=N[0],E=N[1],x=yx(Zx.useState(!1),2),k=x[0],T=x[1],L=yx(Zx.useState(),2),S=L[0],j=L[1];Zx.useContext(tF).navigate;var C=Zx.useContext(ZC).accept,D=Zx.createElement("div",{className:"PaddingTopS PaddingLeftM PaddingRightM"},(null===(e=t.wallet)||void 0===e?void 0:e.logo)&&Zx.createElement("div",{className:"PaddingTopXS"},Zx.createElement("div",{className:"LineHeightL FontSizeL PaddingTopS"},Zx.createElement("span",{className:"CardImage rounded large"},Zx.createElement("img",{className:"transparent",src:t.wallet.logo}))))),O=function(){return new aF({width:340,height:340,type:"svg",dotsOptions:{type:"extra-rounded"},cornersSquareOptions:{type:"rounded"},backgroundOptions:{color:"transparent"}})},z=Zx.useCallback(sF.debounce((function(){var e,n;if(null!==(e=t.platform)&&void 0!==e&&e.solanaPay&&C&&C.every((function(t){return t.amount})))return t.continueWithSolanaPay();if("function"==typeof t.platform.qr){var r=O();return r.update({data:t.platform.qr()}),void j(r)}switch(null===(n=t.platform)||void 0===n?void 0:n.qr){case"WalletConnectV1":case"WalletConnectV2":if(null==S){localStorage[atob("ZGVwYXk6d2FsbGV0czp3YzI6cHJvamVjdElk")]=atob("YjFmYzJmMDZlYTIxMDdmY2Q5OWM2OGY0MTI3MTQxYWI=");var i=new xE[t.platform.qr];i.connect({name:t.wallet.name,logo:t.wallet.logo,reconnect:!0,connect:function(t){var e=t.uri,n=O();n.update({data:e}),j(n)}}).then((function(e){t.resolve(e,i)}))}break;case"WalletLink":var o=new xE[t.platform.qr];o.connect({connect:function(t){var e=t.uri,n=O();n.update({data:e}),j(n)}}).then((function(e){t.resolve(e,o)}))}}),100),[]);return Zx.useEffect((function(){dx(px.mark((function e(){var n,r,i,o,s,u,l,h,f,p,m,g;return px.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=!1,null===(n=t.wallet)||void 0===n||!n.extension){e.next=7;break}return e.next=4,xE[t.wallet.extension].isAvailable();case 4:l=e.sent,e.next=11;break;case 7:if(null===(r=t.wallet)||void 0===r||!r.extensions){e.next=11;break}return e.next=10,Promise.all(t.wallet.extensions.map(function(){var t=dx(px.mark((function t(e){return px.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xE[e].isAvailable();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 10:l=e.sent.filter(Boolean)[0];case 11:if(a(l),null===(i=t.platform)||void 0===i||!i.connect){e.next=21;break}return e.next=15,xE[t.platform.connect].isAvailable();case 15:if(e.t1=e.sent,e.t1){e.next=18;break}e.t1=!1;case 18:e.t0=e.t1,e.next=22;break;case 21:e.t0=!1;case 22:h=e.t0,M(h),f=!!t.platform&&t.platform.connect,c(f),p=!(null===(o=t.platform)||void 0===o||!o.copyLink),y(p),m=!!t.platform&&t.platform.open,d(m),g=(null===(s=t.platform)||void 0===s?void 0:s.solanaPay)&&C&&C.every((function(t){return t.amount}))||(null===(u=t.platform)||void 0===u?void 0:u.qr)&&(!I||"WalletLink"===t.platform.qr),v(g);case 32:case"end":return e.stop()}}),e)})))()}),[]),Zx.useEffect((function(){var e,n,r,i;void 0!==b&&E(!o&&!oF()&&!(null!==(e=t.wallet)&&void 0!==e&&null!==(n=e.desktop)&&void 0!==n&&n.native)&&((null===(r=t.platform)||void 0===r?void 0:r.qr)||(null===(i=t.platform)||void 0===i?void 0:i.solanaPay)))}),[o,b]),Zx.useEffect((function(){var e,n;I&&(null!==(e=t.platform)&&void 0!==e&&e.qr||null!==(n=t.platform)&&void 0!==n&&n.solanaPay)&&z()}),[I]),Zx.useEffect((function(){I&&S&&r&&r.current&&(r.current.innerHTML="",S.append(r.current))}),[S]),I&&null!==(n=t.platform)&&void 0!==n&&n.solanaPay&&C&&C.every((function(t){return t.amount}))?null:Zx.createElement(iF,{stacked:!0,header:D,footer:!1,body:Zx.createElement("div",{className:"TextCenter PaddingBottomS"},Zx.createElement("div",{className:"PaddingLeftL PaddingRightL"},Zx.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold"},"Connect ",t.wallet.name)),!window.location.protocol.match("https")&&Zx.createElement("div",{className:"PaddingTopS PaddingLeftL PaddingRightL"},Zx.createElement("div",{className:"Alert FontSizeS"},Zx.createElement("strong",null,"Most wallets do not connect to http!"))),!o&&!u&&!h&&!p&&!g&&Zx.createElement("div",{className:"PaddingTopS PaddingBottomS PaddingLeftL PaddingRightL"},Zx.createElement("div",{className:"Alert FontSizeS"},Zx.createElement("strong",null,"Unable to connect to this wallet!"))),I&&Zx.createElement("div",null,Zx.createElement("div",{ref:r,className:"QRCode"},I&&void 0===S&&Zx.createElement("div",{className:"PaddingTopS"},Zx.createElement("div",{className:"Skeleton",style:{borderRadius:"18px",width:"305px",height:"305px"}},Zx.createElement("div",{className:"SkeletonBackground"})))),I&&void 0===S&&Zx.createElement("div",{className:"Opacity05 PaddingBottomXS PaddingTopS"},Zx.createElement("small",null,"Generating QR code...")),I&&void 0!==S&&Zx.createElement("div",{className:"Opacity05 PaddingBottomXS PaddingTopXS"},Zx.createElement("small",null,"Scan QR code with your wallet")),(o||u||h||p)&&Zx.createElement("div",null,Zx.createElement("div",{className:"PaddingBottomXS PaddingTopS Opacity03",style:{display:"flex"}},Zx.createElement("div",{style:{borderBottom:"1px solid black",flex:"0.4",position:"relative",top:"-9px"},className:"Opacity05"}),Zx.createElement("div",{style:{flex:"0.2"},className:"PaddingLeftXS PaddingRightXS"},Zx.createElement("small",null,"or")),Zx.createElement("div",{style:{borderBottom:"1px solid black",flex:"0.4",position:"relative",top:"-9px"},className:"Opacity05"})))),(o||u||h||g&&!I||p)&&Zx.createElement("div",{className:"PaddingLeftL PaddingRightL PaddingTopS PaddingBottomS"},o&&Zx.createElement("div",{className:"PaddingBottomXS"},t.showConnectExtensionWarning&&Zx.createElement("div",{className:"PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"},Zx.createElement("div",{className:"Alert"},Zx.createElement("span",{className:"FontWeightBold PaddingBottomXS"},"You wallet extension window is already asking to connect. It might be hidden."))),t.connectingExtension&&Zx.createElement("div",{className:"Card disabled small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("div",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("div",{className:"PaddingTopXS"},Zx.createElement("div",{className:"Loading Icon medium",style:{position:"relative"}}))),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Connecting extension"))),!t.connectingExtension&&Zx.createElement("button",{onClick:function(){return t.connectExtension(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("img",{className:"transparent ",title:"Connect your wallet",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig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iIvPgo8L2c+Cjwvc3ZnPgo="})),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Connect extension")))),u&&Zx.createElement("div",{className:"PaddingBottomXS"},t.connectingApp&&Zx.createElement("div",{className:"Card disabled small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("div",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("div",{className:"PaddingTopXS"},Zx.createElement("div",{className:"Loading Icon medium",style:{position:"relative"}}))),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Connecting app"))),!t.connectingApp&&Zx.createElement("button",{onClick:function(){return t.connectViaRedirect(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("img",{className:"transparent ",title:"Click to connect app",style:{height:"26px",width:"26px",borderRadius:"8px"},src:t.wallet.logo})),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Connect app")))),h&&Zx.createElement("div",{className:"PaddingBottomXS"},Zx.createElement("button",{onClick:function(){return t.openInApp(t.wallet)},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("img",{className:"transparent ",title:"Click to open in app",style:{height:"26px",width:"26px",borderRadius:"8px"},src:t.wallet.logo})),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Open in app")))),g&&!I&&Zx.createElement("div",{className:"PaddingBottomXS"},Zx.createElement("button",{onClick:function(){E(!0),z()},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("img",{className:"transparent ",title:"Scan QR code to connect a mobile wallet",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyAgUFVCTElDICctLy9XM0MvL0RURCBTVkcgMS4xLy9FTicgICdodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQnPgo8c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEwMDAgMTAwMCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMWUzIDFlMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1ldGFkYXRhPiBTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiA8L21ldGFkYXRhPgo8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUxMSkgc2NhbGUoLjEgLS4xKSI+PHBhdGggZD0ibTEwMCAyNzk3LjF2LTIyMTIuOWg0NDI1Ljh2NDQyNS44aC00NDI1Ljh2LTIyMTIuOXptMzQ3Ny40IDB2LTEyNjQuNWgtMjUyOXYyNTI5aDI1Mjl2LTEyNjQuNXoiLz48cGF0aCBkPSJtMTY4MC42IDI3OTcuMXYtNjMyLjNoMTI2NC42djEyNjQuNmgtMTI2NC42di02MzIuM3oiLz48cGF0aCBkPSJtNTQ3NC4yIDI3OTcuMXYtMjIxMi45aDQ0MjUuOHY0NDI1LjhoLTQ0MjUuOHYtMjIxMi45em0zNDc3LjQgMHYtMTI2NC41aC0yNTI5djI1MjloMjUyOXYtMTI2NC41eiIvPjxwYXRoIGQ9Im03MDU0LjggMjc5Ny4xdi02MzIuM2gxMjY0LjZ2MTI2NC42aC0xMjY0LjZ2LTYzMi4zeiIvPjxwYXRoIGQ9Im0xMDAtMjU3Ny4xdi0yMjEyLjloNDQyNS44djQ0MjUuOGgtNDQyNS44di0yMjEyLjl6bTM0NzcuNCAwdi0xMjY0LjVoLTI1Mjl2MjUyOWgyNTI5di0xMjY0LjV6Ii8+PHBhdGggZD0ibTE2ODAuNi0yNTc3LjF2LTYzMi4zaDEyNjQuNnYxMjY0LjZoLTEyNjQuNnYtNjMyLjN6Ii8+PHBhdGggZD0ibTU0NzQuMi05MTcuNHYtNTUzLjJoMTEwNi40di0xMTA2LjRoLTExMDYuNHYtMTEwNi40aDExMDYuNHYtMTEwNi42aDExMDYuNHYxMTA2LjRoMTEwNi40di0xMTA2LjRoMTEwNi42djExMDYuNGgtMTEwNi40djExMDYuNGgxMTA2LjR2MTEwNi40aC0xMTA2LjR2MTEwNi40aC0xMTA2LjR2LTExMDYuNGgtMTEwNi40djExMDYuNGgtMTEwNi40di01NTN6bTMzMTkuMy0xMTA2LjV2LTU1My4yaC0xMTA2LjR2LTExMDYuNGgtMTEwNi40djExMDYuNGgxMTA2LjR2MTEwNi40aDExMDYuNHYtNTUzLjJ6Ii8+PC9nPgo8L3N2Zz4K"})),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Scan QR code")))),p&&Zx.createElement("div",{className:"PaddingBottomXS TooltipWrapper"},Zx.createElement("button",{onClick:function(){var e=new xE[t.platform.copyLink];e.connect({name:t.wallet.name,logo:t.wallet.logo,reconnect:!0,connect:function(t){!function(t,e){const n=document.createElement("textarea");n.value=t,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);n.select();let i=!1;try{i=!!document.execCommand("copy")}catch(t){i=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),e&&e(i)}(t.uri),T(!0),setTimeout((function(){return T(!1)}),3e3)}}).then((function(n){t.resolve(n,e)}))},className:"Card small PaddingTopS PaddingRightXS PaddingBottomS PaddingLeftXS",style:{height:"50px"}},Zx.createElement("span",{className:"PaddingTopXS PaddingRightXS PaddingLeftS TextCenter",style:{width:"50px"}},Zx.createElement("img",{className:"transparent ",title:"Copy connection link",style:{height:"26px"},src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiMwMTAxMDEiIGQ9Ik00NTkuNjU0LDIzMy4zNzNsLTkwLjUzMSw5MC41Yy00OS45NjksNTAtMTMxLjAzMSw1MC0xODEsMGMtNy44NzUtNy44NDQtMTQuMDMxLTE2LjY4OC0xOS40M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LjU5NC02OC41OTQNCglDMjc0LjU2MSwzOTUuMDkyLDI0Ni40MiwzOTIuMzQyLDIyMC4zMjYsMzgyLjE4NnoiLz4NCjwvc3ZnPg0K"})),Zx.createElement("div",{className:"PaddingLeftS LineHeightXS"},Zx.createElement("div",{className:"CardText FontWeightMedium"},"Copy connection link"))),k&&Zx.createElement("div",{className:"Tooltip absolute top"},Zx.createElement("span",{className:"TooltipArrowDown"}),"Connection link copied"))))})},hF=function(){return navigator.userAgent.toLowerCase().includes("android")},dF=function(){var t=navigator.userAgent.toLowerCase();return t.includes("webview")||t.includes("wv")||navigator.userAgent.toLowerCase().match(/\) mobile\//)&&!t.includes("safari")},fF=function(t){var e,n;if(oF()){if(hF())e=null===(n=t.mobile)||void 0===n?void 0:n.android;else if(Boolean(/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)){var r;e=null===(r=t.mobile)||void 0===r?void 0:r.ios}}else e=t.desktop;return e},pF=function(){return Zx.createElement("div",{className:"PoweredByWrapper"},Zx.createElement("a",{href:"https://depay.com",rel:"noopener noreferrer",target:"_blank",className:"PoweredByLink"},"by DePay"))},yF=function(t){var e,n=t.wallet.extensions.map((function(t){return xE[t].info.blockchains})).flat();t.accept&&(n=n.filter((function(e){return t.accept.some((function(t){return t.blockchain===e}))})));return Zx.createElement(iF,{header:Zx.createElement("div",{className:"PaddingTopS PaddingBottomS PaddingLeftM PaddingRightM"},(null===(e=t.wallet)||void 0===e?void 0:e.logo)&&Zx.createElement("div",{className:"PaddingTopXS"},Zx.createElement("div",{className:"LineHeightL FontSizeL PaddingTopS"},Zx.createElement("span",{className:"CardImage rounded large"},Zx.createElement("img",{className:"transparent",src:t.wallet.logo})))),Zx.createElement("div",null,Zx.createElement("h1",{className:"LineHeightL Text FontSizeL FontWeightBold"},"Select Blockchain"))),stacked:!0,bodyClassName:"ScrollHeight",body:Zx.createElement("div",null,n.map((function(e){return Zx.createElement("div",{key:e,className:"Card Row TextLeft",onClick:function(){return function(e){t.onSelect(t.wallet.extensions.find((function(t){return xE[t].info.blockchains.includes(e)})))}(e)}},Zx.createElement("div",{className:"CardImage"},Zx.createElement("img",{className:"transparent BlockchainLogo",src:Hf[e].logo,style:{backgroundColor:Hf[e].logoBackgroundColor}})),Zx.createElement("div",{className:"CardBody"},Zx.createElement("span",{className:"CardText"},Hf[e].label)))}))),footer:null})};function mF(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gF=function(t){var e=yx(Zx.useState(0),2),n=e[0],r=e[1];return Zx.useEffect((function(){var e=function(){r(n+1),0!=n&&t.hide()};return window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[t.open,n]),Zx.createElement("div",{className:"DropDown ".concat(t.open?"open":"")},Zx.createElement("ul",null,t.items.map((function(t,e){return Zx.createElement("li",{key:e},Zx.createElement("button",{className:"DropDownItem",onClick:function(){return t.action()}},t.label))}))))},vF=function(t){return Zx.createElement("svg",{className:"MenuIcon Icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"},Zx.createElement("line",{x1:"11.6",y1:"17.6",x2:"11.6",y2:"17.6"}),Zx.createElement("line",{x1:"11.6",y1:"11.8",x2:"11.6",y2:"11.8"}),Zx.createElement("line",{x1:"11.6",y1:"6.2",x2:"11.6",y2:"6.2"}))};function wF(t){return Array.isArray?Array.isArray(t):"[object Array]"===xF(t)}function bF(t){return"string"==typeof t}function MF(t){return"number"==typeof t}function AF(t){return!0===t||!1===t||function(t){return NF(t)&&null!==t}(t)&&"[object Boolean]"==xF(t)}function NF(t){return"object"==typeof t}function IF(t){return null!=t}function EF(t){return!t.trim().length}function xF(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const kF=Object.prototype.hasOwnProperty;class TF{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let n=LF(t);e+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function LF(t){let e=null,n=null,r=null,i=1,o=null;if(bF(t)||wF(t))r=t,e=SF(t),n=jF(t);else{if(!kF.call(t,"name"))throw new Error((t=>`Missing ${t} property in key`)("name"));const a=t.name;if(r=a,kF.call(t,"weight")&&(i=t.weight,i<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(a));e=SF(a),n=jF(a),o=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:o}}function SF(t){return wF(t)?t:t.split(".")}function jF(t){return wF(t)?t.join("."):t}var CF={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx{if(IF(t))if(e[o]){const a=t[e[o]];if(!IF(a))return;if(o===e.length-1&&(bF(a)||MF(a)||AF(a)))n.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(a));else if(wF(a)){r=!0;for(let t=0,n=a.length;t{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,bF(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();bF(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e{let i=e.getFn?e.getFn(t):this.getFn(t,e.path);if(IF(i))if(wF(i)){let t=[];const e=[{nestedArrIndex:-1,value:i}];for(;e.length;){const{nestedArrIndex:n,value:r}=e.pop();if(IF(r))if(bF(r)&&!EF(r)){let e={v:r,i:n,n:this.norm.get(r)};t.push(e)}else wF(r)&&r.forEach(((t,n)=>{e.push({nestedArrIndex:n,value:t})}))}n.$[r]=t}else if(bF(i)&&!EF(i)){let t={v:i,n:this.norm.get(i)};n.$[r]=t}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function zF(t,e,{getFn:n=CF.getFn,fieldNormWeight:r=CF.fieldNormWeight}={}){const i=new OF({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(LF)),i.setSources(e),i.create(),i}function PF(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=CF.distance,ignoreLocation:o=CF.ignoreLocation}={}){const a=e/t.length;if(o)return a;const s=Math.abs(r-n);return i?a+s/i:s?1:a}function _F(t,e,n,{location:r=CF.location,distance:i=CF.distance,threshold:o=CF.threshold,findAllMatches:a=CF.findAllMatches,minMatchCharLength:s=CF.minMatchCharLength,includeMatches:u=CF.includeMatches,ignoreLocation:c=CF.ignoreLocation}={}){if(e.length>32)throw new Error((t=>`Pattern length exceeds max of ${t}.`)(32));const l=e.length,h=t.length,d=Math.max(0,Math.min(r,h));let f=o,p=d;const y=s>1||u,m=y?Array(h):[];let g;for(;(g=t.indexOf(e,p))>-1;){let t=PF(e,{currentLocation:g,expectedLocation:d,distance:i,ignoreLocation:c});if(f=Math.min(t,f),p=g+l,y){let t=0;for(;t=u;o-=1){let a=o-1,s=n[t.charAt(a)];if(y&&(m[a]=+!!s),A[o]=(A[o+1]<<1|1)&s,r&&(A[o]|=(v[o+1]|v[o])<<1|1|v[o+1]),A[o]&M&&(w=PF(e,{errors:r,currentLocation:a,expectedLocation:d,distance:i,ignoreLocation:c}),w<=f)){if(f=w,p=a,p<=d)break;u=Math.max(1,2*d-p)}}if(PF(e,{errors:r+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:c})>f)break;v=A}const A={isMatch:p>=0,score:Math.max(.001,w)};if(y){const t=function(t=[],e=CF.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let a=t.length;o=e&&n.push([r,i]),r=-1)}return t[o-1]&&o-r>=e&&n.push([r,o-1]),n}(m,s);t.length?u&&(A.indices=t):A.isMatch=!1}return A}function BF(t){let e={};for(let n=0,r=t.length;n{this.chunks.push({pattern:t,alphabet:BF(t),startIndex:e})},l=this.pattern.length;if(l>32){let t=0;const e=l%32,n=l-e;for(;t{const{isMatch:p,score:y,indices:m}=_F(t,e,d,{location:r+f,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:s,includeMatches:n,ignoreLocation:u});p&&(h=!0),l+=y,p&&m&&(c=[...c,...m])}));let d={isMatch:h,score:h?l/this.chunks.length:1};return h&&n&&(d.indices=c),d}}class UF{constructor(t){this.pattern=t}static isMultiMatch(t){return QF(t,this.multiRegex)}static isSingleMatch(t){return QF(t,this.singleRegex)}search(){}}function QF(t,e){const n=t.match(e);return n?n[1]:null}class YF extends UF{constructor(t,{location:e=CF.location,threshold:n=CF.threshold,distance:r=CF.distance,includeMatches:i=CF.includeMatches,findAllMatches:o=CF.findAllMatches,minMatchCharLength:a=CF.minMatchCharLength,isCaseSensitive:s=CF.isCaseSensitive,ignoreLocation:u=CF.ignoreLocation}={}){super(t),this._bitapSearch=new RF(t,{location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:s,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class WF extends UF{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const r=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,r.push([e,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const FF=[class extends UF{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},WF,class extends UF{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends UF{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends UF{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends UF{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends UF{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},YF],VF=FF.length,HF=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const GF=new Set([YF.type,WF.type]);class qF{constructor(t,{isCaseSensitive:e=CF.isCaseSensitive,includeMatches:n=CF.includeMatches,minMatchCharLength:r=CF.minMatchCharLength,ignoreLocation:i=CF.ignoreLocation,findAllMatches:o=CF.findAllMatches,location:a=CF.location,threshold:s=CF.threshold,distance:u=CF.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:n,minMatchCharLength:r,findAllMatches:o,ignoreLocation:i,location:a,threshold:s,distance:u},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map((t=>{let n=t.trim().split(HF).filter((t=>t&&!!t.trim())),r=[];for(let t=0,i=n.length;t!(!t[XF]&&!t[KF]),nV=t=>({[XF]:Object.keys(t).map((e=>({[e]:t[e]})))});function rV(t,e,{auto:n=!0}={}){const r=t=>{let i=Object.keys(t);const o=(t=>!!t[$F])(t);if(!o&&i.length>1&&!eV(t))return r(nV(t));if((t=>!wF(t)&&NF(t)&&!eV(t))(t)){const r=o?t[$F]:i[0],a=o?t[tV]:t[r];if(!bF(a))throw new Error((t=>`Invalid value for key ${t}`)(r));const s={keyId:jF(r),pattern:a};return n&&(s.searcher=JF(a,e)),s}let a={children:[],operator:i[0]};return i.forEach((e=>{const n=t[e];wF(n)&&n.forEach((t=>{a.children.push(r(t))}))})),a};return eV(t)||(t=nV(t)),r(t)}function iV(t,e){const n=t.matches;e.matches=[],IF(n)&&n.forEach((t=>{if(!IF(t.indices)||!t.indices.length)return;const{indices:n,value:r}=t;let i={indices:n,value:r};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)}))}function oV(t,e){e.score=t.score}class aV{constructor(t,e={},n){this.options={...CF,...e},this.options.useExtendedSearch,this._keyStore=new TF(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof OF))throw new Error("Incorrect 'index' type");this._myIndex=e||zF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){IF(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let n=0,r=this._docs.length;n{let n=1;t.matches.forEach((({key:t,norm:r,score:i})=>{const o=t?t.weight:null;n*=Math.pow(0===i&&o?Number.EPSILON:i,(o||1)*(e?1:r))})),t.score=n}))}(s,{ignoreFieldNorm:a}),i&&s.sort(o),MF(e)&&e>-1&&(s=s.slice(0,e)),function(t,e,{includeMatches:n=CF.includeMatches,includeScore:r=CF.includeScore}={}){const i=[];return n&&i.push(iV),r&&i.push(oV),t.map((t=>{const{idx:n}=t,r={item:e[n],refIndex:n};return i.length&&i.forEach((e=>{e(t,r)})),r}))}(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const e=JF(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:t,i:n,n:i})=>{if(!IF(t))return;const{isMatch:o,score:a,indices:s}=e.searchIn(t);o&&r.push({item:t,idx:n,matches:[{score:a,value:t,norm:i,indices:s}]})})),r}_searchLogical(t){const e=rV(t,this.options),n=(t,e,r)=>{if(!t.children){const{keyId:n,searcher:i}=t,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return o&&o.length?[{idx:r,item:e,matches:o}]:[]}const i=[];for(let o=0,a=t.children.length;o{if(IF(t)){let a=n(e,t,r);a.length&&(i[r]||(i[r]={idx:r,item:t,matches:[]},o.push(i[r])),a.forEach((({matches:t})=>{i[r].matches.push(...t)})))}})),o}_searchObjectList(t){const e=JF(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:t,i:r})=>{if(!IF(t))return;let o=[];n.forEach(((n,r)=>{o.push(...this._findMatches({key:n,value:t[r],searcher:e}))})),o.length&&i.push({idx:r,item:t,matches:o})})),i}_findMatches({key:t,value:e,searcher:n}){if(!IF(e))return[];let r=[];if(wF(e))e.forEach((({v:e,i:i,n:o})=>{if(!IF(e))return;const{isMatch:a,score:s,indices:u}=n.searchIn(e);a&&r.push({score:s,key:t,value:e,idx:i,norm:o,indices:u})}));else{const{v:i,n:o}=e,{isMatch:a,score:s,indices:u}=n.searchIn(i);a&&r.push({score:s,key:t,value:i,norm:o,indices:u})}return r}}
+Zf((function(t,e){}));var XW=Zf((function(t){!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=JW}));const KW="/Users/sebastian/Work/DePay/react-dialog/src/components/Dialog.jsx";class $W extends Zx.Component{constructor(t){super(t),this.handler=this.onKeyDown.bind(this),this.state={open:!0}}closeDialog(){this.props.close()}onKeyDown(t){"Escape"===t.key&&this.closeDialog()}componentDidUpdate(t){!1===this.props.open&&!0===t.open&&this.setState({open:!1})}onClickBackground(t){this.closeDialog()}componentDidMount(){!1===this.props.animate?this.setState({open:!0}):this.setState({open:!1},(()=>{setTimeout((()=>{this.setState({open:!0})}),10)})),this.props.document.addEventListener("keydown",this.handler,!0)}componentWillUnmount(){this.props.document.removeEventListener("keydown",this.handler,!0)}render(){const t=["ReactDialog",this.state.open?"ReactDialogOpen":""],e=`\n .ReactDialog {\n bottom: 0;\n display: flex;\n height: 100%;\n height: 100vh;\n left: 0;\n min-height: 100%;\n min-height: 100vh;\n overflow: hidden;\n position: fixed;\n right: 0;\n top: 0;\n width: 100%;\n width: 100vw;\n }\n\n .ReactDialogInner {\n align-items: center;\n display: flex;\n flex: 1;\n justify-content: center;\n }\n\n .ReactDialogBackground {\n background: ${"object"==typeof(n={background:this.props.background})&&n.background?n.background:"rgba(0,0,0,0.4)"};\n bottom: 0;\n display: block;\n height: 100%;\n left: 0;\n opacity: 0;\n position: fixed;\n right: 0;\n top: 0;\n transition: opacity 0.4s ease;\n width: 100%;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogBackground {\n opacity: 1;\n }\n\n .ReactDialogAnimation {\n display: inline-block;\n position: relative;\n opacity: 0;\n top: -17vh;\n transition: opacity 0.4s ease, top 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n opacity: 1.0;\n top: -5vh;\n }\n `;var n;return Zx.createElement("div",{key:this.props.dialogKey,className:t.join(" "),__self:this,__source:{fileName:KW,lineNumber:59}},Zx.createElement("style",{__self:this,__source:{fileName:KW,lineNumber:60}},e),Zx.createElement("div",{className:"ReactDialogInner",__self:this,__source:{fileName:KW,lineNumber:61}},Zx.createElement("div",{className:"ReactDialogBackground",onClick:this.onClickBackground.bind(this),__self:this,__source:{fileName:KW,lineNumber:62}}),this.props.children))}}class tF extends Zx.Component{constructor(t){super(t),this.state={open:t.open}}componentDidUpdate(t){!1===this.props.open&&!0===t.open?setTimeout((()=>{this.setState({open:!1})}),400):!0===this.props.open&&!1===t.open&&this.setState({open:!0})}render(){let t=this.props.document||document,e=this.props.container||t.body;return this.state.open?XW.createPortal(Zx.createElement($W,{background:this.props.background,close:this.props.close,document:t,open:this.props.open,animate:this.props.animate,__self:this,__source:{fileName:"/Users/sebastian/Work/DePay/react-dialog/src/index.jsx",lineNumber:29}},this.props.children),e):null}}var eF=Zx.createContext(),nF=Zx.createContext();var rF=Zx.createContext();const iF="/Users/sebastian/Work/DePay/react-dialog-stack/src/index.jsx";class oF extends Zx.Component{constructor(t){if(super(t),t.setNavigator&&t.setNavigator(this),t.stacked){const e="string"==typeof t.stacked?t.stacked:"forward";this.state={stack:[],animating:!1,animation:null,direction:e,animationSpeed:200},setTimeout((()=>this.navigate(t.start,e)),10)}else this.state={stack:[t.start],animating:!1,animation:null,direction:"forward",animationSpeed:200}}set(t){this.setState({stack:t})}hide(t="forward"){"backward"===t?(this.setState({stack:[null,...this.state.stack]}),setTimeout((()=>this.navigate("back")),10)):this.navigate(null)}navigate(t,e="forward"){if(!(this.state.stack.indexOf(t)>-1))return"back"===t?this.unstack():void this.setState({stack:this.state.stack.concat(t),animating:!0,direction:e,animation:setTimeout(function(){this.setState({animating:!1})}.bind(this),this.state.animationSpeed)})}unstack(){if(this.state.stack.length<=1)return;let t=[...this.state.stack];t.pop(),this.setState({animating:!0,direction:"backward",animation:setTimeout(function(){this.setState({stack:t,animating:!1})}.bind(this),this.state.animationSpeed)})}classForState(t){if(!this.state.animating)return 1===this.state.stack.length||this.state.stack.length===t+1?"active":"inactive"}classForPosition(t){return this.state.stack.length>1?this.state.stack.length===t+1?"forward"===this.state.direction?"next":"previous":this.state.stack.length-1===t+1?"forward"===this.state.direction?"previous":"next":"stale":this.state.animating&&this.props.stacked&&0===t?"next":void 0}classForAnimation(){if(this.state.animating)return"animating"}classForDirection(){return this.state.direction}renderStack(){return this.state.stack.map(function(t,e){let n=[this.classForState(e),this.classForPosition(e),this.classForAnimation(),this.classForDirection()];return Zx.createElement("div",{key:e,className:["ReactDialogStack"].concat(n).join(" "),onClick:this.onClick.bind(this),__self:this,__source:{fileName:iF,lineNumber:153}},Zx.createElement(nF.Provider,{value:{navigate:this.navigate.bind(this),set:this.set.bind(this),hide:this.hide.bind(this)},__self:this,__source:{fileName:iF,lineNumber:158}},Zx.createElement(eF.Provider,{value:this.close.bind(this),__self:this,__source:{fileName:iF,lineNumber:161}},Zx.createElement(rF.Provider,{value:this.state.stack,__self:this,__source:{fileName:iF,lineNumber:162}},Zx.createElement("div",{className:"ReactDialogAnimation",__self:this,__source:{fileName:iF,lineNumber:163}},this.props.dialogs[t])))))}.bind(this))}onClick(t){t.target&&t.target.className&&t.target.className.match&&t.target.className.match("ReactDialogStack")&&(this.state.stack.length>1?this.unstack():this.close())}close(t){this.state.stack.length>1&&!t?this.unstack():(this.props.close(),setTimeout((()=>this.setState({stack:this.state.stack.slice(0,1)})),400))}render(){return Zx.createElement(tF,{close:this.close.bind(this),open:this.props.open,document:this.props.document,container:this.props.container,animate:!this.props.stacked,background:this.props.background,__self:this,__source:{fileName:iF,lineNumber:199}},Zx.createElement("style",{__self:this,__source:{fileName:iF,lineNumber:207}},"\n\n .ReactDialogStack {\n align-items: center;\n bottom: 0;\n display: flex;\n flex: 1;\n height: 100%;\n justify-content: center;\n position: absolute;\n top: 0;\n transition: left 0.1s ease, opacity 0.2s ease;\n width: 100%;\n }\n\n .ReactDialogStackRow {\n display: table-row;\n }\n\n .ReactDialogStackCell {\n display: table-cell;\n vertical-align: middle;\n padding: 0 0.6rem;\n }\n\n .ReactDialogStack {\n left: 0;\n opacity: 1;\n }\n\n .ReactDialogStack.inactive {\n display: none;\n }\n\n .ReactDialogStack.animating.stale {\n display: none;\n }\n\n .ReactDialogStack.animating.previous.forward {\n opacity: 0;\n left: -5rem;\n }\n\n .ReactDialogStack.animating.previous.backward {\n opacity: 0;\n left: 5rem;\n }\n\n .ReactDialogStack.animating.next.forward {\n opacity: 0;\n left: 5rem;\n }\n\n .ReactDialogStack.animating.next.backward {\n opacity: 0;\n left: -5rem;\n }\n "),this.renderStack())}}var aF=function(t){var e=Zx.useContext(nF).navigate,n=Zx.useContext(Jx),r=n.close,i=n.closable;return Zx.createElement("div",{className:["Dialog",t.className].join(" ")},Zx.createElement("div",{className:["DialogHeader",t.stacked?"TextCenter":""].join(" ")},t.stacked&&Zx.createElement("div",{className:"DialogHeaderActionLeft PaddingTopS PaddingLeftS PaddingRightS"},Zx.createElement("button",{type:"button",onClick:function(){return e("back")},className:"ButtonCircular",title:"Go back"},Zx.createElement(KC,null))),i&&!1!==t.closable&&Zx.createElement("div",{className:"DialogHeaderActionRight PaddingTopS PaddingLeftS PaddingRightS"},t.alternativeHeaderAction,Zx.createElement("button",{type:"button",onClick:r,className:"ButtonCircular",title:"Close dialog"},Zx.createElement($C,null))),t.header),Zx.createElement("div",{ref:t.bodyRef,className:["DialogBody",t.bodyClassName].join(" ")},t.body),!1!==t.footer&&Zx.createElement("div",{className:"DialogFooter"},t.footer))},sF=function(){return"undefined"!=typeof window&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/.test(navigator.userAgent))},uF=qf(Zf((function(t,e){self,t.exports=(()=>{var t={192:(t,e)=>{var n,r,i=function(){var t=function(t,e){var n=t,r=a[e],i=null,o=0,u=null,m=[],g={},w=function(t,e){i=function(t){for(var e=new Array(t),n=0;n=7&&N(t),null==u&&(u=x(n,r,m)),E(u,e)},b=function(t,e){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||o<=t+n))for(var r=-1;r<=7;r+=1)e+r<=-1||o<=e+r||(i[t+n][e+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)},M=function(){for(var t=8;t>r&1);i[Math.floor(r/3)][r%3+o-8-3]=a}for(r=0;r<18;r+=1)a=!t&&1==(e>>r&1),i[r%3+o-8-3][Math.floor(r/3)]=a},I=function(t,e){for(var n=r<<3|e,a=s.getBCHTypeInfo(n),u=0;u<15;u+=1){var c=!t&&1==(a>>u&1);u<6?i[u][8]=c:u<8?i[u+1][8]=c:i[o-15+u][8]=c}for(u=0;u<15;u+=1)c=!t&&1==(a>>u&1),u<8?i[8][o-u-1]=c:u<9?i[8][15-u-1+1]=c:i[8][15-u-1]=c;i[o-8][8]=!t},E=function(t,e){for(var n=-1,r=o-1,a=7,u=0,c=s.getMaskFunction(e),l=o-1;l>0;l-=2)for(6==l&&(l-=1);;){for(var h=0;h<2;h+=1)if(null==i[r][l-h]){var d=!1;u>>a&1)),c(r,l-h)&&(d=!d),i[r][l-h]=d,-1==(a-=1)&&(u+=1,a=7)}if((r+=n)<0||o<=r){r-=n,n=-n;break}}},x=function(t,e,n){for(var r=l.getRSBlocks(t,e),i=h(),o=0;o8*u)throw"code length overflow. ("+i.getLengthInBits()+">"+8*u+")";for(i.getLengthInBits()+4<=8*u&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=8*u||(i.put(236,8),i.getLengthInBits()>=8*u));)i.put(17,8);return function(t,e){for(var n=0,r=0,i=0,o=new Array(e.length),a=new Array(e.length),u=0;u=0?p.getAt(y):0}}var m=0;for(d=0;dr)&&(t=r,e=n)}return e}())},g.createTableTag=function(t,e){t=t||2;var n="";n+='',n+="";for(var r=0;r";for(var i=0;i';n+=""}return(n+="")+"
"},g.createSvgTag=function(t,e,n,r){var i={};"object"==typeof arguments[0]&&(t=(i=arguments[0]).cellSize,e=i.margin,n=i.alt,r=i.title),t=t||2,e=void 0===e?4*t:e,(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,a,s,u,c=g.getModuleCount()*t+2*e,l="";for(u="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",l+='"},g.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var n=g.getModuleCount()*t+2*e,r=e,i=n-e;return v(n,n,(function(e,n){if(r<=e&&e"};var k=function(t){for(var e="",n=0;n":e+=">";break;case"&":e+="&";break;case'"':e+=""";break;default:e+=r}}return e};return g.createASCII=function(t,e){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var e,n,r,i,o,a=1*g.getModuleCount()+2*t,s=t,u=a-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},l={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(e=0;e=u?l[o]:c[o];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(e);t-=1,e=void 0===e?2*t:e;var n,r,i,o,a=g.getModuleCount()*t+2*e,s=e,u=a-e,c=Array(t+1).join("██"),l=Array(t+1).join(" "),h="",d="";for(n=0;n>>8),e.push(255&a)):e.push(r)}}return e}};var e,n,r,i,o,a={L:1,M:0,Q:3,H:2},s=(e=[[],[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(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(i={}).getBCHTypeInfo=function(t){for(var e=t<<10;o(e)-o(n)>=0;)e^=n<=0;)e^=r<5&&(n+=3+o-5)}for(r=0;r=256;)e-=255;return t[e]}}}();function c(t,e){if(void 0===t.length)throw t.length+"/"+e;var n=function(){for(var n=0;n>>7-e%8&1)},put:function(t,e){for(var r=0;r>>e-r-1&1))},getLengthInBits:function(){return e},putBit:function(n){var r=Math.floor(e/8);t.length<=r&&t.push(0),n&&(t[r]|=128>>>e%8),e+=1}};return n},d=function(t){var e=t,n={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var n=e,i=0;i+2>>8&255)+(255&i),t.put(i,13),n+=2}if(n>>8)},writeBytes:function(t,n,r){n=n||0,r=r||t.length;for(var i=0;i0&&(e+=","),e+=t[n];return e+"]"}};return e},g=function(t){var e=t,n=0,r=0,i=0,o={read:function(){for(;i<8;){if(n>=e.length){if(0==i)return-1;throw"unexpected end of file./"+i}var t=e.charAt(n);if(n+=1,"="==t)return i=0,-1;t.match(/^\s$/)||(r=r<<6|a(t.charCodeAt(0)),i+=6)}var o=r>>>i-8&255;return i-=8,o}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return o},v=function(t,e,n){for(var r=function(t,e){var n=t,r=e,i=new Array(t*e),o={setPixel:function(t,e,r){i[e*n+t]=r},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(r),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(r),t.writeByte(0);var e=a(2);t.writeByte(2);for(var i=0;e.length-i>255;)t.writeByte(255),t.writeBytes(e,i,255),i+=255;t.writeByte(e.length-i),t.writeBytes(e,i,e.length-i),t.writeByte(0),t.writeString(";")}},a=function(t){for(var e=1<>>e!=0)throw"length over";for(;c+e>=8;)u.writeByte(255&(t<>>=8-c,l=0,c=0;l|=t<0&&u.writeByte(l)}});d.write(e,r);var f=0,p=String.fromCharCode(i[f]);for(f+=1;f=6;)o(t>>>e-6),e-=6},i.flush=function(){if(e>0&&(o(t<<6-e),t=0,e=0),n%3!=0)for(var i=3-n%3,a=0;a>6,128|63&r):r<55296||r>=57344?e.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&t.charCodeAt(n)),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return e}(t)},void 0===(r="function"==typeof(n=function(){return i})?n.apply(e,[]):n)||(t.exports=r)},676:(t,e,n)=>{n.d(e,{default:()=>D});var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]2||o&&a||s&&u)this._basicSquare({x:e,y:n,size:r,rotation:0});else{if(2===c){var l=0;return o&&s?l=Math.PI/2:s&&a?l=Math.PI:a&&u&&(l=-Math.PI/2),void this._basicCornerRounded({x:e,y:n,size:r,rotation:l})}if(1===c)return l=0,s?l=Math.PI/2:a?l=Math.PI:u&&(l=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:r,rotation:l})}else this._basicDot({x:e,y:n,size:r,rotation:0})},t.prototype._drawExtraRounded=function(t){var e=t.x,n=t.y,r=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0,c=o+a+s+u;if(0!==c)if(c>2||o&&a||s&&u)this._basicSquare({x:e,y:n,size:r,rotation:0});else{if(2===c){var l=0;return o&&s?l=Math.PI/2:s&&a?l=Math.PI:a&&u&&(l=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:n,size:r,rotation:l})}if(1===c)return l=0,s?l=Math.PI/2:a?l=Math.PI:u&&(l=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:r,rotation:l})}else this._basicDot({x:e,y:n,size:r,rotation:0})},t.prototype._drawClassy=function(t){var e=t.x,n=t.y,r=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0;0!==o+a+s+u?o||s?a||u?this._basicSquare({x:e,y:n,size:r,rotation:0}):this._basicCornerRounded({x:e,y:n,size:r,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:r,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var e=t.x,n=t.y,r=t.size,i=t.getNeighbor,o=i?+i(-1,0):0,a=i?+i(1,0):0,s=i?+i(0,-1):0,u=i?+i(0,1):0;0!==o+a+s+u?o||s?a||u?this._basicSquare({x:e,y:n,size:r,rotation:0}):this._basicCornerExtraRounded({x:e,y:n,size:r,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:n,size:r,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:r,rotation:Math.PI/2})},t}();var d=function(){return(d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r||i&&i=(e-o.hideXDots)/2&&t<(e+o.hideXDots)/2&&n>=(e-o.hideYDots)/2&&n<(e+o.hideYDots)/2||(null===(r=w[t])||void 0===r?void 0:r[n])||(null===(i=w[t-e+7])||void 0===i?void 0:i[n])||(null===(a=w[t])||void 0===a?void 0:a[n-e+7])||(null===(s=b[t])||void 0===s?void 0:s[n])||(null===(u=b[t-e+7])||void 0===u?void 0:u[n])||(null===(c=b[t])||void 0===c?void 0:c[n-e+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:o.width,height:o.height,count:e,dotSize:i})]:[3,4];case 3:f.sent(),f.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,e,n,r=this._element,i=this._options;if(r){var o=null===(t=i.backgroundOptions)||void 0===t?void 0:t.gradient,a=null===(e=i.backgroundOptions)||void 0===e?void 0:e.color;if((o||a)&&this._createColor({options:o,color:a,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 s=Math.min(i.width,i.height),u=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),u.setAttribute("x",String((i.width-s)/2)),u.setAttribute("y",String((i.height-s)/2)),u.setAttribute("width",String(s)),u.setAttribute("height",String(s)),u.setAttribute("rx",String(s/2*i.backgroundOptions.round)),this._backgroundClipPath.appendChild(u)}}},t.prototype.drawDots=function(t){var e,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 a=Math.min(i.width,i.height)-2*i.margin,s=i.shape===m?a/Math.sqrt(2):a,u=Math.floor(s/o),c=Math.floor((i.width-o*u)/2),l=Math.floor((i.height-o*u)/2),d=new h({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===(e=i.dotsOptions)||void 0===e?void 0:e.gradient,color:i.dotsOptions.color,additionalRotation:0,x:0,y:0,height:i.height,width:i.width,name:"dot-color"});for(var f=function(e){for(var i=function(i){return t&&!t(e,i)?"continue":(null===(n=p._qr)||void 0===n?void 0:n.isDark(e,i))?(d.draw(c+e*u,l+i*u,u,(function(n,a){return!(e+n<0||i+a<0||e+n>=o||i+a>=o)&&!(t&&!t(e+n,i+a))&&!!r._qr&&r._qr.isDark(e+n,i+a)})),void(d._element&&p._dotsClipPath&&p._dotsClipPath.appendChild(d._element))):"continue"},a=0;a=g-1&&y<=v-g&&N>=g-1&&N<=v-g||Math.sqrt((y-A)*(y-A)+(N-A)*(N-A))>A?M[y][N]=0:M[y][N]=this._qr.isDark(N-2*g<0?N:N>=o?N-2*g:N-g,y-2*g<0?y:y>=o?y-2*g:y-g)?1:0}var I=function(t){for(var e=function(e){if(!M[t][e])return"continue";d.draw(w+t*u,b+e*u,u,(function(n,r){var i;return!!(null===(i=M[t+n])||void 0===i?void 0:i[e+r])})),d._element&&E._dotsClipPath&&E._dotsClipPath.appendChild(d._element)},n=0;na?s:a,l=document.createElementNS("http://www.w3.org/2000/svg","rect");if(l.setAttribute("x",String(i)),l.setAttribute("y",String(o)),l.setAttribute("height",String(a)),l.setAttribute("width",String(s)),l.setAttribute("clip-path","url('#clip-path-"+u+"')"),e){var h;if("radial"===e.type)(h=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",u),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("fx",String(i+s/2)),h.setAttribute("fy",String(o+a/2)),h.setAttribute("cx",String(i+s/2)),h.setAttribute("cy",String(o+a/2)),h.setAttribute("r",String(c/2));else{var d=((e.rotation||0)+r)%(2*Math.PI),f=(d+2*Math.PI)%(2*Math.PI),p=i+s/2,y=o+a/2,m=i+s/2,g=o+a/2;f>=0&&f<=.25*Math.PI||f>1.75*Math.PI&&f<=2*Math.PI?(p-=s/2,y-=a/2*Math.tan(d),m+=s/2,g+=a/2*Math.tan(d)):f>.25*Math.PI&&f<=.75*Math.PI?(y-=a/2,p-=s/2/Math.tan(d),g+=a/2,m+=s/2/Math.tan(d)):f>.75*Math.PI&&f<=1.25*Math.PI?(p+=s/2,y+=a/2*Math.tan(d),m-=s/2,g-=a/2*Math.tan(d)):f>1.25*Math.PI&&f<=1.75*Math.PI&&(y+=a/2,p+=s/2/Math.tan(d),g-=a/2,m-=s/2/Math.tan(d)),(h=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",u),h.setAttribute("gradientUnits","userSpaceOnUse"),h.setAttribute("x1",String(Math.round(p))),h.setAttribute("y1",String(Math.round(y))),h.setAttribute("x2",String(Math.round(m))),h.setAttribute("y2",String(Math.round(g)))}e.colorStops.forEach((function(t){var e=t.offset,n=t.color,r=document.createElementNS("http://www.w3.org/2000/svg","stop");r.setAttribute("offset",100*e+"%"),r.setAttribute("stop-color",n),h.appendChild(r)})),l.setAttribute("fill","url('#"+u+"')"),this._defs.appendChild(h)}else n&&l.setAttribute("fill",n);this._element.appendChild(l)},t}(),A="canvas";for(var N={},I=0;I<=40;I++)N[I]=I;const E={type:A,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:N[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 x=function(){return(x=Object.assign||function(t){for(var e,n=1,r=arguments.length;n